-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathraw_cf.py
More file actions
23 lines (20 loc) · 745 Bytes
/
raw_cf.py
File metadata and controls
23 lines (20 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""Using CDP Mode to bypass CAPTCHAs in different ways."""
from seleniumbase import SB
with SB(uc=True, test=True, guest=True) as sb:
url = "https://www.cloudflare.com/login"
sb.activate_cdp_mode(url)
sb.sleep(3)
sb.uc_gui_handle_captcha() # PyAutoGUI Tabs + Spacebar
sb.sleep(3)
with SB(uc=True, test=True, guest=True) as sb:
url = "https://www.cloudflare.com/login"
sb.activate_cdp_mode(url)
sb.sleep(4)
sb.uc_gui_click_captcha() # PyAutoGUI mouse click
sb.sleep(3)
with SB(uc=True, test=True, guest=True) as sb:
url = "https://www.cloudflare.com/login"
sb.activate_cdp_mode(url)
sb.sleep(4)
sb.solve_captcha() # CDP Input.dispatchMouseEvent
sb.sleep(3)