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

Cloudflare 拦截 #1

Open
askmenow opened this issue Mar 6, 2024 · 0 comments
Open

Cloudflare 拦截 #1

askmenow opened this issue Mar 6, 2024 · 0 comments

Comments

@askmenow
Copy link

askmenow commented Mar 6, 2024

我也是自用6.6.7, 凑合在改代码没细看
javbus在请求的时候会被Cloudflare识别为异常请求, 会弹出验证框
增加一些请求头他就不拦截了. 目前我这测试是正常的.

scrapinglib\javbus.py:

# todo Cloudflare  会因为没因为请求头数据量太少, 弹出要求验证,
def extraInit(self):
    self.extraheader = {"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
                        "Accept-Language":"zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2"}
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

1 participant