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

waiting for get_by_role("checkbox", name="I'm not a robot") #6

Closed
rastarr opened this issue Jan 27, 2023 · 8 comments · Fixed by #7
Closed

waiting for get_by_role("checkbox", name="I'm not a robot") #6

rastarr opened this issue Jan 27, 2023 · 8 comments · Fixed by #7
Labels
bug Something isn't working question Further information is requested

Comments

@rastarr
Copy link

rastarr commented Jan 27, 2023

testing recaptcha v2 and getting 'waiting for get_by_role("checkbox", name="I'm not a robot")' errors
Is there a solution for this available?

@Xewdy444 Xewdy444 linked a pull request Jan 27, 2023 that will close this issue
@Xewdy444
Copy link
Owner

Test this branch to see if this has fixed the issue:

pip install git+https://github.com/Xewdy444/Playwright-reCAPTCHA.git@6-waiting-for-get_by_rolecheckbox-name=im-not-a-robot

@rastarr
Copy link
Author

rastarr commented Jan 27, 2023

Well, unsure if it is working actually
Got the same error when testing against https://votreassistantprive.fr/forum/login

@Xewdy444
Copy link
Owner

It looks like this website is using reCAPTCHA v2 invisible for the "Learn More" > "Contact Us" form. In order to use this solver with this page, you must first fill out the information on the form and click the "Send" button in order for the reCAPTCHA to show. Then, you can call the solve_recaptcha() method to solve this reCAPTCHA.

@rastarr
Copy link
Author

rastarr commented Jan 28, 2023

@Xewdy444 OK thank you so much for that.
BTW can I pass a proxy IP in some way to be used by the solver?

@Xewdy444
Copy link
Owner

Xewdy444 commented Jan 28, 2023

Yes, you can pass a proxy to be used by the browser like this:

With Authentication

browser = playwright.chromium.launch(
    proxy={
        "server": "http://1.1.1.1:3128",
        "username": "username",
        "password": "password",
    }
)

Without Authentication

browser = playwright.chromium.launch(proxy={"server": "http://1.1.1.1:3128"})

@rastarr
Copy link
Author

rastarr commented Jan 28, 2023

@Xewdy444 TypeError: launch() takes 1 positional argument but 2 were given

@rastarr
Copy link
Author

rastarr commented Jan 28, 2023

Answer. need to include proxy= parmeter

browser = await chromium.launch(proxy={
"server": "http://myproxy.com:3128",
"username": "usr",
"password": "pwd"
})

@Xewdy444
Copy link
Owner

Xewdy444 commented Jan 28, 2023

Sorry about that. I initially forgot to include proxy= in my example.

@Xewdy444 Xewdy444 added bug Something isn't working question Further information is requested labels Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants