python爬虫 403 Forbidden 解决方法
时间:2017-08-21 15:33:21
收藏:0
阅读:413
模拟浏览器打开网页:
headers={
‘User-Agent‘:‘Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36 LBBROWSER‘
}
res = requests.get(url.format(page),headers=headers)
原文:http://www.cnblogs.com/tian-sun/p/7404429.html
评论(0)