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

[新功能] 提供 curl_cffi 作为请求发送工具 #877

Open
cubesky opened this issue Jan 9, 2025 · 0 comments
Open

[新功能] 提供 curl_cffi 作为请求发送工具 #877

cubesky opened this issue Jan 9, 2025 · 0 comments
Labels
anti-spider 反爬相关

Comments

@cubesky
Copy link

cubesky commented Jan 9, 2025

在使用 User 下的 get_user_info 时发现一直触发风控,但浏览器访问(隐私模式下)却不会触发风控

使用 GET https://api.bilibili.com/x/frontend/finger/spi 进行手动测试时发现,Python 的 requests urllib3 等库即使添加 Cookies 和 WBI 以及 UA 参数均会触发风控。

经过搜索后 Stackoverflow 中的一篇回答 https://stackoverflow.com/questions/60407057/python-requests-being-fingerprinted 说明其有可能使用了浏览器指纹识别。根据回答内的方案使用 curl_cffi 模拟浏览器的 TLS 指纹,可以成功访问。

image

希望可以自己设置使用的 http 请求库或者提供对应接口回调以适配各种请求库

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anti-spider 反爬相关
Projects
None yet
Development

No branches or pull requests

2 participants