NODRIVER#

-
-

CLICK HERE FOR DOCS#

+
+

for docs click here#

This package provides next level webscraping and browser automation using a relatively simple interface.

    @@ -304,21 +306,51 @@

    Some features +

    what is new#

    +

    tab.open_external_debugger()

    +

    lets you inspect the tab without breaking your connection

    +

    tab.get_local_storage()

    +

    get localstorage content

    +

    tab.set_local_storage(dict)

    +

    set localstorage content

    +

    tab.add_handler(someEvent, callback)

    +

    callback may accept a single argument (event), or 2 arguments (event, tab).

    +

    start(expert=True)

    +

    does some hacking for more experienced users. It disables web security and origin-trials, as well as ensures shadow-roots are always open.

    +

+
+

Some examples of what the api looks like#

+
+
    +
  • `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')`

  • +
+
+
-

Installation#

-

Since it’s a part of undetected-chromedriver, installation goes via

-
pip install undetected-chromedriver
-
-
-
-

In case you don’t want undetected-chromedriver, this package can be installed -using

+

Installation#

pip install nodriver
 
-

usage example#

+

usage example#

The aim of this project (just like undetected-chromedriver, somewhere long ago) is to keep it short and simple, so you can quickly open an editor or interactive session, type or paste a few lines and off you go.

@@ -485,7 +517,6 @@

Installation