Skip to main content

You know who I am

Project description

undetected-playwright

Usage

  1. Download PyPi package

    pip install -U undetected-playwright
    
  2. Run the demo

    As before.

    from playwright.sync_api import BrowserContext, sync_playwright
    
    from undetected_playwright import stealth_sync
    
    headless = True
    
    
    def run(context: BrowserContext):
        page = context.new_page()
        page.goto("https://bot.sannysoft.com/")
    
        _suffix = "-headless" if headless else "-headful"
        page.screenshot(path=f"result/sannysoft{_suffix}.png", full_page=True)
    
    
    def bytedance():
        with sync_playwright() as p:
            browser = p.chromium.launch(headless=headless)
            context = browser.new_context()
            stealth_sync(context)
            run(context)
    
    
    if __name__ == "__main__":
        bytedance()
    

Reference

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

undetected_playwright-0.2.0.tar.gz (32.3 kB view hashes)

Uploaded Source

Built Distribution

undetected_playwright-0.2.0-py3-none-any.whl (53.2 kB view hashes)

Uploaded Python 3

Supported by

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