PlaywrightCapture 1.40.2__tar.gz → 1.40.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/PKG-INFO +4 -4
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/playwrightcapture/capture.py +22 -20
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/pyproject.toml +6 -6
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/LICENSE +0 -0
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/README.md +0 -0
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/playwrightcapture/__init__.py +0 -0
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/playwrightcapture/exceptions.py +0 -0
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/playwrightcapture/helpers.py +0 -0
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/playwrightcapture/py.typed +0 -0
- {playwrightcapture-1.40.2 → playwrightcapture-1.40.4}/playwrightcapture/socks5dnslookup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PlaywrightCapture
|
|
3
|
-
Version: 1.40.
|
|
3
|
+
Version: 1.40.4
|
|
4
4
|
Summary: A simple library to capture websites using playwright
|
|
5
5
|
License-Expression: BSD-3-Clause
|
|
6
6
|
License-File: LICENSE
|
|
@@ -20,14 +20,14 @@ Classifier: Topic :: Security
|
|
|
20
20
|
Provides-Extra: recaptcha
|
|
21
21
|
Requires-Dist: SpeechRecognition (>=3.17.0) ; extra == "recaptcha"
|
|
22
22
|
Requires-Dist: aiohttp-socks (>=0.11.0)
|
|
23
|
-
Requires-Dist: aiohttp[speedups] (>=3.14.
|
|
23
|
+
Requires-Dist: aiohttp[speedups] (>=3.14.3)
|
|
24
24
|
Requires-Dist: async-timeout (>=5.0.1) ; python_version < "3.11"
|
|
25
25
|
Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.15.0)
|
|
26
26
|
Requires-Dist: charset-normalizer (>=3.4.6,<4.0.0)
|
|
27
27
|
Requires-Dist: dnspython (>=2.7.0,<3.0.0)
|
|
28
|
-
Requires-Dist: lookyloo-models (>=0.
|
|
28
|
+
Requires-Dist: lookyloo-models (>=0.3.0)
|
|
29
29
|
Requires-Dist: orjson (>=3.11.4,<4.0.0)
|
|
30
|
-
Requires-Dist: playwright (>=1.
|
|
30
|
+
Requires-Dist: playwright (>=1.62.0)
|
|
31
31
|
Requires-Dist: playwright-stealth (>=2.0.3)
|
|
32
32
|
Requires-Dist: pure-magic-rs (>=0.4.3)
|
|
33
33
|
Requires-Dist: pydub-ng (>=0.2.0) ; extra == "recaptcha"
|
|
@@ -138,23 +138,6 @@ class Capture():
|
|
|
138
138
|
_default_timeout: int = 90 # set to 90s by default
|
|
139
139
|
_minimal_timeout: int = 15 # set to 15s - It makes little sense to attempt a capture below that limit.
|
|
140
140
|
|
|
141
|
-
_requests: dict[str, bytes] = {}
|
|
142
|
-
|
|
143
|
-
# Initialize the values with getter/setter
|
|
144
|
-
_headers: Headers = {}
|
|
145
|
-
_cookies: list[Cookie] = []
|
|
146
|
-
_storage: StorageState = {}
|
|
147
|
-
_viewport: ViewportSize | None = None
|
|
148
|
-
_user_agent: str = ''
|
|
149
|
-
_http_credentials: HttpCredentials = {}
|
|
150
|
-
_geolocation: Geolocation = {}
|
|
151
|
-
_timezone_id: str = ''
|
|
152
|
-
_locale: str = 'en-US'
|
|
153
|
-
_color_scheme: Literal['dark', 'light', 'no-preference', 'null'] | None = None
|
|
154
|
-
_java_script_enabled: bool = True
|
|
155
|
-
_capture_timeout: int = _default_timeout
|
|
156
|
-
_proxy: ProxySettings = {}
|
|
157
|
-
|
|
158
141
|
# Do not wait for webfonts before taking screenshots.
|
|
159
142
|
# 2026-04-08: Pass the env to the process in the launch call
|
|
160
143
|
_env: dict[str, str | float | bool] = {'PW_TEST_SCREENSHOT_NO_FONTS_READY': '1'}
|
|
@@ -175,6 +158,27 @@ class Capture():
|
|
|
175
158
|
"""
|
|
176
159
|
master_logger = logging.getLogger('playwrightcapture')
|
|
177
160
|
master_logger.setLevel(loglevel)
|
|
161
|
+
|
|
162
|
+
# #### internal variables, do not make them class vars!
|
|
163
|
+
self._requests: dict[str, bytes] = {}
|
|
164
|
+
|
|
165
|
+
# Initialize the values with getter/setter
|
|
166
|
+
self._headers: Headers = {}
|
|
167
|
+
self._cookies: list[Cookie] = []
|
|
168
|
+
self._storage: StorageState = {}
|
|
169
|
+
self._viewport: ViewportSize | None = None
|
|
170
|
+
self._user_agent: str = ''
|
|
171
|
+
self._http_credentials: HttpCredentials = {}
|
|
172
|
+
self._geolocation: Geolocation = {}
|
|
173
|
+
self._timezone_id: str = ''
|
|
174
|
+
self._locale: str = 'en-US'
|
|
175
|
+
self._color_scheme: Literal['dark', 'light', 'no-preference', 'null'] | None = None
|
|
176
|
+
self._java_script_enabled: bool = True
|
|
177
|
+
self._capture_timeout: int = self._default_timeout
|
|
178
|
+
self._proxy: ProxySettings = {}
|
|
179
|
+
|
|
180
|
+
# ###
|
|
181
|
+
|
|
178
182
|
self.logger: Logger | PlaywrightCaptureLogAdapter
|
|
179
183
|
self.uuid = uuid
|
|
180
184
|
self.only_global_lookup = only_global_lookup
|
|
@@ -552,9 +556,7 @@ class Capture():
|
|
|
552
556
|
|
|
553
557
|
@storage.setter
|
|
554
558
|
def storage(self, storage: dict[str, Any] | None) -> None:
|
|
555
|
-
if
|
|
556
|
-
return
|
|
557
|
-
if 'cookies' in storage and 'origins' in storage:
|
|
559
|
+
if storage and 'cookies' in storage and 'origins' in storage:
|
|
558
560
|
self._storage['cookies'] = storage['cookies']
|
|
559
561
|
self._storage['origins'] = storage['origins']
|
|
560
562
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "PlaywrightCapture"
|
|
3
|
-
version = "1.40.
|
|
3
|
+
version = "1.40.4"
|
|
4
4
|
description = "A simple library to capture websites using playwright"
|
|
5
5
|
authors = [
|
|
6
6
|
{name="Raphaël Vinot", email= "raphael.vinot@circl.lu"}
|
|
@@ -12,12 +12,12 @@ requires-python = ">=3.10,<3.15"
|
|
|
12
12
|
dynamic = [ "classifiers" ]
|
|
13
13
|
|
|
14
14
|
dependencies = [
|
|
15
|
-
"playwright (>=1.
|
|
15
|
+
"playwright (>=1.62.0)",
|
|
16
16
|
"beautifulsoup4[charset-normalizer,lxml] (>=4.15.0)",
|
|
17
17
|
"w3lib (>=2.4.1)",
|
|
18
18
|
"playwright-stealth (>=2.0.3)",
|
|
19
19
|
"async-timeout (>=5.0.1) ; python_version < \"3.11\"",
|
|
20
|
-
"aiohttp[speedups] (>=3.14.
|
|
20
|
+
"aiohttp[speedups] (>=3.14.3)",
|
|
21
21
|
"aiohttp-socks (>=0.11.0)",
|
|
22
22
|
"typing-extensions (>=4.12.2,<5.0.0) ; python_version < \"3.12\"",
|
|
23
23
|
"dnspython (>=2.7.0,<3.0.0)",
|
|
@@ -25,7 +25,7 @@ dependencies = [
|
|
|
25
25
|
"rfc3161-client (>=1.0.4,<2.0.0)",
|
|
26
26
|
"orjson (>=3.11.4,<4.0.0)",
|
|
27
27
|
"pure-magic-rs (>=0.4.3)",
|
|
28
|
-
"lookyloo-models (>=0.
|
|
28
|
+
"lookyloo-models (>=0.3.0)",
|
|
29
29
|
"charset-normalizer (>=3.4.6,<4.0.0)",
|
|
30
30
|
"pyfaup-rs (>=0.4.6,<0.5.0)"
|
|
31
31
|
]
|
|
@@ -52,9 +52,9 @@ recaptcha = [
|
|
|
52
52
|
[tool.poetry.group.dev.dependencies]
|
|
53
53
|
types-beautifulsoup4 = "^4.12.0.20250516"
|
|
54
54
|
pytest = "^9.1.1"
|
|
55
|
-
mypy = "^2.
|
|
55
|
+
mypy = "^2.3.0"
|
|
56
56
|
types-dateparser = "^1.4.1.20260617"
|
|
57
|
-
types-pytz = "^2026.
|
|
57
|
+
types-pytz = "^2026.3.1.20260727"
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|