pydoll
pydoll copied to clipboard
[Feature Request]: Make it work when website has a delay before loading captcha
Checklist before requesting
- [x] I have searched for similar feature requests and didn't find a duplicate.
- [x] I have checked the documentation to confirm this feature doesn't already exist.
Problem Statement
When a website has a delay before loading the cloudflare element, the check/solvers do not work.
Proposed Solution
Not sure
Alternatives Considered
No response
Additional Context
Cannot make it work on this site https://www.planetminecraft.com/account/sign_in/
Importance
Critical (blocking my usage)
Contribution
None
hi @Snewmy, you can pass a timeout parameter to the context manager
hi @Snewmy, you can pass a
timeoutparameter to the context manager
Hi Thalissonvs, I had tried that but with no luck. Does this mean the website might be doing something differently?
I'm sorry, I just checked the website. I'll work on that, thanks for reporting! I see the issue now
I'm sorry, I just checked the website. I'll work on that, thanks for reporting! I see the issue now
No worries. Sorry for my lack of knowledge in this area. I am probably wrong about what is making it not work, but just right about it not working on that certain site. Thanks for the quick support!
Do you know how I could manually solve that captcha? I cant seem to have any luck with looking for the iframe, or even the element directly.
you can click on the div containing the iframe, just add a x_offset on the click method
you can click on the div containing the iframe, just add a x_offset on the click method
i tried from -175x offset, to now -60x offset, going down in jumps of 5, with no luck yet. every click gives an error. it says the div is 350x68.
Hi @Snewmy, I just finished a new release, try this code now with the new version of pydoll:
async def example_with_context_manager():
"""
Example using the context manager approach to handle Cloudflare captcha.
This waits for the captcha to be processed before continuing.
"""
browser = Chrome()
await browser.start()
page = await browser.get_page()
print('Using context manager approach...')
async with page.expect_and_bypass_cloudflare_captcha(
custom_selector=(By.ID, 'TAYH8'), time_before_click=5
):
await page.go_to('https://www.planetminecraft.com/account/sign_in/')
print('Page loaded, waiting for captcha to be handled...')
print('Captcha handling completed, now we can continue...')
await asyncio.sleep(3)
await browser.stop()
print('Using context manager approach...') async with page.expect_and_bypass_cloudflare_captcha( custom_selector=(By.ID, 'TAYH8'), time_before_click=5 ): await page.go_to('https://www.planetminecraft.com/account/sign_in/') print('Page loaded, waiting for captcha to be handled...')
print('Captcha handling completed, now we can continue...') await asyncio.sleep(3) await browser.stop()
Hey, unfortunately this isn't working. The code continues on long before the captcha is even done loading when i set the time to click to 25.
it definitely works on the cloudflare test page you put in the readme. I am not sure why its not working on this certain site im trying.
any follow up on this? mine test was also not working. before the new version, it works fine, after certain point, auto solve cloudflare captcha isnt working anymore
Hi @sn0wjin19 @Snewmy, do you still have problems with cloudflare bypass?