Skip to content

Commit

Permalink
0.27rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
ultrafunkamsterdam committed Mar 10, 2024
1 parent d717f1f commit 4976a19
Show file tree
Hide file tree
Showing 22 changed files with 597 additions and 380 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/nodriver/classes/browser.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/nodriver/classes/element.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/nodriver/classes/tab.doctree
Binary file not shown.
65 changes: 28 additions & 37 deletions docs/_build/html/_modules/nodriver/core/browser.html

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions docs/_build/html/_modules/nodriver/core/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ <h1>Source code for nodriver.core.config</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">uses_custom_data_dir</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_custom_data_dir</span>


<div class="viewcode-block" id="Config.add_extension">
<a class="viewcode-back" href="../../../nodriver/classes/others_and_helpers.html#nodriver.Config.add_extension">[docs]</a>
<span class="k">def</span> <span class="nf">add_extension</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">extension_path</span><span class="p">:</span> <span class="n">PathLike</span><span class="p">):</span>
Expand All @@ -421,18 +420,17 @@ <h1>Source code for nodriver.core.config</h1><div class="highlight"><pre>
<span class="k">raise</span> <span class="ne">FileNotFoundError</span><span class="p">(</span><span class="s2">&quot;could not find anything here: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="nb">str</span><span class="p">(</span><span class="n">path</span><span class="p">))</span>

<span class="k">if</span> <span class="n">path</span><span class="o">.</span><span class="n">is_file</span><span class="p">():</span>
<span class="n">tf</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mkdtemp</span><span class="p">(</span><span class="n">prefix</span><span class="o">=</span><span class="sa">f</span><span class="s1">&#39;extension_&#39;</span><span class="p">,</span> <span class="n">suffix</span><span class="o">=</span><span class="n">secrets</span><span class="o">.</span><span class="n">token_hex</span><span class="p">(</span><span class="mi">4</span><span class="p">))</span>
<span class="k">with</span> <span class="n">zipfile</span><span class="o">.</span><span class="n">ZipFile</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s1">&#39;r&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">z</span><span class="p">:</span>
<span class="n">tf</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mkdtemp</span><span class="p">(</span><span class="n">prefix</span><span class="o">=</span><span class="sa">f</span><span class="s2">&quot;extension_&quot;</span><span class="p">,</span> <span class="n">suffix</span><span class="o">=</span><span class="n">secrets</span><span class="o">.</span><span class="n">token_hex</span><span class="p">(</span><span class="mi">4</span><span class="p">))</span>
<span class="k">with</span> <span class="n">zipfile</span><span class="o">.</span><span class="n">ZipFile</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">z</span><span class="p">:</span>
<span class="n">z</span><span class="o">.</span><span class="n">extractall</span><span class="p">(</span><span class="n">tf</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_extensions</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">tf</span><span class="p">)</span>

<span class="k">elif</span> <span class="n">path</span><span class="o">.</span><span class="n">is_dir</span><span class="p">():</span>
<span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">path</span><span class="o">.</span><span class="n">rglob</span><span class="p">(</span><span class="s1">&#39;manifest.*&#39;</span><span class="p">):</span>
<span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">path</span><span class="o">.</span><span class="n">rglob</span><span class="p">(</span><span class="s2">&quot;manifest.*&quot;</span><span class="p">):</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">item</span><span class="o">.</span><span class="n">parent</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_extensions</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">path</span><span class="p">)</span></div>



<span class="k">def</span> <span class="fm">__getattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">item</span><span class="p">):</span>
<span class="k">if</span> <span class="n">item</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">:</span>
<span class="k">return</span>
Expand Down
Loading

0 comments on commit 4976a19

Please sign in to comment.