上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 67 下一页
摘要: 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)
摘要: import urllib.request def load_baidu(): url= "http://www.baidu.com" #添加请求头的信息 #创建请求对象 request = urllib.request.Request(url) #请求网络数据 response = urllib.request.urlopen(reques... 阅读全文
posted @ 2019-03-25 21:18 hank-li 阅读(122) 评论(0) 推荐(0)
摘要: import urllib.request def load_baidu(): url= "https://www.baidu.com" header = { #浏览器的版本 "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) 阅读全文
posted @ 2019-03-24 23:27 hank-li 阅读(157) 评论(0) 推荐(0)
摘要: import urllib.request import urllib.parse import string def get_params(): url = "http://www.baidu.com/s?" params = { "wd":"中文", "key":"zhang", "value" 阅读全文
posted @ 2019-03-24 23:17 hank-li 阅读(205) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 67 下一页