Skip to main content

A high-level API to automate web browsers

Project description

🎭 Playwright for Python PyPI version Anaconda version Join Slack

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 106.0.5249.30
WebKit 16.0
Firefox 104.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://whatsmyuseragent.org/')
        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://whatsmyuseragent.org/')
            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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

playwright-1.26.0-py3-none-win_amd64.whl (27.3 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.26.0-py3-none-win32.whl (27.3 MB view details)

Uploaded Python 3 Windows x86

playwright-1.26.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (33.0 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.26.0-py3-none-manylinux1_x86_64.whl (33.1 MB view details)

Uploaded Python 3

playwright-1.26.0-py3-none-macosx_11_0_universal2.whl (30.8 MB view details)

Uploaded Python 3 macOS 11.0+ universal2 (ARM64, x86-64)

playwright-1.26.0-py3-none-macosx_11_0_arm64.whl (29.4 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.26.0-py3-none-macosx_10_13_x86_64.whl (30.8 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

Details for the file playwright-1.26.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for playwright-1.26.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a04a549a32cea8000036274af6fe7e7b7ac3697021cd3cc2bb3e92341b89147d
MD5 4902b205ef3accdba8c89f1ee3750c54
BLAKE2b-256 ad4aa2945084b774b25659b811e69fe10f3388382f133c3fc0906e27a17ccda8

See more details on using hashes here.

File details

Details for the file playwright-1.26.0-py3-none-win32.whl.

File metadata

  • Download URL: playwright-1.26.0-py3-none-win32.whl
  • Upload date:
  • Size: 27.3 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for playwright-1.26.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 aa3e8ee10bce4d8992a8332f4358ab571724dfd0c34540e6b56e7ac062cc6e20
MD5 0c1e4b648061f1a205a4f32b293f1cdf
BLAKE2b-256 b11770f87c39bc01b0a1450fc37bccdc0c07a0055259797a7ae77266bd2320d2

See more details on using hashes here.

File details

Details for the file playwright-1.26.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for playwright-1.26.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 759292562f50e7f04ef75eac7039ab7149461b2ac97c91f77d73cc974b3f49bb
MD5 cebebb92dbf4a0b39c7f83df0d3b2ea0
BLAKE2b-256 47f4eb89847a60e0bce73777f621d1a85448fcea6fee70c703497581980d24ee

See more details on using hashes here.

File details

Details for the file playwright-1.26.0-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for playwright-1.26.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c6d9df284a74897eb667ee8e865137ed2fbdd93b8ba8f43e257871a3fbf1e9c4
MD5 44ca1e43739353e6869a440fc5631383
BLAKE2b-256 d91e26070a0674d12bb3a6b41aa5d10252aa99448ed373e558847b684c4d0c87

See more details on using hashes here.

File details

Details for the file playwright-1.26.0-py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for playwright-1.26.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 fd7546d4b61ebe7fd1f1fa5eebdaf884263d97b111be6208a02a1bde5f36308f
MD5 f676bee250a4fe895ad812895544be85
BLAKE2b-256 3e44a76e282855a49b959f0ae2b90ec04e157c59ae75691bda6510a7289de21a

See more details on using hashes here.

File details

Details for the file playwright-1.26.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for playwright-1.26.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5d910b865a6c539d3589d1a9a67d221f060460b812b65f933e872f8762bd640a
MD5 7538705d79fa76357ae18e1545420061
BLAKE2b-256 0e5160f49f3c3f510f38717e6e6811395cf5acc4761595e57f1eea3a7ad1ba69

See more details on using hashes here.

File details

Details for the file playwright-1.26.0-py3-none-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for playwright-1.26.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4841796a44582b0d4cc0424ebce2da717d3aa04adb4051145dc480be198549bb
MD5 40d96dc843df76618d74803dbb5266cc
BLAKE2b-256 fe07e5901524361cb32d8121d302799f26f12526e89007be25e4d6ef43dd206f

See more details on using hashes here.

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