模拟浏览器打开网页:
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)
时间: 2024-10-10 14:33:01
模拟浏览器打开网页:
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)