0

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 の質問から次のコードを使用しました: r=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 が返されます。この問題を解決するにはどうすればよいですか?

4

1 に答える 1