惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Martin Fowler
Martin Fowler
博客园_首页
量子位
T
Tailwind CSS Blog
博客园 - Franky
G
Google Developers Blog
D
DataBreaches.Net
Vercel News
Vercel News
B
Blog
Recent Announcements
Recent Announcements
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
爱范儿
爱范儿
博客园 - 【当耐特】
The Cloudflare Blog
H
Help Net Security
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
C
Check Point Blog
有赞技术团队
有赞技术团队
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

行迹小栈

英语十大词法汇总 - 行迹小栈 保定市林草生态园 - 行迹小栈 【北京】-八达岭长城 - 行迹小栈 【北京】-颐和园 - 行迹小栈 【上海】 - 行迹小栈 【唐山市】河头老街-唐山宴-唐山地震博物馆 - 行迹小栈 【天津】 - 行迹小栈 【北京】-天安门 - 行迹小栈 【张家口】-蔚县 - 行迹小栈 🐍 Python ORM 技术选型指南: SQLAlchemy 与 SQLModel - 行迹小栈 Mysql查询:每个重复数据,只显示一条 - 行迹小栈 python提取excel中的超链接 - 行迹小栈 CentOS7通过rpm安装docker和docker compose - 行迹小栈 centos7 初始化脚本 - 行迹小栈 Vmware centos7 配置静态网络 - 行迹小栈 我的瘢痕疙瘩治疗过程记录 - 行迹小栈 关于瘢痕疙瘩-为什么-治疗方案-如何预防 - 行迹小栈 javascript基础教程 - 行迹小栈 python使用subprocess配合node.js执行js代码 - 行迹小栈
Requests verify=False 报错:InsecureRequestWarning: Unver...
行迹小栈 · 2025-08-19 · via 行迹小栈

requests请求时设置了 verify=False 不验证证书,运行时控制台会打印出警告,如何关闭警告?

添加以下代码即可

import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

完整代码

import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

r = requests.get('https://hilxy.com', verify=False)
print(r.status_code)
print(response.text)