File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
66
77| | Linux | macOS | Windows |
88| :--- | :---: | :---: | :---: |
9- | Chromium <!-- GEN:chromium-version --> 86 .0.4238 .0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
10- | WebKit 14.0 | ✅ | ✅ | ✅ |
11- | Firefox <!-- GEN:firefox-version --> 80.0b8 <!-- GEN:stop --> | ✅ | ✅ | ✅ |
9+ | Chromium <!-- GEN:chromium-version --> 88 .0.4324 .0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
10+ | WebKit <!-- GEN:webkit-version --> 14.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
11+ | Firefox <!-- GEN:firefox-version --> 83.0 <!-- GEN:stop --> | ✅ | ✅ | ✅ |
1212
1313Headless execution is supported for all browsers on all platforms.
1414
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ python scripts/update_versions.py
4+
35function update_api {
46 echo " Generating $1 "
57 file_name=" $1 "
Original file line number Diff line number Diff line change 1+ import re
2+ from playwright import sync_playwright
3+
4+ with sync_playwright () as p :
5+ r = open ("README.md" , "r" )
6+ text = r .read ()
7+ for browser_type in [p .chromium , p .firefox , p .webkit ]:
8+ rx = re .compile (r"<!-- GEN:" + browser_type .name + r"-version -->([^<]+)<!-- GEN:stop -->" )
9+ browser = browser_type .launch ()
10+ text = rx .sub (f"<!-- GEN:{ browser_type .name } -version -->{ browser .version } <!-- GEN:stop -->" , text )
11+ browser .close ()
12+
13+ w = open ("README.md" , "w" )
14+ w .write (text )
15+ w .close ()
You can’t perform that action at this time.
0 commit comments