MCPcopy Index your code
hub / github.com/AtuboDad/playwright_stealth

github.com/AtuboDad/playwright_stealth @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
49 symbols 102 edges 26 files 4 documented · 8% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

playwright_stealth

Transplanted from puppeteer-extra-plugin-stealth, Not perfect.

Install

$ pip install playwright-stealth

Usage

sync


from playwright.sync_api import sync_playwright
from playwright_stealth import stealth_sync

with sync_playwright() as p:
    for browser_type in [p.chromium, p.firefox, p.webkit]:
        browser = browser_type.launch()
        page = browser.new_page()
        stealth_sync(page)
        page.goto('http://whatsmyuseragent.org/')
        page.screenshot(path=f'example-{browser_type.name}.png')
        browser.close()

async

# -*- coding: utf-8 -*-
import asyncio
from playwright.async_api import async_playwright
from playwright_stealth import stealth_async

async def main():
    async with async_playwright() as p:
        for browser_type in [p.chromium, p.firefox, p.webkit]:
            browser = await browser_type.launch()
            page = await browser.new_page()
            await stealth_async(page)
            await page.goto('http://whatsmyuseragent.org/')
            await page.screenshot(path=f'example-{browser_type.name}.png')
            await browser.close()

asyncio.get_event_loop().run_until_complete(main())

Test results

playwright with stealth

playwright without stealth

playwright without stealth

playwright with stealth

Core symbols most depended-on inside this repo

from_file
called by 19
playwright_stealth/stealth.py
defineProp
called by 3
playwright_stealth/js/generate.magic.arrays.js
addProxy
called by 2
playwright_stealth/js/webgl.vendor.js
patchNavigator
called by 2
playwright_stealth/js/navigator.plugins.js
makeCustomRuntimeErrors
called by 2
playwright_stealth/js/chrome.runtime.js
isValidExtensionID
called by 2
playwright_stealth/js/chrome.runtime.js
MismatchError
called by 2
playwright_stealth/js/chrome.runtime.js
onSomething
called by 2
playwright_stealth/js/chrome.runtime.js

Shape

Function 47
Class 1
Method 1

Languages

TypeScript90%
Python10%

Modules by API surface

playwright_stealth/js/chrome.load.times.js14 symbols
playwright_stealth/js/chrome.runtime.js7 symbols
playwright_stealth/js/generate.magic.arrays.js6 symbols
playwright_stealth/stealth.py5 symbols
playwright_stealth/js/utils.js5 symbols
playwright_stealth/js/iframe.contentWindow.js5 symbols
playwright_stealth/js/navigator.plugins.js2 symbols
playwright_stealth/js/navigator.hardwareConcurrency.js2 symbols
playwright_stealth/js/webgl.vendor.js1 symbols
playwright_stealth/js/media.codecs.js1 symbols
playwright_stealth/js/chrome.app.js1 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add playwright_stealth \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page