|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- PS E:\wp> py test6.py
- C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\urllib3\connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
- InsecureRequestWarning,
复制代码
主要是它引起的,但是并没有影响 运行结果
- r = requests.post(url=loginurl,headers=headers,verify=False)
复制代码
- import requests
- from requests.packages import urllib3
- urllib3.disable_warnings()
- response = requests.get('https://www.12306.cn', verify=False)
- print(response.status_code)
复制代码
|
|