Skip to content

Allow custom http header configs depending on the browser #27

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

Conversation

paveldudka
Copy link
Contributor

@paveldudka paveldudka commented Nov 16, 2024

Firefox crashes when proxy is in use and chrome headers are specified.
Adding ability to control what kind of headers we want depending on the browser

Looks roughly like this:

async with async_playwright() as playwright, await playwright.firefox.launch(
        headless=False,
    ) as browser:
        context = await browser.new_context( )
        page = await context.new_page()
        await stealth_async(page, config=StealthConfig(browser_type=BrowserType.FIREFOX))
        await page.goto("https://bot.sannysoft.com/")

@paveldudka paveldudka marked this pull request as ready for review November 16, 2024 00:57
Copy link
Contributor

@TinyGambe TinyGambe left a comment

Choose a reason for hiding this comment

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

LGTM

@paveldudka paveldudka merged commit 8ad9521 into main Nov 16, 2024
6 checks passed
@paveldudka paveldudka deleted the pasha/tf-4450-tf-playwright-stealth-add-ability-to-specify-browser branch November 16, 2024 20:43
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.

2 participants