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

请问最近会有登陆的问题吗? #44

Closed
ihanwen99 opened this issue Aug 31, 2023 · 6 comments
Closed

请问最近会有登陆的问题吗? #44

ihanwen99 opened this issue Aug 31, 2023 · 6 comments
Assignees

Comments

@ihanwen99
Copy link
Contributor

RT

@JiayangWu
Copy link
Owner

是的,一直返回错误代码500。 详见 Issue #37

@ihanwen99
Copy link
Contributor Author

感谢回复。经过实验我发现使用 cookie 登陆可以稳定建立连接。使用如下的header即可。

headers = {'User-Agent': user_agent, 'Referer': sign_in_url, 'Cookie': COOKIES, 'Connection': 'keep-alive'}

我在我的 crawler 里面实现了这个功能 LeetCode-CN-Crawler :)

@ihanwen99
Copy link
Contributor Author

如果可以,我可以提交一个PR尝试实现这个功能。希望成为 contributor :)

@JiayangWu
Copy link
Owner

如果可以,我可以提交一个PR尝试实现这个功能。希望成为 contributor :)

欢迎欢迎!

@ihanwen99
Copy link
Contributor Author

The cookie interface is implemented in #45 :)

@JiayangWu
Copy link
Owner

PR已经merge,感谢贡献!

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

2 participants