Closed LipeTadeu closed 8 months ago
What version of Playwright are you using and what website are you using? I tried an example with Chromium and it solved it with no issues:
from playwright.sync_api import sync_playwright
from playwright_recaptcha import recaptchav2
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=False)
page = browser.new_page()
page.goto("https://www.google.com/recaptcha/api2/demo")
with recaptchav2.SyncSolver(page) as solver:
token = solver.solve_recaptcha(wait=True)
print(token)
Hello! All is well?
Here it doesn't really run using Chrome, it only runs if headless=True.
I'm using version playwright==1.33.0
Which one do you run on your machine?
Try updating Playwright to the latest version with the command: pip install -U playwright
and see if this fixes the issue.
Hello! All is well? Find out what it was, the error was language, I switched the browser to English and it ran perfectly. Thank you very much.
It looked like this:
from playwright.sync_api import sync_playwright from playwright_recaptcha import recaptchav2
with sync_playwright() as playwright: browser = playwright.chromium.launch(headless=False) context = browser.new_context(locale="en-US") page = context.new_page() page.goto("https://www.google.com/recaptcha/api2/demo")
with recaptchav2.SyncSolver(page) as solver:
token = solver.solve_recaptcha(wait=True)
print(token)
Glad to see that you fixed the issue. This library currently supports English and Russian reCAPTCHA, however I could add support for your language as well if you don't mind telling me what it is.
Hello! Wow, that's great, I don't mind. I'm Brazilian, Brazilian Portuguese. I would appreciate it if you could give me your email, I would like to make you a development proposal.
Yea sure, my contact information is on my GitHub profile.
Hi, how are you? Do you know why it doesn't run in Chrome when we use headless=False?
example:
with sync_playwright() as playwright: browser = playwright.chromium.launch(headless=False)
He opens the browser but does not resolve recaptcha and does not even click on recaptcha.
That doesn't work either.
with sync_playwright() as playwright: browser = playwright.chromium.launch(channel='chrome',headless=False)
only works in Firefox.
Thank.