Skip to main content

A blazing fast, async-first, undetectable webscraping/web automation framework

Reason this release was yanked:

Broken release

Project description

Zendriver ✌️

Documentation: https://slensky.com/zendriver

Zendriver is a blazing fast, async-first, undetectable webscraping/web automation framework implemented using the Chrome Devtools Protocol. Visit websites, scrape content, and run JavaScript using a real browser (no Selenium/Webdriver) all with just a few lines of Python.

This package is a fork of the excellent ultrafunkamsterdam/nodriver, created in order to compile a variety of unmerged bugfixes and increase overall community engagement with the project.

Features

  • Undetectable - Zendriver uses the Chrome Devtools Protocol instead of Selenium/WebDriver, making it (almost) impossible to detect
  • Blazing fast - Chrome Devtools Protocol is fast, much faster than previous Selenium/WebDriver solutions. CDP combined with an async Python API makes Zendriver highly performant.
  • Feature complete and easy to use - Packed with allowing you to get up and running in just a few lines of code.
  • Automatic cookie and profile management - By default, uses fresh profile on each run, cleaning up on exit. Or, save and load cookies to a file to avoid repeating tedious login steps.
  • Smart element lookup - Find elements 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.
  • Easy debugging - Descriptive repr for elements, which represents the element as HTML, makes debugging much easier.

Installation

To install, simply use pip (or your favorite package manager):

pip install zendriver
# or uv add zendriver, poetry add zendriver, etc.

Usage

Example for visiting https://www.browserscan.net/bot-detection and saving a screenshot of the results:

import asyncio

import zendriver as zd


async def main():
    browser = await zd.start()
    page = await browser.get("https://www.browserscan.net/bot-detection")
    await page.save_screenshot("browserscan.png")
    await browser.stop()


if __name__ == "__main__":
    asyncio.run(main())

Check out the official documentation for more information and examples.

Rationale for the fork

Zendriver remains committed to nodriver's goals of staying undetected for all modern anti-bot solutions and also keeps with the batteries-included approach of its predecessor. Unfortunately, contributions to the original nodriver repo are heavily restricted, making it difficult to submit issues or pull requests. At the time of writing, there are several pull requests open to fix critical bugs which have beeen left unaddressed for many months.

Zendriver aims to change this by:

  1. Including open pull requests in the original nodriver repo as part of the initial release
  2. Modernizing the development process to include static analysis tools such as ruff and mypy, reducing the number of easy-to-catch bugs which make it through in the future
  3. Opening up the issue tracker and pull requests for community contributions, allowing the project to continue to grow along with its community.

With these changes in place, we hope to further development of state-of-the-art open-source web automation tools even further, helping to once again make the web truly open for all.

Contributing

Contributions of all types are always welcome! Please see CONTRIBUTING.md for details on how to contribute.

Getting additional help

If you have a question, bug report, or want to make a general inquiry about the project, please create a new GitHub issue. If you are having a problem with Zendriver, please make sure to include your operating system, Chrome version, code example demonstrating the issue, and any other information that may be relevant.

Questions directed to any personal accounts outside of GitHub will be ignored.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zendriver-0.1.4.tar.gz (348.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zendriver-0.1.4-py3-none-any.whl (317.6 kB view details)

Uploaded Python 3

File details

Details for the file zendriver-0.1.4.tar.gz.

File metadata

  • Download URL: zendriver-0.1.4.tar.gz
  • Upload date:
  • Size: 348.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.2

File hashes

Hashes for zendriver-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c09b75b74a6e1d296405650b4688a00fb94d22adb527a10161854edc8d613524
MD5 1a6731e4570028b8baf144d1e40ac203
BLAKE2b-256 78d3f97deef73da4a7137c870eb604c57955221a58645a7cade7f330f5194955

See more details on using hashes here.

File details

Details for the file zendriver-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: zendriver-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 317.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.2

File hashes

Hashes for zendriver-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 be3958b95a4b88b298282c49efb1d797bcc4c0074eadbe24f51855ed0ff1b46e
MD5 a8911b106d98aa5a784fa1f8c2cee452
BLAKE2b-256 aed1a9f9185c9746765814b9d582ea62363bf0cf5391bac97a81cb49f2710e3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page