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

Improve stealth/ bypass bot detection #55

Open
Rafiot opened this issue Oct 2, 2023 · 2 comments
Open

Improve stealth/ bypass bot detection #55

Rafiot opened this issue Oct 2, 2023 · 2 comments

Comments

@Rafiot
Copy link
Member

Rafiot commented Oct 2, 2023

Give a try to https://github.com/AtuboDad/playwright_stealth

@Rafiot
Copy link
Member Author

Rafiot commented Nov 8, 2023

This one is now implemented, and it helped quite a bit.

Nest step is to use the new headless, which will be the default soon-ish.

There are two approach for that:

if self.browser_name == 'chromium':                        
    launch_settings['ignore_default_args'] = ["--headless"]
    launch_settings['args'] = ["--headless=new"]           

Or running the capture script with the following environment variable: PLAYWRIGHT_CHROMIUM_USE_HEADLESS_NEW=1

As the new headless will be the default relatively soon, implementing all the way from Python capture to the Lookyloo UI via Lacus is a bit of a pain, so the recommandation will be to enable (or not) this variable when running the capture script.

@Rafiot
Copy link
Member Author

Rafiot commented Nov 8, 2023

Cloudflare bypass is tricky, and almost never works.

Let's try with hover: https://playwright.dev/python/docs/api/class-locator#locator-hover

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