无法使用请求从网页获得响应

时间:2018-08-04 11:09:35

标签: python sockets beautifulsoup python-requests urllib

我正在尝试登录需要身份验证的站点并尝试下载文件

我的代码:

 import requests
 site_url='https://www.example.com'
 userid='abc'
 password='abc123'
 resp = requests.get(site_url, auth=(userid, password))

但我得到ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))的帮助。

0 个答案:

没有答案