Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async def bypass_interstitial() -> None:
- async with AsyncCamoufox(
- headless=False,
- geoip=True,
- humanize=False,
- i_know_what_im_doing=True,
- config={'forceScopeAccess': True}, # add this when creating Camoufox instance
- disable_coop=True # add this when creating Camoufox instance
- ) as browser:
- page = await browser.new_page()
- await page.goto('https://apnews.com/')
- # wait for the page to load completely (could be replaced with a more robust check in a real scenario)
- await asyncio.sleep(5)
- await solve_captcha(page, 'cloudflare', 'interstitial')
- logging.info('Bypass finished')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement