Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #..
- # inject the solved CAPTCHA solution into the page and click Submit button
- await page.evaluate('''(solution) => {
- document.getElementById('g-recaptcha-response').innerHTML = solution;
- }''', solution)
- # Click the submit button
- await page.click('#recaptcha-demo-submit')
- # take screenshot
- await page.screenshot({'path': 'solved.png'})
- # Close the browser
- await browser.close()
- asyncio.get_event_loop().run_until_complete(main())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement