【发布时间】:2021-09-20 14:10:21
【问题描述】:
我正在尝试使用 selenium 在 Twitter 上注册并使用 2captcha API 来解决验证码,但由于某种原因,当单击继续时页面刷新并且没有继续
captchaInput = twitter_driver.find_element_by_id('g-recaptcha-response')
print("Text area set to visible")
twitter_driver.execute_script("arguments[0].setAttribute('style','display:visible;');", captchaInput)
time.sleep(5)
print("Entering captcha token")
captchaInput.send_keys(captcha_token)
time.sleep(5)
button_click = "javascript:document.getElementById('continue_button').click();"
twitter_driver.execute_script(button_click)
【问题讨论】:
标签: python python-3.x selenium selenium-webdriver 2captcha