我试图绕过的网站是http://results.jntuh.ac.in/在 pi3 上使用 selenium 和 python 拼贴项目需要它,有什么办法可以绕过文本验证码,我可以从 catch 复制文本并粘贴到文本框中!
您可以将该.execute_script()
方法与 JavaScript 片段配对,后者将为您执行此操作。这是通过获取输入验证码的值,然后将其设置为输入字段的值来实现的。
# Execute a script in the browser
browser.execute_script("""
// Set the value of the input to the value of the CAPTCHA text
document.querySelector("#txtInput").value = document.querySelector("#txtCaptcha").value
""")
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句