Skip to content

Commit 5bd9f74

Browse files
committed
Add another example of bypassing a CAPTCHA
1 parent 5c28009 commit 5bd9f74

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/raw_ahrefs.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from seleniumbase import SB
2+
3+
4+
with SB(uc=True, test=True, locale_code="en") as sb:
5+
url = "https://ahrefs.com/website-authority-checker"
6+
input_field = 'input[placeholder="Enter domain"]'
7+
submit_button = 'span:contains("Check Authority")'
8+
sb.driver.uc_open_with_reconnect(url, 1) # The bot-check is later
9+
sb.type(input_field, "github.com/seleniumbase/SeleniumBase")
10+
sb.driver.reconnect(0.1)
11+
sb.driver.uc_click(submit_button, reconnect_time=4)
12+
sb.wait_for_text_not_visible("Checking", timeout=10)
13+
sb.highlight('p:contains("github.com/seleniumbase/SeleniumBase")')
14+
sb.highlight('a:contains("Top 100 backlinks")')
15+
sb.set_messenger_theme(location="bottom_center")
16+
sb.post_message("SeleniumBase wasn't detected!")

0 commit comments

Comments
 (0)