Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于爬取豆瓣网第一步获取请求失败的原因(我认为的)及解决方法 #74

Open
taojunyan opened this issue Apr 7, 2024 · 2 comments

Comments

@taojunyan
Copy link

response = requests.get(url, headers=headers)将response对照改成上面的样子即可,原因:我认为应该是发送的user—Agent没有被正确收到导致url拒绝了我们的请求,加上这个可以确保收到.

@Tany99
Copy link

Tany99 commented Apr 7, 2024 via email

1 similar comment
@bearbeers
Copy link

bearbeers commented Apr 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants