我想使用 pythons requests模块抓取 Heritrix 主页。当我尝试在 chrome 上打开此页面时,出现错误:
This server could not prove that it is 10.100.121.41; its security
certificate is not trusted by your computer's operating system. This
may be caused by a misconfiguration or an attacker intercepting your
connection.
但我可以进入页面。当我尝试使用requests抓取同一页面时,出现 SSL 错误,经过一番挖掘,我使用了 SO questionr=requests.get(url,auth=(username, password),verify=False
中的以下代码:那是给我以下警告/usr/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py:734: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
,并返回 401 状态码。如何解决这个问题?