摘要: import requests # 请求数据url member_url = 'https://www.yaozh.com/member/' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/7... 阅读全文
posted @ 2019-03-26 23:08 hank-li 阅读(170) 评论(0) 推荐(0)
摘要: import requests url = 'https://www.12306.cn/mormhweb/' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safar... 阅读全文
posted @ 2019-03-26 22:59 hank-li 阅读(113) 评论(0) 推荐(0)
摘要: import requests # 1.请求url url = 'http://www.baidu.com' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safar... 阅读全文
posted @ 2019-03-26 20:51 hank-li 阅读(114) 评论(0) 推荐(0)
摘要: import requests # 发送post请求 data = { } response = requests.post(url, data=data) # 内网 需要 认证 auth = (user,pwd) response = requests.get(url,auth=auth) 阅读全文
posted @ 2019-03-26 20:43 hank-li 阅读(181) 评论(0) 推荐(0)
摘要: import urllib.request def proxy_user(): proxy_list = [ {"https":""}, # {"https":"106.75.226.36:808"}, # {"https":"61.135.217.7:80"}, # {"https":"125.70.13.77:808... 阅读全文
posted @ 2019-03-26 20:06 hank-li 阅读(140) 评论(0) 推荐(0)
摘要: import urllib.request def create_proxy_handler(): url = "https://blog.csdn.net/m0_37499059/article/details/79003731" #添加代理 proxy = { #免费的写法 "http":"" # "http":"... 阅读全文
posted @ 2019-03-26 19:57 hank-li 阅读(165) 评论(0) 推荐(0)
摘要: import urllib.request def handler_openner(): #系统的urlopen并没有添加代理的功能所以需要我们自定义这个功能 #安全 套接层 ssl第三方的CA数字证书 #http80端口# 和https443 #urlopen为什么可以请求数据 handler处理器 #自己的oppener请求数据 # ur... 阅读全文
posted @ 2019-03-26 19:53 hank-li 阅读(139) 评论(0) 推荐(0)