python-request ignoring warning

tags: python  Development language  rear end

Python Request requesting running results warning

After https request plus Verify = False ignores SSL verification, a warning will warn InseREREQUESTWARNING:

import requests

res = requests.get('https://www.csdn.net/', verify=False)
print(res.status_code)


 # operation result: 
# /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/connectionpool.py:986: InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.csdn.net'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
#   InsecureRequestWarning,
# 200

solve:

All warnings are from the warnings module, ignoring the warning of the warnings module

import requests

 #  
import warnings
warnings.filterwarnings('ignore')

res = requests.get('https://www.csdn.net/', verify=False)
print(res.status_code)

Intelligent Recommendation

warning: ignoring old commands for target `smg.o`

Microcomputer principle experiment error Figure Search is Makefile problem Open makefile with text documentation I found that smg.o and everyone's path were not very the same, and there were two, and ...

LINUX XXX: Warning: ignoring unsupported Character '

Restore passes: 1 git pull code to the NFS directory of Windows 2 Ubuntu mounted Windows NFS 3 CP NFS code to Ubuntu Local 4 make xxx_defconfig A lot of errors and warnings appear, mainly in Kconfig a...

【yolov5 training error】WARNING: Ignoring corrupted image

Recently, when running the yolov5 model, the following warning appeared.(WARNING: Ignoring corrupted image), the model can continue to train, but the model cannot successfully train all pictures. Ther...

WARNING: Ignoring invalid distribution -ip solves the problem

Solution: (d:\program files\python\python36\lib\site-package directory Go to the prompt directory site-packages and delete the directory starting with ~ip. Then reinstall the library by pip....

More Recommendation

Solving Python When using a PIP installation package, Warning: ignoring invalid distribution -ip (f: \ python3.8 \ lib \ site-packages)

【Problem Description】 When using Python's package management tool PIP to download and install, the warning message as shown will not affect, but the sense of view is extremely poor 【Cause Analysis】 Pr...

Warning: ignoring return value of 'scanf', declared with attribute warn_unused_result

prompt: prog.c: In function ‘main’: prog.c:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result Is that you are not usingscanfThe return val...

Ubantu18.04 solves the "warning: output VGA1 not found; ignoring" that appears on the split screen

Foreword: In the newly installed UBATU183.4, I want to set up a dual screen. It is a very simple thing. Some posts written by some bloggers are misleading. Now I share the pits I have walked with and ...

[WARNING]: Could not match supplied host pattern, ignoring: servers

Centos7.5 ansible command execution error problem: the reason: Solution:...

#visual studio compilation # warning LNK4075: ignoring '/ EDITANDCONTINUE' due to '/ SAFESEH' specification

1. Open the project "Property Pages" box.   2. Click the "Linker" folder.   method one: 1. Click on the "Command Line" property page. 2. / SAFESEH: NO Type &quo...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top