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 105.0.5195.19
WebKit 16.0
Firefox 103.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.25.2-py3-none-win_amd64.whl (27.1 MB view details)

Uploaded Python 3 Windows x86-64

playwright-1.25.2-py3-none-win32.whl (27.1 MB view details)

Uploaded Python 3 Windows x86

playwright-1.25.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (32.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

playwright-1.25.2-py3-none-manylinux1_x86_64.whl (32.9 MB view details)

Uploaded Python 3

playwright-1.25.2-py3-none-macosx_11_0_universal2.whl (30.6 MB view details)

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

playwright-1.25.2-py3-none-macosx_11_0_arm64.whl (29.1 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

playwright-1.25.2-py3-none-macosx_10_13_x86_64.whl (30.6 MB view details)

Uploaded Python 3 macOS 10.13+ x86-64

File details

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

File metadata

File hashes

Hashes for playwright-1.25.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 68ae739f82b78717123eb9d1b28b4619f0b368b88ef73c633681e267680697cd
MD5 738ed80170610b05524a67e084e52ab3
BLAKE2b-256 72f4dd7a14cca868b322b32914f0df5468535fe1b1737d24c5d0ce09eca63e8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: playwright-1.25.2-py3-none-win32.whl
  • Upload date:
  • Size: 27.1 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.25.2-py3-none-win32.whl
Algorithm Hash digest
SHA256 b49680ad62a6e070ef857475256bc4f2cfb3242de96c12a2cae35b36564c78cb
MD5 03a2d9e824d22ceb47e026690e72d8fc
BLAKE2b-256 be19a389e2bcebe130d6c47b989cb1c7b951561a10b4653e7f9e0e307cfa5a3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 69b6260ac98df49a868bbf8c44c324f821d359b9f2fbf18b656e836374988e5b
MD5 080dd5d9540c18348373f45823642e87
BLAKE2b-256 eb40c621d7b9b8c4409ca9b7629f18659d20a02d994a526e4d903173bca68c4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.2-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4ccf36445a435e71e2436d08b112bcb28db6afab1c0605e94d4037f1309a24f9
MD5 f3188fe5fb49cb9afed091b9b66287f9
BLAKE2b-256 bcaf2c991da4fb5d148a92e54290b31146a68f4bf8f3e58414e7832976da2867

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.2-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 24976035e50fc4c6af0c5c57c4de460c2db4f6590b63150c40fbe707c160ce6e
MD5 d09a196fc7af495be1d1683a5876caf9
BLAKE2b-256 fbe7b036d33593cf1b8c9e7dacee9010c45d2a217b0520914d7e578f96e3aaff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8e08ddd366db671017d6b741f324ac797c8681c3099c0b9a17185f2aac3a9224
MD5 f40bc10b25fc75aa83743e5dcbb3ba15
BLAKE2b-256 bb659f0c4511ae6cd6cfe4f42768f8ff8eb992775cafece2d8f8695352a025a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for playwright-1.25.2-py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fef1e08789732896c4de512c33e20199e27fd0effec08342db7cf1499b1cccb3
MD5 8b3aeb61a66c47156449173dcdf7a570
BLAKE2b-256 095cb67c848287b61507d0746d6aa25c8be0a636be5db6d15ae1f3a5dc7e792c

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