上一页 1 ··· 7 8 9 10 11
摘要: # coding:utf-8 import requests # url = 'http://www.xxx.com/xxx/xxx?begNy=&endNy=' herder = { "Accept": "text/html,application/xhtml+xml,application/xm 阅读全文
posted @ 2019-01-22 16:39 千年妖狐 阅读(228) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8import requests# 禁用安全请求警告from requests.packages.urllib3.exceptions import InsecureRequestWarningrequests.packages.urllib3.disable_warnin 阅读全文
posted @ 2019-01-22 16:26 千年妖狐 阅读(242) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8import requestsxxxxx if __name__ == "__main__": url = "https://passport.cnblogs.com/user/signin" payload = { "input1": "xxx", "input2": 阅读全文
posted @ 2019-01-22 16:23 千年妖狐 阅读(149) 评论(0) 推荐(0) 编辑
摘要: r2 = s.post(url2, data=body, verify=False)# 获取当前url地址print r2.url# 第三步:正则提取需要的参数值import repostid = re.findall(r"postid=(.+?)&", r2.url)print postid # 阅读全文
posted @ 2019-01-22 16:05 千年妖狐 阅读(278) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8import requests# 请求头headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0" }s = requests. 阅读全文
posted @ 2019-01-22 15:59 千年妖狐 阅读(275) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8import requestsurl = "http://www.kuaidi.com/index-ajaxselectcourierinfo-1202247993797-yunda.html"headers = { "User-Agent": "Mozilla/5.0 阅读全文
posted @ 2019-01-22 15:52 千年妖狐 阅读(190) 评论(0) 推荐(0) 编辑
摘要: paylod = {"xx":"xxxx", "xx":"xxx"} r = requests.post("xxxxxxxxxx", data=paylod) print(r.text) --json paylod = {"xx":"xxxx", "xx":"xxx"} data_json = du 阅读全文
posted @ 2019-01-22 15:13 千年妖狐 阅读(403) 评论(0) 推荐(0) 编辑
摘要: --不带参数 r = requests.get("xxxxxxxxxx") print(r.content) --带参数 pa = {"xxx":"xxx"} r = requests.get("xxxxxxxxxx", param=pa) print(r.content) -- r.status_ 阅读全文
posted @ 2019-01-22 15:01 千年妖狐 阅读(149) 评论(0) 推荐(0) 编辑
摘要: # coding:utf-8import requests# 先打开登录首页,获取部分cookieurl = "https://passport.cnblogs.com/user/signin"headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10 阅读全文
posted @ 2019-01-22 14:54 千年妖狐 阅读(460) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11