Skip to content

Commit 12f5c1d

Browse files
committed
Update the docs
1 parent c701e6f commit 12f5c1d

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

examples/cdp_mode/playwright/ReadMe/index.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,10 +3080,8 @@ <h3 id="stealthy-playwright-mode-examples">🎭 <b translate="no">Stealthy Playw
30803080
</code></pre></div>
30813081
<hr />
30823082
<h3 id="proxy-with-auth-in-stealthy-playwright-mode">🎭 Proxy with auth in <b translate="no">Stealthy Playwright Mode</b>:<a class="headerlink" href="#proxy-with-auth-in-stealthy-playwright-mode" title="Permanent link">&para;</a></h3>
3083-
<p>To use an authenticated proxy in Stealthy Playwright Mode, <strong>do these two things</strong>:
3084-
<strong>1.</strong> Set the<code>proxy</code> arg when launching Chrome.
3085-
-- Eg: <code>sb_cdp.Chrome(proxy="USER:PASS@IP:PORT")</code> or <code>cdp_driver.start_async("USER:PASS@IP:PORT")</code>.
3086-
<strong>2.</strong> Open the URL with SeleniumBase <strong>before</strong> using <code>endpoint_url</code> to connect to the browser with Playwright.</p>
3083+
<p>To use an authenticated proxy in Stealthy Playwright Mode, <strong>do these two things</strong>:<br /><strong>1.</strong> Set the<code>proxy</code> arg when launching Chrome.
3084+
-- Eg: <code>sb_cdp.Chrome(proxy="USER:PASS@IP:PORT")</code> or <code>cdp_driver.start_async("USER:PASS@IP:PORT")</code>.<br /><strong>2.</strong> Open the URL with SeleniumBase <strong>before</strong> using <code>endpoint_url</code> to connect to the browser with Playwright.</p>
30873085
<p>⚠️ If any trouble with the above, set <code>use_chromium=True</code> so that you can use the base Chromium browser, which still allows extensions, unlike regular branded Chrome, which removed the <code>--load-extension</code> command-line switch. (<em>An extension is used to set the auth for the proxy, which is needed when CDP can't set the proxy alone, such as for navigation after the initial page load</em>).</p>
30883086
<p>In the sync format, use <code>sb.open(url)</code> to open the url before connecting Playwright:
30893087
<div class="highlight"><pre><span></span><code><span class="n">sb</span> <span class="o">=</span> <span class="n">sb_cdp</span><span class="o">.</span><span class="n">Chrome</span><span class="p">(</span><span class="n">use_chromium</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">proxy</span><span class="o">=</span><span class="s2">&quot;user:pass@server:port&quot;</span><span class="p">)</span>
@@ -3097,8 +3095,7 @@ <h3 id="proxy-with-auth-in-stealthy-playwright-mode">🎭 Proxy with auth in <b
30973095
<span class="n">endpoint_url</span> <span class="o">=</span> <span class="n">driver</span><span class="o">.</span><span class="n">get_endpoint_url</span><span class="p">()</span>
30983096
<span class="c1"># ...</span>
30993097
</code></pre></div></p>
3100-
<p>Here's an example of using an authenticated proxy with Stealthy Playwright Mode:
3101-
(The URL is opened before attaching Playwright so that proxy settings take effect)
3098+
<p>Here's an example of using an authenticated proxy with Stealthy Playwright Mode:<br />(The URL is opened before attaching Playwright so that proxy settings take effect)
31023099
<div class="highlight"><pre><span></span><code><span class="kn">from</span><span class="w"> </span><span class="nn">playwright.sync_api</span><span class="w"> </span><span class="kn">import</span> <span class="n">sync_playwright</span>
31033100
<span class="kn">from</span><span class="w"> </span><span class="nn">seleniumbase</span><span class="w"> </span><span class="kn">import</span> <span class="n">sb_cdp</span>
31043101

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)