Skip to content

Instantly share code, notes, and snippets.

@theshahzaibc
Last active January 7, 2021 16:56
Show Gist options
  • Save theshahzaibc/7fb1b3c776a6bda1d4583a761a0bdb65 to your computer and use it in GitHub Desktop.
Save theshahzaibc/7fb1b3c776a6bda1d4583a761a0bdb65 to your computer and use it in GitHub Desktop.
driver.get(URL)
print("Getting Captcha")
g_recaptcha = WebDriverWait(driver, 100).until(EC.presence_of_element_located((By.ID, recaptchaId)))
outerIframe = g_recaptcha.find_element_by_tag_name('iframe')
print("Got captcha")
ActionChains(driver).move_to_element(outerIframe).pause(3).click(outerIframe).perform()
if isBlocked():
sys.exit("Caught/Blocked by Google")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment