"""
请求头User-Agent
"""
import requests
url = "http://httpbin.org/get"
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"}
response = requests.get(url = url, headers=headers)
print (response.text)
Python爬虫重构User-Agent
最新推荐文章于 2024-08-31 21:39:38 发布