microsoft/playwright-python

Pythonplaywright.dev/python/

Python version of the Playwright testing and automation library.

playwrightchromiumfirefoxwebkit
Star 增长趋势
Star
15k
Forks
1.2k
周增长
+19
Issues
3
5k10k
2023年1月2024年3月2025年6月2026年9月
制品库PyPI
README

🎭 Playwright for Python PyPI Join Discord

Playwright is a Python library to automate Chromium, Firefox and WebKit browsers with a single API. Playwright delivers automation that is ever-green, capable, reliable and fast. See how Playwright is better.

Linux macOS Windows
Chromium 151.0.7922.34
WebKit 26.5
Firefox 153.0

Documentation

https://playwright.dev/python/docs/intro

API Reference

https://playwright.dev/python/docs/api/class-playwright

Example

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    for browser_type in [p.chromium, p.firefox, p.webkit]:
        browser = browser_type.launch()
        page = browser.new_page()
        page.goto('http://playwright.dev')
        page.screenshot(path=f'example-{browser_type.name}.png')
        browser.close()
import asyncio
from playwright.async_api import async_playwright

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 page.goto('http://playwright.dev')
            await page.screenshot(path=f'example-{browser_type.name}.png')
            await browser.close()

asyncio.run(main())

Other languages

More comfortable in another programming language? Playwright is also available in

相关仓库
browser-use/browser-use

🌐 Make websites accessible for AI agents. Automate tasks online with ease.

PythonPyPIMIT Licensellmai-agents
browser-use.com
113k12.5k
microsoft/playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

TypeScriptnpmappApache License 2.0playwrighttesting
playwright.dev
95.8k6.4k
D4Vinci/Scrapling

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

PythonPyPIlibraryBSD 3-Clause "New" or "Revised" Licensecrawlercrawling
scrapling.readthedocs.io/en/latest/
79.2k8k
fastapi/full-stack-fastapi-template

Full-stack web application template with FastAPI, React, SQLModel, PostgreSQL, Vite, Tailwind CSS, shadcn/ui, FastAPI Cloud, and Docker Compose.

TypeScriptnpmMIT Licensepythondocker
45.4k9k
microsoft/playwright-mcp

Playwright MCP server

TypeScriptnpmlibraryApache License 2.0mcpplaywright
npmjs.com/package/@playwright/mcp
36.9k3.1k
lightpanda-io/browser

Lightpanda: the headless browser designed for AI and automation

ZigGNU Affero General Public License v3.0browsercdp
lightpanda.io
35.1k1.7k
CloakHQ/CloakBrowser

Stealth Chromium that passes every bot detection test. Drop-in Playwright replacement with source-level fingerprint patches. 30/30 tests passed.

PythonPyPIMIT Licenseanti-detectbot-detection
cloakbrowser.dev
31.3k2.6k
feder-cr/Jobs_Applier_AI_Agent_AIHawk

Open source AI job application toolkit in Python: generate a resume and cover letter tailored to each job posting, and drive a stealth browser from any AI client over MCP.

GNU Affero General Public License v3.0automationpython
30.3k4.6k
jackwener/OpenCLI

Make Any Website into CLI & Use your logged-in browser by AI agent.

JavaScriptnpmcliApache License 2.0ai-agentai-agents
opencli.info
29.1k2.9k
h4ckf0r0day/obscura

The headless browser for AI agents and web scraping

Rustcrates.ioApache License 2.0antidetectantidetect-browser
obscura.sh
26.5k1.9k
apify/crawlee

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

TypeScriptnpmlibraryApache License 2.0web-scrapingweb-crawling
crawlee.dev
25.7k1.7k
browserbase/stagehand

The SDK For Browser Agents

TypeScriptnpmMIT Licenseagentsai
stagehand.dev
24.2k1.7k