Skip to content

Commit 1ea236d

Browse files
committed
Update the ReadMe
1 parent c6d82f0 commit 1ea236d

1 file changed

Lines changed: 24 additions & 26 deletions

File tree

README.md

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/nice_logo_8t.png" alt="SeleniumBase" width="424" /></a></p>
1111

12-
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
13-
1412
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://pepy.tech/projects/seleniumbase?timeRange=threeMonths&category=version&includeCIDownloads=true&granularity=daily&viewType=line&versions=*" target="_blank"><img src="https://static.pepy.tech/badge/seleniumbase" alt="SeleniumBase PyPI downloads" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-22BBCC.svg" title="SeleniumBase" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/Tests/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://www.youtube.com/@MichaelMintz"><img src="https://img.shields.io/youtube/channel/subscribers/UCSQElO8vQmNPuTgdd83BHdw?style=flat&logo=youtube&logoColor=white&label=YouTube%20Subscribers&color=red" alt="YouTube Subscribers"></a></p>
1513

14+
<p align="center" class="hero__title"><b>All-in-one Browser Automation Framework:<br />Web Crawling / Testing / Scraping / Stealth</b></p>
15+
1616
<p align="center">
1717
<a href="#python_installation">🚀 Start</a> |
1818
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🏰 Features</a> |
@@ -54,7 +54,7 @@
5454

5555
🎭 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md"><b><span translate="no">Stealthy Playwright Mode</span></b></a> extends CDP Mode's stealth to <b>Playwright</b>.
5656

57-
<b>📝 Here's a Python example of SeleniumBase's CDP Mode using <code>sb_cdp</code>:</b>
57+
<b>📝 Here's a Python example that uses <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md#-pure-cdp-mode-sb_cdp">Pure CDP Mode</a> (<code>sb_cdp</code>):</b>
5858

5959
```python
6060
from seleniumbase import sb_cdp
@@ -70,7 +70,7 @@ sb.quit()
7070
<br><em>BrowserScan Test Results: Normal (No bots detected)</em>
7171
</p>
7272

73-
<b>🎭 Here's a Playwright example that uses SeleniumBase's stealth:</b>
73+
<b>🎭 Here's an example script that uses <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md"><span translate="no">Stealthy Playwright Mode</span></a>:</b>
7474

7575
```python
7676
from playwright.sync_api import sync_playwright
@@ -88,6 +88,18 @@ sb.sleep(3)
8888
sb.quit()
8989
```
9090

91+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_yc_news.py" target="_blank">This example</a> scrapes Hacker News listings:</b></p>
92+
93+
```python
94+
from seleniumbase import sb_cdp
95+
96+
url = "https://news.ycombinator.com/submitted?id=seleniumbase"
97+
sb = sb_cdp.Chrome(url)
98+
elements = sb.find_elements("span.titleline > a")
99+
for element in elements:
100+
print("* " + element.text)
101+
```
102+
91103
--------
92104

93105
📚 The [SeleniumBase/examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder includes over 150 ready-to-run examples of E2E testing. Examples that start with `test_` or end with `_test.py`/`_tests.py` run with `pytest`. Other examples run directly with raw `python` (those generally start with `raw_` to avoid confusion).
@@ -107,7 +119,7 @@ sb.quit()
107119

108120
--------
109121

110-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_browserscan.py" target="_blank">This example</a> verifies that <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md#-pure-cdp-mode-sb_cdp">Pure CDP Mode</a> is stealthy on <a href="https://www.browserscan.net/bot-detection">BrowserScan</a>:
122+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_browserscan.py" target="_blank">This example</a> verifies that <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md#-pure-cdp-mode-sb_cdp">Pure CDP Mode</a> is stealthy on <a href="https://www.browserscan.net/bot-detection">BrowserScan</a>:</b></p>
111123

112124
```python
113125
from seleniumbase import sb_cdp
@@ -125,7 +137,7 @@ sb.flash('strong:contains("Normal")', pause=1)
125137
<br><em>All BrowserScan bot-detection checks were passed successfully.</em>
126138
</p>
127139

128-
🎭 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/raw_browserscan_sync.py">This example</a> shows the drop-in patch that makes Playwright stealthy:
140+
<p align="left"><b>🎭 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/raw_browserscan_sync.py">This example</a> shows the drop-in patch that makes Playwright stealthy:</b></p>
129141

130142
```python
131143
from playwright.sync_api import sync_playwright
@@ -168,21 +180,7 @@ sb = sb_cdp.Chrome(url, use_chromium=True)
168180

169181
--------
170182

171-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_yc_news.py" target="_blank">This example</a> scrapes Hacker News listings with <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md#-pure-cdp-mode-sb_cdp">Pure CDP Mode</a>:
172-
173-
```python
174-
from seleniumbase import sb_cdp
175-
176-
url = "https://news.ycombinator.com/submitted?id=seleniumbase"
177-
sb = sb_cdp.Chrome(url)
178-
elements = sb.find_elements("span.titleline > a")
179-
for element in elements:
180-
print("* " + element.text)
181-
```
182-
183-
--------
184-
185-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py" target="_blank">This example</a> saves Google Search results with UC + CDP Mode:<br />(Results are saved as PDF, HTML, and PNG files)</p>
183+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py" target="_blank">This example</a> saves Google Search results with UC + CDP Mode:</b><br />(Results are saved as PDF, HTML, and PNG files)</p>
186184

187185
```python
188186
from seleniumbase import SB
@@ -203,7 +201,7 @@ with SB(uc=True, test=True) as sb:
203201

204202
--------
205203

206-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py" target="_blank">This example</a> bypasses Cloudflare's challenge page with UC + CDP Mode:
204+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_gitlab.py" target="_blank">This example</a> bypasses Cloudflare's challenge page with UC + CDP Mode:</b></p>
207205

208206
```python
209207
from seleniumbase import SB
@@ -227,7 +225,7 @@ with SB(uc=True, test=True, locale="en") as sb:
227225

228226
----
229227

230-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_gitlab.py" target="_blank">This example</a> handles a CAPTCHA page with Pure CDP Mode:
228+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_gitlab.py" target="_blank">This example</a> handles a CAPTCHA page with Pure CDP Mode:</b></p>
231229

232230
```python
233231
from seleniumbase import sb_cdp
@@ -242,7 +240,7 @@ sb.highlight('button:contains("Sign in")')
242240

243241
--------
244242

245-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py" target="_blank">This example</a> tests an e-commerce site with <code>pytest</code>:
243+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_get_swag.py" target="_blank">This example</a> tests an e-commerce site with <code>pytest</code>:</b></p>
246244

247245
```python
248246
from seleniumbase import BaseCase
@@ -272,7 +270,7 @@ class MyTestClass(BaseCase):
272270

273271
--------
274272

275-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">This example</a> tests another e-commerce site with <code>pytest</code>:
273+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">This example</a> tests another e-commerce site with <code>pytest</code>:</b></p>
276274

277275
```zsh
278276
pytest test_coffee_cart.py --demo
@@ -286,7 +284,7 @@ pytest test_coffee_cart.py --demo
286284

287285
<a id="multiple_examples"></a>
288286

289-
<p align="left">📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">This example</a> covers multiple actions with <code>pytest</code>:
287+
<p align="left"><b>📝 <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py" target="_blank">This example</a> covers multiple actions with <code>pytest</code>:</b></p>
290288

291289
```zsh
292290
pytest test_demo_site.py

0 commit comments

Comments
 (0)