摘要:
res = requests.get('http://soso3.gtimg.cn/sosopic/0/11129365531347748413/640') # print(res.content) with open('img/test.jpg','wb') as f: f.write(res.content) 阅读全文
posted @ 2019-01-14 19:29
山…隹
阅读(568)
评论(0)
推荐(0)
摘要:
html中若有编码 在html中Ctrl+f 搜索charset查看网站的编码方式 然后res.encoding=。。。 加上编码格式,再打印 阅读全文
posted @ 2019-01-14 19:22
山…隹
阅读(235)
评论(0)
推荐(0)
摘要:
import requests # 代理 # proxy = { # 'http':'http://182.61.29.114.6868' # } # res = requests.get('http://httpbin.org/ip',proxies = proxy) # print(res.text) ################# #取消重定向 # res = requests... 阅读全文
posted @ 2019-01-14 19:13
山…隹
阅读(185)
评论(0)
推荐(0)
摘要:
import requests # get实例 # res = requests.get('http://httpbin.org/get') # # res.encoding='utf-8' # print(res.encoding) #编码格式 # print(res.text)#获取文本 ##################### #post实例 # info = { # ... 阅读全文
posted @ 2019-01-14 18:45
山…隹
阅读(137)
评论(0)
推荐(0)