python爬虫之requests对https的限制访问

如果想要爬取的一个网站时返回错误如下:

/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:79:InsecurePlatformWarning:
A true SSLContext object is not available.This prevents urllib3 from configuring SSL appropriately and may cause certain SSL
connections to fail.For more information, see https://urllib3.readthedocs.org/en/latest/security.html#
insecureplatformwarning.InsecurePlatformWarning


此时,执行此指令:

pip install pyopenssl ndg-httpsclient pyasn1

这种错误应该时因为python版本过低(比如python2.7),https的加密又无法被requests请求成功

你可能感兴趣的:(python爬虫之requests对https的限制访问)