A high-level API to automate web browsers
Project description
🎭 Playwright for Python
![Join Slack](https://pypi-camo.freetls.fastly.net/4e0265d4d36c72d75642235ad451c1e58b4f726c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d736c61636b2d696e666f6d6174696f6e616c)
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 110.0.5481.38 | ✅ | ✅ | ✅ |
WebKit 16.4 | ✅ | ✅ | ✅ |
Firefox 108.0.2 | ✅ | ✅ | ✅ |
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
Release history Release notifications | RSS feed
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
Close
Hashes for playwright-1.30.0-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198c1d816e802c4c9bc048232ec344f4bdfe3229e73a3a28a8eac33c46dab201 |
|
MD5 | 52570be164d18d1e443230aa91afb4f6 |
|
BLAKE2b-256 | d4195f2dd303ea3b48f160ecc1e1498164202da655b1f1feb350f804f39c70b2 |
Close
Hashes for playwright-1.30.0-py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07249da8375fa7d52cbcdbfc36f5773f91fa8305aa340215db173101d289e210 |
|
MD5 | ab0d5a6b3402423214bd73b6746f02fa |
|
BLAKE2b-256 | 2cb69c0fe7b2bad5ce2367c654fc47daedfb9b82239d85fbcba208dc25a9b583 |
Close
Hashes for playwright-1.30.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62032a1da59524a7f8d8cb4ed998cf793310b67693d3df94d00ceb13b5a9eced |
|
MD5 | 7e78dc6005257e0a15a0b3a211352ad2 |
|
BLAKE2b-256 | 564f827e984ceac1e085e557b5072f0f7dddc78fe043674895373e05ff8cc945 |
Close
Hashes for playwright-1.30.0-py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24bb8fe1d7ae60ec971668812c0c6c21b2b12d320ff24da59cbb544a6a15a53c |
|
MD5 | 9b3c3e9be7fcccb02ba935e803cde0ca |
|
BLAKE2b-256 | 92752cb609948b5bf3284b87a0d4649739ebf88ed920686995cf266cc15cdbf2 |
Close
Hashes for playwright-1.30.0-py3-none-macosx_11_0_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 115f5d77a21597200428411186ec72e10fed1cc4d7de3e6e705c415b781d344a |
|
MD5 | 0cd11410edb12f998c9163cb8bec8a4d |
|
BLAKE2b-256 | cd455f03775b7f8024718da282d7652e152689b4efbe17957a184370d896f2f9 |
Close
Hashes for playwright-1.30.0-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 228e07e1b2ef0790ec6d258897c50b83b0e8055b318fa2d33fcb86a8c5ba3525 |
|
MD5 | 5824b4bdd42f07777b5d18d17c55fbbe |
|
BLAKE2b-256 | 0fae8ecb7178ad8b6a4e911db324b77a975c40dd4f3c1c92d42258e16863d63f |
Close
Hashes for playwright-1.30.0-py3-none-macosx_10_13_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ea5d88880fbfa69f05ab758ddd66310079828d6c5c8efe497485c341d147a4e |
|
MD5 | d9ecc8ebeaf82d6f408a9c6aca55ec3d |
|
BLAKE2b-256 | 4e9f288b071b2b678d6d43602e25e13de990527ecd3f242b2c5fdf7e638245d1 |