展开全部
伪装一下蠢高浏览器,
import requests
headers = {'毁早User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/带余尺537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36',}
response = requests.get(r'https://baike.baidu.com/',headers=headers)
print(response.status_code)
import requests
headers = {'毁早User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/带余尺537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36',}
response = requests.get(r'https://baike.baidu.com/',headers=headers)
print(response.status_code)
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |