Skip to content

Commit fccc3f5

Browse files
committed
Update the docs
1 parent fba6658 commit fccc3f5

File tree

3 files changed

+16
-46
lines changed

3 files changed

+16
-46
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@
5454
<br />
5555
</p>
5656

57-
<p>SeleniumBase is a browser automation framework for the modern web. Both new and experienced Python users alike can easily get started. With special stealth features like UC Mode and CDP Mode, you'll be evading bot-detection and bypassing CAPTCHAs in minutes.</p>
57+
<p>SeleniumBase is a browser automation framework that empowers software teams to innovate faster and handle modern web challenges with ease. With stealth options like CDP Mode, you'll avoid the usual restrictions imposed by websites deploying bot-detection services.</p>
5858

5959
--------
6060

6161
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
6262

63-
🐙 Stealth modes: <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> and <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> help you evade bot-detection.
63+
🐙 Stealth modes: <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b></a> and <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> can bypass bot-detection, solve CAPTCHAs, and call advanced methods from the <a href="https://chromedevtools.github.io/devtools-protocol/" translate="no">Chrome Devtools Protocol</a>.
6464

65-
ℹ️ Most scripts run with raw <code translate="no"><b>python</b></code>, although some scripts use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
65+
ℹ️ Many examples run with raw <code translate="no"><b>python</b></code>, although some use <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> that expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
6666

6767
--------
6868

examples/cdp_mode/ReadMe.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) CDP Mode 🐙
44

5-
🐙 <b translate="no">SeleniumBase</b> <b translate="no">CDP Mode</b> is a stealth mode of SeleniumBase that uses the <a href="https://chromedevtools.github.io/devtools-protocol/" translate="no"><span translate="no">Chrome Devtools Protocol</span></a> (via <a href="https://github.com/mdmintz/MyCDP" translate="no"><span translate="no">MyCDP</span></a>) to control the web browser. <b translate="no">CDP Mode</b> can be used either as a subset of <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md" translate="no"><span translate="no">SeleniumBase UC Mode</span></a></b>, or via <b><a href="#Pure_CDP_Mode" translate="no">Pure CDP Mode</a></b> (<code>sb_cdp</code>), which doesn't use WebDriver at all, and has a slightly different setup.
5+
🐙 <b translate="no">SeleniumBase</b> <b translate="no">CDP Mode</b> is a stealth mode of SeleniumBase that uses the <a href="https://chromedevtools.github.io/devtools-protocol/" translate="no">Chrome Devtools Protocol</a> (via <a href="https://github.com/mdmintz/MyCDP" translate="no"><span translate="no">MyCDP</span></a>) to control the web browser. <b translate="no">CDP Mode</b> can be used either as a subset of <b><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md" translate="no"><span translate="no">SeleniumBase UC Mode</span></a></b>, or via <b><a href="#Pure_CDP_Mode" translate="no">Pure CDP Mode</a></b> (<code>sb_cdp</code>), which doesn't use WebDriver at all, and has a slightly different setup.
66

77
--------
88

@@ -55,6 +55,7 @@ with SB(uc=True, test=True, locale="en") as sb:
5555
sb.activate_cdp_mode(url)
5656
sb.sleep(2)
5757
sb.solve_captcha()
58+
sb.sleep(2)
5859
```
5960

6061
<img src="https://seleniumbase.github.io/other/cf_sec.jpg" title="SeleniumBase" width="332"> <img src="https://seleniumbase.github.io/other/gitlab_bypass.png" title="SeleniumBase" width="288">
@@ -63,7 +64,7 @@ with SB(uc=True, test=True, locale="en") as sb:
6364

6465
--------
6566

66-
`sb.cdp.gui_click_element(selector)` lets you click on elements using `PyAutoGUI`. Example:
67+
You can also use `PyAutoGUI` to click on elements with the mouse by calling `sb.cdp.gui_click_element(selector)`. Example:
6768

6869
```python
6970
from seleniumbase import SB
@@ -86,7 +87,7 @@ Eg. `sb.cdp.gui_click_element("#turnstile-widget div")`
8687

8788
In most cases, `sb.solve_captcha()` is good enough for CF Turnstiles without needing `sb.cdp.gui_click_element(selector)`. (See [SeleniumBase/examples/cdp_mode/raw_planetmc.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_planetmc.py))
8889

89-
ℹ️ Note that `PyAutoGUI` is an optional dependency. If calling a method that uses it when not already installed, then `SeleniumBase` installs `PyAutoGUI` at run-time.
90+
ℹ️ Note that `PyAutoGUI` is an optional dependency. If calling a method that uses it when not already installed, then `SeleniumBase` installs `PyAutoGUI` at runtime.
9091

9192
--------
9293

help_docs/uc_mode.md

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
👤 <b translate="no">SeleniumBase</b> <b translate="no">UC Mode</b> (Undetected-Chromedriver Mode) allows bots to appear human, which lets them evade detection from anti-bot services that try to block them or trigger CAPTCHAs on various websites.
66

7-
> #### (For the successor to default UC Mode, see **[CDP Mode 🐙](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md)**)
7+
> ### (For the successor to plain UC Mode, see **[CDP Mode 🐙](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md)**)
88
99
---
1010

@@ -28,11 +28,7 @@
2828

2929
----
3030

31-
👤 <b translate="no">UC Mode</b> is based on [undetected-chromedriver](https://github.com/ultrafunkamsterdam/undetected-chromedriver). <span translate="no">UC Mode</span> includes multiple updates, fixes, and improvements, such as:
32-
33-
* Automatically changing user-agents to prevent detection.
34-
* Automatically setting various Chromium args as needed.
35-
* Has special `uc_*()` methods for bypassing CAPTCHAs.
31+
👤 <b translate="no">UC Mode</b> is based on [undetected-chromedriver](https://github.com/ultrafunkamsterdam/undetected-chromedriver). <span translate="no">UC Mode</span> includes multiple updates, fixes, and improvements, such as having special <code>uc_*()</code> methods for bypassing CAPTCHAs.
3632

3733
👤 Here's a simple example with the <b><code translate="no">Driver</code></b> manager:
3834

@@ -110,10 +106,10 @@ with SB(uc=True, test=True, incognito=True, locale="en") as sb:
110106
submit_button = 'span:contains("Check Authority")'
111107
sb.uc_open_with_reconnect(url) # The bot-check is later
112108
sb.type(input_field, "github.com/seleniumbase/SeleniumBase")
113-
sb.reconnect(0.1)
114-
sb.uc_click(submit_button, reconnect_time=4)
109+
sb.uc_click(submit_button, reconnect_time=3.25)
115110
sb.uc_gui_click_captcha()
116-
sb.wait_for_text_not_visible("Checking", timeout=12)
111+
sb.wait_for_text_not_visible("Checking", timeout=15)
112+
sb.click_if_visible('button[data-cky-tag="close-button"]')
117113
sb.highlight('p:contains("github.com/seleniumbase/SeleniumBase")')
118114
sb.highlight('a:contains("Top 100 backlinks")')
119115
sb.set_messenger_theme(location="bottom_center")
@@ -122,20 +118,6 @@ with SB(uc=True, test=True, incognito=True, locale="en") as sb:
122118

123119
<img src="https://seleniumbase.github.io/other/ahrefs_bypass.png" title="SeleniumBase" width="540">
124120

125-
👤 Here, <b>the CAPTCHA appears after clicking to go to the sign-in screen</b>:
126-
127-
```python
128-
from seleniumbase import SB
129-
130-
with SB(uc=True, test=True, ad_block=True) as sb:
131-
url = "https://www.thaiticketmajor.com/concert/"
132-
sb.uc_open_with_reconnect(url, 6.111)
133-
sb.uc_click("button.btn-signin", 4.1)
134-
sb.uc_gui_click_captcha()
135-
```
136-
137-
<img src="https://seleniumbase.github.io/other/ttm_bypass.png" title="SeleniumBase" width="540">
138-
139121
--------
140122

141123
👤 <b>On Linux</b>, use `sb.uc_gui_click_captcha()` to handle CAPTCHAs (Cloudflare Turnstiles):
@@ -169,41 +151,28 @@ The 2nd <code translate="no">print()</code> should output <code translate="no">V
169151

170152
### 👤 Here are some examples that use UC Mode:
171153
* [SeleniumBase/examples/verify_undetected.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/verify_undetected.py)
172-
* [SeleniumBase/examples/raw_bing_captcha.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_bing_captcha.py)
154+
* [SeleniumBase/examples/raw_turnstile.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_turnstile.py)
155+
* [SeleniumBase/examples/raw_form_turnstile.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_form_turnstile.py)
173156
* [SeleniumBase/examples/raw_uc_mode.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_uc_mode.py)
174-
* [SeleniumBase/examples/raw_cf.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_cf.py)
157+
158+
<img src="https://seleniumbase.github.io/other/cf_bypass.png" title="SeleniumBase" width="260">
175159

176160
--------
177161

178162
👤 Here's an example where <b><code translate="no">incognito=True</code> is needed for bypassing detection</b>:
179163

180-
* [SeleniumBase/examples/raw_pixelscan.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_pixelscan.py)
181-
182164
```python
183165
from seleniumbase import SB
184166

185167
with SB(uc=True, incognito=True, test=True) as sb:
186168
sb.driver.uc_open_with_reconnect("https://pixelscan.net/", 10)
187-
sb.remove_elements("jdiv") # Remove chat widgets
188-
sb.highlight("span.text-success", loops=8)
189-
sb.highlight(".bot-detection-context", loops=10, scroll=False)
190169
sb.sleep(2)
191170
```
192171

193172
<img src="https://seleniumbase.github.io/other/pixelscan.jpg" title="SeleniumBase" width="540">
194173

195174
--------
196175

197-
### 👤 Here are some UC Mode examples that bypass CAPTCHAs when clicking is required:
198-
* [SeleniumBase/examples/raw_pyautogui.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_pyautogui.py)
199-
* [SeleniumBase/examples/raw_turnstile.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_turnstile.py)
200-
* [SeleniumBase/examples/raw_form_turnstile.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_form_turnstile.py)
201-
* [SeleniumBase/examples/uc_cdp_events.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/uc_cdp_events.py)
202-
203-
<img src="https://seleniumbase.github.io/other/cf_bypass.png" title="SeleniumBase" width="260">
204-
205-
--------
206-
207176
### 👤 Here are the SeleniumBase UC Mode methods: (**`--uc`** / **`uc=True`**)
208177

209178
```python

0 commit comments

Comments
 (0)