-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
…browser (over network as well). updated docs
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 289d95cc9169fcb0c76a899cfdf2c08c | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
|
||
|
||
################## | ||
NODRIVER | ||
################## | ||
|
||
|
||
**This package provides next level webscraping and browser automation | ||
using a relatively simple interface.** | ||
|
||
* **This is the official successor of the** `Undetected-Chromedriver <https://github.com/ultrafunkamsterdam/undetected-chromedriver/>`_ **python package.** | ||
* **No more webdriver, no more selenium** | ||
|
||
Direct communication provides even better resistance against web applicatinon firewalls (WAF's), while | ||
performance gets a massive boost. | ||
This module is, contrary to undetected-chromedriver, fully asynchronous. | ||
|
||
What makes this package different from other known packages, | ||
is the optimization to stay undetected for most anti-bot solutions. | ||
|
||
Another focus point is usability and quick prototyping, so expect a lot to work `-as is-` , | ||
with most method parameters having `best practice` defaults. | ||
Using 1 or 2 lines, this is up and running, providing best practice config | ||
by default. | ||
|
||
While usability and convenience is important. It's also easy | ||
to fully customizable everything using the entire array of | ||
`CDP <https://chromedevtools.github.io/devtools-protocol />`_ domains, methods and events available. | ||
|
||
|
||
Some features | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
* A blazing fast undetected chrome (-ish) automation library | ||
|
||
* No chromedriver binary or Selenium dependency | ||
|
||
* This equals bizarre performance increase and less detections! | ||
|
||
* Up and running in 1 line of code* | ||
|
||
* uses fresh profile on each run, cleans up on exit | ||
|
||
* save and load cookies to file to not repeat tedious login steps | ||
|
||
* smart element lookup, by selector or text, including iframe content. | ||
this could also be used as wait condition for a element to appear, since it will retry | ||
for the duration of <timeout> until found. | ||
single element lookup by text using tab.find(), accepts a best_match flag, which will not | ||
naively return the first match, but will match candidates by closest matching text length. | ||
|
||
* descriptive __repr__ for elements, which represent the element as html | ||
|
||
* utility function to convert a running undetected_chromedriver.Chrome instance | ||
to a nodriver.Browser instance and contintue from there | ||
|
||
* packed with helpers and utility methods for most used and important operations | ||
|
||
.. | ||
* ```elem.text``` | ||
* ```elem.text_all``` | ||
* ```elem.parent.parent.parent.attrs``` | ||
* ```anchor_elem.href and anchor_elem['href']``` | ||
* ```anchor_elem.href = 'someotherthing'; await anchor_elem.save()``` | ||
* ```elem.children[-1].children[0].children[4].parent.parent``` | ||
|
||
* ```await html5video_element.record_video()``` | ||
* ```await html5video_element('pause')``` | ||
* ```await html5video_element.apply('''(el) => el.currentTime = 0''')``` | ||
* ```tab = await browser.get(url, new_tab=True)``` | ||
* ```tab_win = await browser.get(url, new_window=True)``` | ||
* ```first = await tab.find('search text')``` | ||
* ```best = await tab.find('search text', best_match=True)``` | ||
* ```all_results = await tab.find_all('search text')``` | ||
* ```first_submit_button = await tab.select(selector='button[type=submit]')``` | ||
* ```inputs_in_form = await tab.select_all('form input')``` | ||
|
||
|
||
Quick start | ||
-------------- | ||
.. toctree:: | ||
nodriver/quickstart | ||
|
||
|
||
Main objects | ||
-------------- | ||
.. toctree:: | ||
|
||
nodriver/classes/browser | ||
nodriver/classes/tab | ||
nodriver/classes/element | ||
nodriver/classes/others_and_helpers | ||
|
||
|
||
CDP object | ||
------------------ | ||
|
||
.. toctree:: | ||
|
||
nodriver/cdp | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CDP object | ||
==================== | ||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 1 | ||
|
||
cdp/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
Accessibility | ||
============= | ||
|
||
*This CDP domain is experimental.* | ||
|
||
.. module:: nodriver.cdp.accessibility | ||
|
||
* Types_ | ||
* Commands_ | ||
* Events_ | ||
|
||
Types | ||
----- | ||
|
||
Generally, you do not need to instantiate CDP types | ||
yourself. Instead, the API creates objects for you as return | ||
values from commands, and then you can use those objects as | ||
arguments to other commands. | ||
|
||
.. autoclass:: AXNodeId | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXValueType | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXValueSourceType | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXValueNativeSourceType | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXValueSource | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXRelatedNode | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXProperty | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXValue | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXPropertyName | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AXNode | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
Commands | ||
-------- | ||
|
||
Each command is a generator function. The return | ||
type ``Generator[x, y, z]`` indicates that the generator | ||
*yields* arguments of type ``x``, it must be resumed with | ||
an argument of type ``y``, and it returns type ``z``. In | ||
this library, types ``x`` and ``y`` are the same for all | ||
commands, and ``z`` is the return type you should pay attention | ||
to. For more information, see | ||
:ref:`Getting Started: Commands <getting-started-commands>`. | ||
|
||
.. autofunction:: disable | ||
|
||
.. autofunction:: enable | ||
|
||
.. autofunction:: get_ax_node_and_ancestors | ||
|
||
.. autofunction:: get_child_ax_nodes | ||
|
||
.. autofunction:: get_full_ax_tree | ||
|
||
.. autofunction:: get_partial_ax_tree | ||
|
||
.. autofunction:: get_root_ax_node | ||
|
||
.. autofunction:: query_ax_tree | ||
|
||
Events | ||
------ | ||
|
||
Generally, you do not need to instantiate CDP events | ||
yourself. Instead, the API creates events for you and then | ||
you use the event's attributes. | ||
|
||
.. autoclass:: LoadComplete | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: NodesUpdated | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
Animation | ||
========= | ||
|
||
*This CDP domain is experimental.* | ||
|
||
.. module:: nodriver.cdp.animation | ||
|
||
* Types_ | ||
* Commands_ | ||
* Events_ | ||
|
||
Types | ||
----- | ||
|
||
Generally, you do not need to instantiate CDP types | ||
yourself. Instead, the API creates objects for you as return | ||
values from commands, and then you can use those objects as | ||
arguments to other commands. | ||
|
||
.. autoclass:: Animation | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: ViewOrScrollTimeline | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AnimationEffect | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: KeyframesRule | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: KeyframeStyle | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
Commands | ||
-------- | ||
|
||
Each command is a generator function. The return | ||
type ``Generator[x, y, z]`` indicates that the generator | ||
*yields* arguments of type ``x``, it must be resumed with | ||
an argument of type ``y``, and it returns type ``z``. In | ||
this library, types ``x`` and ``y`` are the same for all | ||
commands, and ``z`` is the return type you should pay attention | ||
to. For more information, see | ||
:ref:`Getting Started: Commands <getting-started-commands>`. | ||
|
||
.. autofunction:: disable | ||
|
||
.. autofunction:: enable | ||
|
||
.. autofunction:: get_current_time | ||
|
||
.. autofunction:: get_playback_rate | ||
|
||
.. autofunction:: release_animations | ||
|
||
.. autofunction:: resolve_animation | ||
|
||
.. autofunction:: seek_animations | ||
|
||
.. autofunction:: set_paused | ||
|
||
.. autofunction:: set_playback_rate | ||
|
||
.. autofunction:: set_timing | ||
|
||
Events | ||
------ | ||
|
||
Generally, you do not need to instantiate CDP events | ||
yourself. Instead, the API creates events for you and then | ||
you use the event's attributes. | ||
|
||
.. autoclass:: AnimationCanceled | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AnimationCreated | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AnimationStarted | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json | ||
|
||
.. autoclass:: AnimationUpdated | ||
:members: | ||
:undoc-members: | ||
:exclude-members: from_json, to_json |