PlaywrightCapture 1.25.6__tar.gz → 1.25.7__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.25.6 → playwrightcapture-1.25.7}/PKG-INFO +2 -2
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/playwrightcapture/capture.py +9 -2
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/pyproject.toml +4 -4
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/LICENSE +0 -0
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/README.md +0 -0
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/playwrightcapture/__init__.py +0 -0
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/playwrightcapture/exceptions.py +0 -0
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/playwrightcapture/helpers.py +0 -0
- {playwrightcapture-1.25.6 → playwrightcapture-1.25.7}/playwrightcapture/py.typed +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PlaywrightCapture
|
3
|
-
Version: 1.25.
|
3
|
+
Version: 1.25.7
|
4
4
|
Summary: A simple library to capture websites using playwright
|
5
5
|
Home-page: https://github.com/Lookyloo/PlaywrightCapture
|
6
6
|
License: BSD-3-Clause
|
@@ -31,7 +31,7 @@ Requires-Dist: playwright-stealth (>=1.0.6,<2.0.0)
|
|
31
31
|
Requires-Dist: puremagic (>=1.26,<2.0)
|
32
32
|
Requires-Dist: pydub (>=0.25.1,<0.26.0) ; extra == "recaptcha"
|
33
33
|
Requires-Dist: pytz (>=2024.1,<2025.0) ; python_version < "3.9"
|
34
|
-
Requires-Dist: setuptools (>=71.0
|
34
|
+
Requires-Dist: setuptools (>=71.1.0,<72.0.0)
|
35
35
|
Requires-Dist: tzdata (>=2024.1,<2025.0)
|
36
36
|
Requires-Dist: w3lib (>=2.2.1,<3.0.0)
|
37
37
|
Project-URL: Repository, https://github.com/Lookyloo/PlaywrightCapture
|
@@ -404,17 +404,24 @@ class Capture():
|
|
404
404
|
device_context_settings = {}
|
405
405
|
if self.device_name:
|
406
406
|
device_context_settings = self.playwright.devices[self.device_name]
|
407
|
+
# We need to make sure the device_context_settings dict doesn't contains
|
408
|
+
# keys that are set by default in the context creation
|
409
|
+
if context_ua := device_context_settings.pop('user_agent', None):
|
410
|
+
ua = self.user_agent if self.user_agent else context_ua
|
411
|
+
if context_vp := device_context_settings.pop('viewport', self._default_viewport):
|
412
|
+
# Always true, but we also always want to pop it.
|
413
|
+
vp = self.viewport if self.viewport else context_vp
|
407
414
|
|
408
415
|
self.context = await self.browser.new_context(
|
409
416
|
record_har_path=self._temp_harfile.name,
|
410
417
|
ignore_https_errors=True,
|
411
418
|
bypass_csp=True,
|
412
419
|
http_credentials=self.http_credentials if self.http_credentials else None,
|
413
|
-
user_agent=
|
420
|
+
user_agent=ua,
|
414
421
|
locale=self.locale if self.locale else None,
|
415
422
|
timezone_id=self.timezone_id if self.timezone_id else None,
|
416
423
|
color_scheme=self.color_scheme if self.color_scheme else None,
|
417
|
-
viewport=
|
424
|
+
viewport=vp,
|
418
425
|
# For debug only
|
419
426
|
# record_video_dir='./videos/',
|
420
427
|
**device_context_settings
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "PlaywrightCapture"
|
3
|
-
version = "1.25.
|
3
|
+
version = "1.25.7"
|
4
4
|
description = "A simple library to capture websites using playwright"
|
5
5
|
authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
|
6
6
|
license = "BSD-3-Clause"
|
@@ -28,7 +28,7 @@ SpeechRecognition = {version = "^3.10.4", optional = true}
|
|
28
28
|
pytz = {"version" = "^2024.1", python = "<3.9"}
|
29
29
|
tzdata = "^2024.1"
|
30
30
|
playwright-stealth = "^1.0.6"
|
31
|
-
setuptools = "^71.0
|
31
|
+
setuptools = "^71.1.0"
|
32
32
|
puremagic = "^1.26"
|
33
33
|
async-timeout = {version = "^4.0.3", python = "<3.11"}
|
34
34
|
aiohttp = {extras = ["speedups"], version = "^3.9.5"}
|
@@ -42,8 +42,8 @@ optional = true
|
|
42
42
|
|
43
43
|
[tool.poetry.group.dev.dependencies]
|
44
44
|
types-beautifulsoup4 = "^4.12.0.20240511"
|
45
|
-
pytest = "^8.
|
46
|
-
mypy = "^1.
|
45
|
+
pytest = "^8.3.1"
|
46
|
+
mypy = "^1.11.0"
|
47
47
|
types-dateparser = "^1.2.0.20240420"
|
48
48
|
types-pytz = "^2024.1.0.20240417"
|
49
49
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|