所以基本上思路就是用python登录一个网站,复制一个html页面的内容,只有登录后才能查看。(https下)
关于如何实现这一目标的任何建议?要求?http.client.HTTPSConnection?
我目前有
h1 = http.client.HTTPSConnection(URL) #question: what exactly should this url page be?
https://accounts.google.com/ServiceLoginhl=en&continue=https://www.google.ca/
or https://google.ca
userAndPass = b64encode(b"usrname:pwd").decode("ascii")
headers = { 'Authorization' : 'Basic %s' % userAndPass }
#then connect
h1.request('GET', '$THEPAGETHATIWANTTOACCESS', headers=headers)
非常感谢!