How to bypass ReCaptcha with buster extension using Selenium and Python(如何使用Selify和Python绕过带有Buster扩展的ReCaptcha)
本文介绍了如何使用Selify和Python绕过带有Buster扩展的ReCaptcha的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前,我使用Selify自动化了一些流程,需要解决Google ReCaptcha。用来解决ReCaptcha的技术是浏览器,即插件Buster。我使用以下内容进入Google ReCaptcha
driver.switch_to.frame(driver.find_elements_by_tag_name("iframe")[0])
check_box = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "recaptcha-anchor")))
check_box.click()
现在我使用以下命令切换回默认帧:
driver.switch_to.default_content()
所以我需要单击Buster图标,但如何操作?
点击图标:
推荐答案
Buster图标在另一个同级<iframe>
中。因此,您必须:
切换回default_content()。
诱导WebDriverWait使所需的帧可用并切换到它。
诱导WebDriverWait使所需的元素可单击。
您可以使用以下Locator Strategies:
代码块:
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC driver.switch_to.default_content() WebDriverWait(driver, 10).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR,"//iframe[@title="cmVjYXB0Y2hhIGNoYWxsZW5nZQ=="]"))) WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//button[@id='solver-button']"))).click()
浏览器快照:
参考
您可以在以下位置找到几个相关讨论:
- How to interact with the reCAPTCHA audio element using Selenium and Python
- How to send text to the Password field within https://mail.protonmail.com registration page?
OUTIO
Ways to deal with #document under iframe
这篇关于如何使用Selify和Python绕过带有Buster扩展的ReCaptcha的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:如何使用Selify和Python绕过带有Buster扩展的ReCaptcha
猜你喜欢
- 使用公司代理使Python3.x Slack(松弛客户端) 2022-01-01
- 使用 Cython 将 Python 链接到共享库 2022-01-01
- 我如何透明地重定向一个Python导入? 2022-01-01
- 检查具有纬度和经度的地理点是否在 shapefile 中 2022-01-01
- 如何使用PYSPARK从Spark获得批次行 2022-01-01
- YouTube API v3 返回截断的观看记录 2022-01-01
- ";find_element_by_name(';name';)";和&QOOT;FIND_ELEMENT(BY NAME,';NAME';)";之间有什么区别? 2022-01-01
- 计算测试数量的Python单元测试 2022-01-01
- 我如何卸载 PyTorch? 2022-01-01
- CTR 中的 AES 如何用于 Python 和 PyCrypto? 2022-01-01