0

There are two types of cloudflare protection on the site: the first is at the entrance to the site, and the second is a check mark I'm not a robot that occurs when using different functions of the site. I bypassed the first protection using seleniumbase (using stealth or pure uc-chromedriver did not help me). And I cannot bypass the second protection with a tick. If I myself open a new tab in seleniumbase and go to the site, then I can get through, but if seleniumbase at least opens a new tab or closes the old one, or even just gets a list of tabs, and I go to the site myself, then it's still an error in this recaptcha

Artik gnom
  • 25
  • 1
  • 7

3 Answers3

1

Aak a person to do the act. There are plenty cheap unqualified labor workers in poor countries. There are labor aggregators which provide access to that labor via an API. It would be a bit tricky to pass session key around, but doable.

Basilevs
  • 22,440
  • 15
  • 57
  • 102
0

There is a reason the site implements a CAPTCHA. Do not try to bypass it, if they offer an API use that, otherwise you are out of luck.

Jack
  • 21
  • 2
0

Sounds like you figured out Part One, which is getting through the front door to any site undetected. Eg:

from seleniumbase import Driver
import time

driver = Driver(uc=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(6)
driver.quit()

Or even: SeleniumBase/examples/raw_uc_mode.py

from seleniumbase import SB

with SB(uc=True) as sb:
    sb.open("https://nowsecure.nl/#relax")
    sb.sleep(3)
    if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
        sb.get_new_driver(undetectable=True)
        sb.open("https://nowsecure.nl/#relax")
        sb.sleep(3)
    sb.assert_text("OH YEAH, you passed!", "h1", timeout=3)

The next part is really dependent on the site. One way is by using the with block with the driver as a special way to disconnect the driver from the browser for a few seconds during an action:

with SB(uc=True) as sb:
    sb.open(URL)
    with sb.driver:
        sb.click(CSS_SELECTOR)

but much of it depends on the site. The more reliable way is to combine https://github.com/asweigart/pyautogui actions after you've already used SeleniumBase to get through the front door. (See that documentation for specific info.)

But if you just need to get into a site (for scraping it and not necessarily performing actions) then SeleniumBase UC Mode gets the job done. Some sites only try to detect Selenium at the front door (when you first enter), so you might not need anything else if that's the case.

Michael Mintz
  • 9,007
  • 6
  • 31
  • 48