Unable to bypass cloudflare captcha on ahrefs.com using its free dr service (using "seleniumbase")

147 views Asked by At

Here's my code: (I'm using seleniumbase to access the website)

from seleniumbase import SB, Driver
import time 

with SB(uc=True, test=True) as sb:
    url = "https://ahrefs.com/website-authority-checker"
    sb.driver.uc_open_with_reconnect(url, 3)
    sb.type('/html/body/div/div[1]/section[1]/div/div/div/div/div/div[2]/div[2]/div[2]/form/div/div/div[1]/div/input', 'https://www.peopleperhour.com')
    time.sleep(2)
    sb.click('/html/body/div/div[1]/section[1]/div/div/div/div/div/div[2]/div[2]/div[2]/form/div/button')
    time.sleep(10)
    sb.post_message("SeleniumBase wasn't detected", duration=4)

captcha asking me to verify but keeps on going

I'm trying to get some stats related to website strength (dr, backlink, linking_websites) but a cloudflare captcha is in the way, even though I'm using seleniumbase. Here's the video link where I learned about seleniumbase: https://www.youtube.com/watch?v=5dMFI3e85ig

1

There are 1 answers

1
Michael Mintz On

Here's a full SeleniumBase script that works for that page:

from seleniumbase import SB


with SB(uc=True, test=True, locale_code="en") as sb:
    url = "https://ahrefs.com/website-authority-checker"
    sb.driver.uc_open_with_reconnect(url, 4)
    sb.type('input[placeholder="Enter domain"]', "https://www.peopleperhour.com")
    sb.driver.uc_click('span:contains("Check Authority")', reconnect_time=4)

    breakpoint()

Type c and press Enter to continue from the breakpoint().

enter image description here