Skip to main content

No project description provided

Project description

🚀 Pydoll: Async Web Automation in Python!


Alt text

Tests Ruff CI Release Total lines Files Comments GitHub issues GitHub closed issues GitHub bug issues GitHub enhancement issues

Pydoll is an innovative Python library that's redefining Chromium browser automation! Unlike other solutions, Pydoll completely eliminates the need for webdrivers, providing a much more fluid and reliable automation experience.

⭐ Extraordinary Features

  • Zero Webdrivers! Say goodbye to webdriver compatibility and configuration headaches
  • Native Captcha Bypass! Naturally passes through Cloudflare Turnstile and reCAPTCHA v3
  • Performance thanks to native asynchronous programming
  • Realistic Interactions that simulate human behavior
  • Advanced Event System for complex and reactive automations

Table of Contents

🔥 Installation

pip install git+https://github.com/thalissonvs/pydoll.git

⚡ Quick Start

See how simple it is to get started - no webdriver configuration needed!

import asyncio
from pydoll.browser.chrome import Chrome
from pydoll.constants import By

async def main():
    # Start the browser with no additional webdriver configuration!
    async with Chrome() as browser:
        await browser.start()
        page = await browser.get_page()
        
        # Navigate through captcha-protected sites without worry
        await page.go_to('https://example-with-cloudflare.com')
        button = await page.find_element(By.CSS_SELECTOR, 'button')
        await button.click()

asyncio.run(main())

🎯 Core Components

Browser Interface

Powerful interface for global browser control:

async def browser_examples():
    async with Chrome() as browser:
        await browser.start()
        # Control multiple pages with incredible ease
        pages = [await browser.get_page() for _ in range(3)]
        
        # Advanced settings with a simple command
        await browser.set_window_maximized()

Page Interface

Individual page control with surgical precision:

async def page_examples():
    page = await browser.get_page()
    
    # Smooth navigation, even on protected sites
    await page.go_to('https://site-with-recaptcha.com')
    
    # Capture perfect screenshots
    await page.get_screenshot('/screenshots/evidence.png')

WebElement Interface

Interact with elements like a real user:

async def element_examples():
    # Natural and precise interactions
    input_field = await page.find_element(By.CSS_SELECTOR, 'input')
    await input_field.type_keys('Hello World')  # Realistic typing!
    
    # Intuitive chained operations
    dropdown = await page.find_element(By.CSS_SELECTOR, 'select')
    await dropdown.select_option('value')

    # Realistic clicks with offset
    button = await page.find_element(By.CSS_SELECTOR, 'button')
    await button.click(x_offset=5, y_offset=10)

🚀 Advanced Features

Event System

Powerful event system for intelligent automation:

from pydoll.events.page import PageEvents

async def event_example():
    await page.enable_page_events()
    # React to events in real-time!
    await page.on(PageEvents.PAGE_LOADED, 
                  lambda e: print('Page loaded successfully!'))

Concurrent Scraping

Scrape multiple pages simultaneously with extraordinary performance:

async def concurrent_example():
    pages = [await browser.get_page() for _ in range(10)]
    # Parallel scraping with intelligent resource management
    results = await asyncio.gather(
        *(scrape_page(page) for page in pages)
    )
    # Just declare the scrape_page method and see the magic happens!

Proxy Configuration

Robust proxy support, including authentication:

async def proxy_example():
    options = Options()
    # Private or public proxies, you choose!
    options.add_argument('--proxy-server=username:password@ip:port')
    
    async with Chrome(options=options) as browser:
        await browser.start()

For exploring all available methods and additional features, check out:

🎉 Start Now!

Feel free to use, open issues and contributing!

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

pydoll_python-1.2.0.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

pydoll_python-1.2.0-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file pydoll_python-1.2.0.tar.gz.

File metadata

  • Download URL: pydoll_python-1.2.0.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for pydoll_python-1.2.0.tar.gz
Algorithm Hash digest
SHA256 82da4886fe6b2e56a433bc40ae04c40628c5044a40d716dd6abc4433541cf0dd
MD5 5b3ccf14f49f8576862609f9ea86ce55
BLAKE2b-256 117a977cf71aae75dcc6c22ab4d1073f8a5251ae3838ae3250c3590ea70a8121

See more details on using hashes here.

File details

Details for the file pydoll_python-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pydoll_python-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-45-generic

File hashes

Hashes for pydoll_python-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 415f53612dcb2e41b2fbd97acb347e14d7954f442fee44ccff198f8d17938e8e
MD5 18cff1e8775674574b9c575c652d5a05
BLAKE2b-256 51d0b355b856f0526e6a491941d976ad339f266a0ab66aebb0c9022330201d4f

See more details on using hashes here.

Supported by

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