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='recaptcha challenge']"))) 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
基础教程推荐
猜你喜欢
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
