当前位置:网站首页>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
边栏推荐
- MySQL 中的字符串函数
- The ultimate experience, the audio and video technology behind the tiktok
- JS interview question: FN call. call. call. Call (FN2) parsing
- This point in JS
- Implementation of k8s redis one master multi slave dynamic capacity expansion
- The method of changing a value in the array and a value in the object of wechat applet
- vite配置proxy代理解决跨域
- Examination question bank and online simulation examination of the third batch (main person in charge) of special operation certificate of safety officer a certificate in Guangdong Province in 2022
- 31. Next arrangement
- cartographer_ There is no problem compiling node, but running the bug that hangs directly
猜你喜欢

Halo open source project learning (II): entity classes and data tables

Kubernetes service discovery monitoring endpoints

Anchor location - how to set the distance between the anchor and the top of the page. The anchor is located and offset from the top

Operators in C language

String function in MySQL

QTableWidget使用讲解

Chrome浏览器的跨域设置----包含新老版本两种设置

MySQL进阶学习之SQL优化【插入,主键,排序,分组,分页,计数】

Open source key component multi_ Button use, including test engineering

On the problem of V-IF display and hiding
随机推荐
Hcip fifth experiment
Compilation principle first set follow set select set prediction analysis table to judge whether the symbol string conforms to the grammar definition (with source code!!!)
C# 网络相关操作
C1小笔记【任务训练篇二】
[appium] write scripts by designing Keyword Driven files
The JS timestamp of wechat applet is converted to / 1000 seconds. After six hours and one day, this Friday option calculates the time
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
102. Sequence traversal of binary tree
Nat commun | current progress and open challenges of applied deep learning in Bioscience
Operation of 2022 mobile crane driver national question bank simulation examination platform
On the problem of V-IF display and hiding
SystemVerilog (VI) - variable
Go language JSON package usage
Eigen learning summary
Qtablewidget usage explanation
Transfer learning of five categories of pictures based on VGg
1217_ Generating target files using scons
Data stream encryption and decryption of C
cartographer_ There is no problem compiling node, but running the bug that hangs directly
C byte array (byte []) and string are converted to each other