Python Forum
Parsing html page and working with checkbox (on a captcha)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parsing html page and working with checkbox (on a captcha)
#18
(Feb-04-2021, 01:16 PM)straannick Wrote: Try to open link manually, check captcha checkbox, press button and you'll see "check is successfull".
No need for Buster solver. But your code provoke (execute_script) all those buster pictures!
In my example no buster, I need only check captcha checkbox - when I do it manually.
There is usually no need when do it yourself in browser.
There is a difference when try from Selenium,then dos then Buster solver always show up.
That why you see i try different stuff to hide that i use Selenium.

So if fix your code that do work,you will see that the Buster solver pop up.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
import time

#--| Setup
options = Options()
#options.add_argument("--headless")
#options.add_argument('--log-level=3')
# Your path to chromedriver.exe most be in Windows environment Path or same folder as run script
driver = webdriver.Chrome(executable_path=r'C:\cmder\bin\chromedriver.exe', options=options)
#--| Parse or automation
driver.get('https://www.google.com/recaptcha/api2/demo')
time.sleep(2)
# Switch to recaptcha frame
frames = driver.find_elements_by_tag_name("iframe")
driver.switch_to.frame(frames[0])
time.sleep(2)
# Click on checkbox to activate recaptcha,Buster pop up
driver.find_element_by_class_name("recaptcha-checkbox-border").click()
Reply


Messages In This Thread
RE: Parsing html page and working with checkbox (on a captcha) - by snippsat - Feb-04-2021, 02:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Disable checkbox of google maps markers/labels using selenium erickkill 0 1,306 Nov-25-2021, 12:20 PM
Last Post: erickkill
  <title> django page title dynamic and other field (not working) lemonred 1 2,153 Nov-04-2021, 08:50 PM
Last Post: lemonred
  Automating Captcha form submission with Mechanize Dexty 2 3,372 Aug-03-2021, 01:02 PM
Last Post: Dexty
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,749 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Saving html page and reloading into selenium while developing all xpaths Larz60+ 4 4,273 Feb-04-2021, 07:01 AM
Last Post: jonathanwhite1
  API auto-refresh on HTML page using Flask toc 2 11,968 Dec-23-2020, 02:00 PM
Last Post: toc
  Selenium Parsing (unable to Parse page after loading) oneclick 7 6,139 Oct-30-2020, 08:13 PM
Last Post: tomalex
  Help: Beautiful Soup - Parsing HTML table ironfelix717 2 2,763 Oct-01-2020, 02:19 PM
Last Post: snippsat
  [FLASK] checkbox onclick event Mad0ck 2 4,964 May-14-2020, 09:35 AM
Last Post: Mad0ck
  Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to loop to next HTML/new CSV Row BrandonKastning 0 2,420 Mar-22-2020, 06:10 AM
Last Post: BrandonKastning

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020