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 111.0.5563.19
WebKit 16.4
Firefox 109.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.31.0-py3-none-win_amd64.whl (28.8 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.31.0-py3-none-win32.whl (28.8 MB view details)

Uploaded Python 3 Windows x86

playwright-1.31.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (34.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.31.0-py3-none-manylinux1_x86_64.whl (35.0 MB view details)

Uploaded Python 3

playwright-1.31.0-py3-none-macosx_11_0_universal2.whl (32.7 MB view details)

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

playwright-1.31.0-py3-none-macosx_11_0_arm64.whl (31.0 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.31.0-py3-none-macosx_10_13_x86_64.whl (32.7 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.31.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 93303193eccf85dc26adadff2593205d9906b11a908718e23c1695b2114e30ff
MD5 a87db878118312e219e6e39617718ede
BLAKE2b-256 6bda5a5625dda3d3d9db0741697c9b5fafbda51115dae4eb058da39a2b949d47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.31.0-py3-none-win32.whl
  • Upload date:
  • Size: 28.8 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for playwright-1.31.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 847b89b19d5bb4d12dfc4603dc3e293ca479c8448251b08d49d053b997801003
MD5 098d4c8267f1d726c92873746eb2adfd
BLAKE2b-256 c50d3113183a97e072f205577b7e7fb9631a9c34eed935a6234520db5c13a8c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 529421030d43f5f5802556186e00af97d50f7bfce6bc53313f54ed98627e63f6
MD5 831aeb1b86e1fe2cc4187088b9c7a77a
BLAKE2b-256 f1273af2ef0b21498b63a8be50d0f6ee967926d94833a277bacec6dc2a6c03c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2d443d0757b1d2f5c222a9bbfd549b9dc89ca0d761a3c159162482763bb2bebd
MD5 c44611a60c7dd194036baa7610a924ba
BLAKE2b-256 b588bc1420c60843b56afd3eab032e9e77a9d7b25a678aef1885fd32d5132290

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 4ba1ec9b751c3ef24b0d98c63c93e3012a6abf5da2c1e027c5177f26c69549aa
MD5 adc9fba5f2f4d64db1262ba5c3d77e39
BLAKE2b-256 a94b411aa8988acdd6d9735d898ddb185614ce2dede09aae07f8cb63b29d6740

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a5e8142e3ab32a3011f9169b0981ce5784b8fa7a5404378978831bca89bd1b9
MD5 9c19364b2db080efcf76c59f3c28c989
BLAKE2b-256 6b637c4a10a940bbfe820723231e63fd1da12f32c62426b461b699500ae899f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.31.0-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4073eab6856c0897219a8db9244e7911db23f087a0fd6dac0bad8ec67688476f
MD5 f89662990268b27347fde9edb4d73616
BLAKE2b-256 c5718afa901d638ba777d32c51039bc488256c7c731298c1b7a57468641df4de

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