当前位置:网站首页>Secure credit
Secure credit
2022-04-23 17:58:00 【Feng Ye 520】
import urllib
import ssl
#https = http+ssl( Secure socket layer )
# Manually increase credit
# Create a SSLContext object
context = ssl._create_unverified_context()
url = "https://www.12306.cn/mormhweb/"
ua_headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"}
# HTTP Request
req = urllib.request.Request(url,
headers=ua_headers)
# HTTP Response
response = urllib.request.urlopen(req,
context=context)
with open("12306.html", "wb") as f:
f.write(response.read())
#CertificateError:
版权声明
本文为[Feng Ye 520]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546152115.html
边栏推荐
- ros常用的函数——ros::ok(),ros::Rate,ros::spin()和ros::spinOnce()
- Go的Gin框架学习
- C language input and output (printf and scanf functions, putchar and getchar functions)
- Oil monkey website address
- C byte array (byte []) and string are converted to each other
- _ FindText error
- cartographer_ There is no problem compiling node, but running the bug that hangs directly
- Cloud native Virtualization: building edge computing instances based on kubevirt
- Arithmetic expression
- Future usage details
猜你喜欢
Implementation of object detection case based on SSD
Gaode map search, drag and drop query address
Romance in C language
Yolov4 pruning [with code]
102. Sequence traversal of binary tree
2022 tea artist (primary) examination simulated 100 questions and simulated examination
Tell the truth of TS
Theory and practice of laser slam in dark blue College - Chapter 2 (odometer calibration)
2022年流动式起重机司机国家题库模拟考试平台操作
Gets the time range of the current week
随机推荐
Go's gin framework learning
Operation of 2022 mobile crane driver national question bank simulation examination platform
587. 安装栅栏 / 剑指 Offer II 014. 字符串中的变位词
Timestamp to formatted date
Kubernetes service discovery monitoring endpoints
2022年茶艺师(初级)考试模拟100题及模拟考试
土地覆盖/利用数据产品下载
Write a regular
Cloud native Virtualization: building edge computing instances based on kubevirt
读取excel,int 数字时间转时间
Add drag and drop function to El dialog
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
SystemVerilog (VI) - variable
ES6 face test questions (reference documents)
Tensorflow tensor introduction
Eigen learning summary
2022 Jiangxi Photovoltaic Exhibition, China Distributed Photovoltaic Exhibition, Nanchang Solar Energy Utilization Exhibition
Submit local warehouse and synchronize code cloud warehouse
Amount input box, used for recharge and withdrawal
Go的Gin框架学习