百变大咖秀20140123,iq过大河,造梦西游3易爆点100%
如下所示:
import requests url='http://####' proxy={'http':'http://####:80'} headers={ "accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "accept-encoding": "gzip, deflate, br", "accept-language": "zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3", "connection":"keep-alive", "host": "36kr.com/newsflashes", "upgrade-insecure-requests":"1", "user-agent":"mozilla/5.0 (macintosh; intel mac os x 10.13; rv:55.0) gecko/20100101 firefox/55.0" } respone=requests.get(url,timeout=10,headers=headers,proxies=proxy) print(respone.status_code)
以上这篇在python中使用requests 模拟浏览器发送请求数据的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
python求numpy中array按列非零元素的平均值案例
网友评论