Python爬虫-requests.exceptions.SSLError: HTTPSConnectionPool疑难杂症解决(1)

前言

本文是该专栏的第7篇,后面会持续分享python爬虫案例干货,记得关注。

在爬虫项目开发中,偶尔可能会遇到SSL验证问题“requests.exceptions.SSLError: HTTPSConnectionPool(host='www.xxxxxx.com', port=443): Max retries exceeded with url ...”。亦或是验证之后的提示警告“InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verif”。相信这些在一定程度上,给你的爬虫程序造成一定的干扰,有没有什么方法能完美解决该问题呢?

废话不多说,跟着笔者直接往下看正文的详细方法。(附带完整代码)

正文

1. 问题描述

如下图所示:

猜你喜欢

转载自blog.csdn.net/Leexin_love_Ling/article/details/133143327