PlaywrightCapture 1.27.4__tar.gz → 1.27.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PlaywrightCapture
3
- Version: 1.27.4
3
+ Version: 1.27.5
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
@@ -20,13 +20,13 @@ Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Topic :: Internet
21
21
  Classifier: Topic :: Security
22
22
  Provides-Extra: recaptcha
23
- Requires-Dist: SpeechRecognition (>=3.11.0) ; extra == "recaptcha"
24
- Requires-Dist: aiohttp-socks (>=0.9,<0.10)
25
- Requires-Dist: aiohttp[speedups] (>=3.11.9,<4.0.0)
23
+ Requires-Dist: SpeechRecognition (>=3.12.0) ; extra == "recaptcha"
24
+ Requires-Dist: aiohttp-socks (>=0.10,<0.11)
25
+ Requires-Dist: aiohttp[speedups] (>=3.11.11,<4.0.0)
26
26
  Requires-Dist: async-timeout (>=4.0.3,<5.0.0) ; python_version < "3.11"
27
27
  Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.12.3,<5.0.0)
28
28
  Requires-Dist: dateparser (>=1.2.0,<2.0.0)
29
- Requires-Dist: playwright (>=1.49.0,<2.0.0)
29
+ Requires-Dist: playwright (>=1.49.1,<2.0.0)
30
30
  Requires-Dist: playwright-stealth (>=1.0.6,<2.0.0)
31
31
  Requires-Dist: puremagic (>=1.28,<2.0)
32
32
  Requires-Dist: pydub (>=0.25.1,<0.26.0) ; extra == "recaptcha"
@@ -18,15 +18,14 @@ from io import BytesIO
18
18
  from logging import LoggerAdapter, Logger
19
19
  from tempfile import NamedTemporaryFile
20
20
  from typing import Any, TypedDict, Literal, TYPE_CHECKING
21
- from collections.abc import MutableMapping, Generator
21
+ from collections.abc import MutableMapping, Iterator
22
22
  from urllib.parse import urlparse, unquote, urljoin, urlsplit, urlunsplit
23
23
  from zipfile import ZipFile
24
24
 
25
25
  import aiohttp
26
26
  import dateparser
27
- import urllib3
28
27
 
29
- from aiohttp_socks import ProxyConnector # type: ignore[import-untyped]
28
+ from aiohttp_socks import ProxyConnector
30
29
  from bs4 import BeautifulSoup
31
30
  from charset_normalizer import from_bytes
32
31
  from playwright._impl._errors import TargetClosedError
@@ -61,9 +60,6 @@ try:
61
60
  except ImportError:
62
61
  CAN_SOLVE_CAPTCHA = False
63
62
 
64
- # Do not show TLS warnings from urllib3 when fetching a favicon
65
- urllib3.disable_warnings()
66
-
67
63
 
68
64
  class CaptureResponse(TypedDict, total=False):
69
65
 
@@ -102,7 +98,7 @@ class PlaywrightCaptureLogAdapter(LoggerAdapter): # type: ignore[type-arg]
102
98
  class PCStealthConfig(StealthConfig): # type: ignore[misc]
103
99
 
104
100
  @property
105
- def enabled_scripts(self) -> Generator[str]:
101
+ def enabled_scripts(self) -> Iterator[str]:
106
102
  self.chrome_app = True
107
103
  self.chrome_csi = True
108
104
  self.chrome_runtime = True
@@ -227,6 +223,7 @@ class Capture():
227
223
 
228
224
  self.browser = await self.playwright[self.browser_name].launch(
229
225
  proxy=self.proxy if self.proxy else None,
226
+ channel="chromium" if self.browser_name == "chromium" else None,
230
227
  # headless=False
231
228
  )
232
229
 
@@ -698,6 +695,7 @@ class Capture():
698
695
  "Accept all",
699
696
  "Accept",
700
697
  "Agree and close",
698
+ "I agree",
701
699
  # Dutch
702
700
  "Accepteer",
703
701
  # Spanish
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "PlaywrightCapture"
3
- version = "1.27.4"
3
+ version = "1.27.5"
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"
@@ -19,19 +19,19 @@ classifiers=[
19
19
 
20
20
  [tool.poetry.dependencies]
21
21
  python = "^3.9"
22
- playwright = "^1.49.0"
22
+ playwright = "^1.49.1"
23
23
  dateparser = "^1.2.0"
24
24
  beautifulsoup4 = {version= "^4.12.3", extras = ["lxml", "charset_normalizer"]}
25
25
  w3lib = "^2.2.1"
26
26
  pydub = {version = "^0.25.1", optional = true}
27
- SpeechRecognition = {version = ">=3.11.0", optional = true}
27
+ SpeechRecognition = {version = ">=3.12.0", optional = true}
28
28
  tzdata = "^2024.2"
29
29
  playwright-stealth = "^1.0.6"
30
30
  setuptools = "^75.6.0"
31
31
  puremagic = "^1.28"
32
32
  async-timeout = {version = "^4.0.3", python = "<3.11"}
33
- aiohttp = {version = "^3.11.9", extras = ["speedups"]}
34
- aiohttp-socks = "^0.9"
33
+ aiohttp = {version = "^3.11.11", extras = ["speedups"]}
34
+ aiohttp-socks = "^0.10"
35
35
 
36
36
  [tool.poetry.extras]
37
37
  recaptcha = ["pydub", "SpeechRecognition"]
@@ -42,9 +42,9 @@ optional = true
42
42
  [tool.poetry.group.dev.dependencies]
43
43
  types-beautifulsoup4 = "^4.12.0.20241020"
44
44
  pytest = "^8.3.4"
45
- mypy = "^1.13.0"
45
+ mypy = "^1.14.0"
46
46
  types-dateparser = "^1.2.0.20240420"
47
- types-pytz = "^2024.2.0.20241003"
47
+ types-pytz = "^2024.2.0.20241221"
48
48
 
49
49
 
50
50
  [build-system]