1

so I want to scrape a website, but there's a problem, whenever I try to enter the website, there is a "click & hold" captcha, which I cannot solve. enter image description here

I already add these arguments in my code

option.add_argument('--profile-directory=Default')
option.add_argument("--incognito")
option.add_argument("--disable-plugins-discovery")
option.add_argument("--start-maximized")
option.add_argument('--ignore-certificate-errors')
option.add_argument('--allow-running-insecure-content')
option.add_argument("--disable-extensions")
option.add_argument("--proxy-server='direct://'")
option.add_argument("--proxy-bypass-list=*")
option.add_argument('--disable-dev-shm-usage')
option.add_argument('--no-sandbox')

I already tried to solve the captcha using actionchain in selenium, but there is no indication that the button is clicked.

element = browser.find_element_by_css_selector('#px-captcha')
action = ActionChains(browser)
action.click_and_hold(element).perform()
time.sleep(14)
action.release(element).perform()
time.sleep(0.2)
action.release(element)

anyone knows how to solve this using selenium, not pyautogui?

the website that I'm trying to enter: https://www.chegg.com/study

1 Answers1

0

One can also use Chromedriver Undetected.. Quite simple to integrate

pip install undetected-chromedriver

You can follow the below git link for setup. https://github.com/ultrafunkamsterdam/undetected-chromedriver

import undetected_chromedriver as uc
driver = uc.Chrome()
driver.get('https://www.example.com')