rebrowser / rebrowser-patches

Collection of patches for puppeteer and playwright to avoid automation detection and leaks. Helps to avoid Cloudflare and DataDome CAPTCHA pages. Easy to patch/unpatch, can be enabled/disabled on demand.
https://rebrowser.net
285 stars 25 forks source link

playwright python import #26

Closed danofun closed 3 weeks ago

danofun commented 3 weeks ago

Thank you for taking the time to develop this excellent piece of software!

Trying to test and I'm not seeing how to call the patch For example, undetected_playwright uses: from undetected_playwright.sync_api import sync_playwright

The example on your project shows: from playwright.sync_api import sync_playwright but after installing rebrowser-playwright, the unpatched playwright appears to be unaffected by this package. Testing on MacOS

nwebson commented 3 weeks ago

The package name is rebrowser_playwright, so try to use from rebrowser_playwright.sync_api import sync_playwright

danofun commented 3 weeks ago

The package name is rebrowser_playwright, so try to use from rebrowser_playwright.sync_api import sync_playwright

Appreciate the reply. I was trying from rebrowser-playwright.sync_api import sync_playwright Your solution worked. Thank you.

nwebson commented 3 weeks ago

Thanks for reporting, I'm glad 🙏