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

WebView based cloudflare interceptor #456

Merged
merged 5 commits into from
Dec 4, 2022
Merged

Conversation

AriaMoradi
Copy link
Member

@AriaMoradi AriaMoradi commented Dec 4, 2022

@AriaMoradi AriaMoradi requested a review from Syer10 December 4, 2022 01:28
@AriaMoradi
Copy link
Member Author

AriaMoradi commented Dec 4, 2022

Actually doesn't seem to be closing #323 also doesn't work on nhentai either, looks like these extensions are setting their own user agent and it conflicts with the one from playwright hence Tachidesk can't pass cf.

We need a way to suppress the behavior?

also HttpSource.DEFAULT_USER_AGENT should probably be set by playwright on runtime?

@Syer10
Copy link
Collaborator

Syer10 commented Dec 4, 2022

Is there a reason we can't use the extension UA in playwright?

1. Make sure to .use all closeable resources
2. Use 10 seconds instead of 1 second for waiting for cloudflare(this was the most probable issue)
3. Use Extension UA when possible
4. Minor cleanup of logging
Copy link
Collaborator

@Syer10 Syer10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was able to get it working

@Syer10
Copy link
Collaborator

Syer10 commented Dec 4, 2022

It works with LaunchOptions().setHeadless(true) as well, we could have it true by default, and have a endpoint that launches it in case it fails because of a captcha?

@AriaMoradi AriaMoradi merged commit f47dc6b into master Dec 4, 2022
@AriaMoradi AriaMoradi deleted the cloudflare-bypass branch December 4, 2022 08:39
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

Successfully merging this pull request may close these issues.

[Bug] Extension WebtoonXYZ is not working
2 participants