PlaywrightCapture 1.31.4__tar.gz → 1.31.6__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.31.4 → playwrightcapture-1.31.6}/PKG-INFO +2 -2
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/playwrightcapture/capture.py +8 -5
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/pyproject.toml +2 -2
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/LICENSE +0 -0
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/README.md +0 -0
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/playwrightcapture/__init__.py +0 -0
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/playwrightcapture/exceptions.py +0 -0
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/playwrightcapture/helpers.py +0 -0
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/playwrightcapture/py.typed +0 -0
- {playwrightcapture-1.31.4 → playwrightcapture-1.31.6}/playwrightcapture/socks5dnslookup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: PlaywrightCapture
|
3
|
-
Version: 1.31.
|
3
|
+
Version: 1.31.6
|
4
4
|
Summary: A simple library to capture websites using playwright
|
5
5
|
License: BSD-3-Clause
|
6
6
|
Author: Raphaël Vinot
|
@@ -25,7 +25,7 @@ Requires-Dist: async-timeout (>=5.0.1) ; python_version < "3.11"
|
|
25
25
|
Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.13.4)
|
26
26
|
Requires-Dist: dateparser (>=1.2.2)
|
27
27
|
Requires-Dist: dnspython (>=2.7.0,<3.0.0)
|
28
|
-
Requires-Dist: playwright (>=1.
|
28
|
+
Requires-Dist: playwright (>=1.54.0)
|
29
29
|
Requires-Dist: playwright-stealth (>=2)
|
30
30
|
Requires-Dist: puremagic (>=1.30)
|
31
31
|
Requires-Dist: pydub (>=0.25.1) ; (python_version < "3.10") and (extra == "recaptcha")
|
@@ -299,7 +299,7 @@ class Capture():
|
|
299
299
|
return self._cookies
|
300
300
|
|
301
301
|
@cookies.setter
|
302
|
-
def cookies(self, cookies: list[dict[str, Any]] | None) -> None:
|
302
|
+
def cookies(self, cookies: list[SetCookieParam | dict[str, Any]] | None) -> None:
|
303
303
|
'''Cookies to send along to the initial request.
|
304
304
|
:param cookies: The cookies, in this format: https://playwright.dev/python/docs/api/class-browsercontext#browser-context-add-cookies
|
305
305
|
'''
|
@@ -498,7 +498,7 @@ class Capture():
|
|
498
498
|
# 'navigator_vendor': False, # It's set correctly by playwright
|
499
499
|
'navigator_webdriver': True,
|
500
500
|
# 'sec_ch_ua': True,
|
501
|
-
|
501
|
+
'webgl_vendor': True, # It's not net correctly by playwright in headless mode.
|
502
502
|
|
503
503
|
# ## Overwrite the default values
|
504
504
|
'navigator_languages_override': None,
|
@@ -508,10 +508,10 @@ class Capture():
|
|
508
508
|
# 'sec_ch_ua_override': Stealth._get_greased_chrome_sec_ua_ch(ua),
|
509
509
|
# 'webgl_renderer_override': None,
|
510
510
|
# 'webgl_vendor_override': None,
|
511
|
-
})
|
512
511
|
|
513
|
-
|
514
|
-
|
512
|
+
# For testing
|
513
|
+
# 'script_logging': True,
|
514
|
+
})
|
515
515
|
|
516
516
|
if self.cookies:
|
517
517
|
try:
|
@@ -559,6 +559,9 @@ class Capture():
|
|
559
559
|
elif self.browser_name == 'chromium':
|
560
560
|
await self.context.grant_permissions(chromium_permissions)
|
561
561
|
|
562
|
+
# Apply stealth
|
563
|
+
await stealth.apply_stealth_async(self.context)
|
564
|
+
|
562
565
|
async def __cloudflare_bypass_attempt(self, page: Page) -> None:
|
563
566
|
# This method aims to bypass cloudflare checks, but it mostly doesn't work.
|
564
567
|
max_tries = 5
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "PlaywrightCapture"
|
3
|
-
version = "1.31.
|
3
|
+
version = "1.31.6"
|
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,7 +12,7 @@ requires-python = ">=3.9,<4.0"
|
|
12
12
|
dynamic = [ "classifiers" ]
|
13
13
|
|
14
14
|
dependencies = [
|
15
|
-
"playwright (>=1.
|
15
|
+
"playwright (>=1.54.0)",
|
16
16
|
"dateparser (>=1.2.2)",
|
17
17
|
"beautifulsoup4[charset-normalizer,lxml] (>=4.13.4)",
|
18
18
|
"w3lib (>=2.3.1)",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|