lacuscore 1.9.6__tar.gz → 1.10.1__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: lacuscore
3
- Version: 1.9.6
3
+ Version: 1.10.1
4
4
  Summary: Core of Lacus, usable as a module
5
5
  Home-page: https://github.com/ail-project/LacusCore
6
6
  License: BSD-3-Clause
@@ -28,8 +28,8 @@ Requires-Dist: Sphinx (>=7.2,<8.0) ; (python_version >= "3.9") and (extra == "do
28
28
  Requires-Dist: async-timeout (>=4.0.3,<5.0.0) ; python_version < "3.11"
29
29
  Requires-Dist: defang (>=0.5.3,<0.6.0)
30
30
  Requires-Dist: dnspython (>=2.6.1,<3.0.0)
31
- Requires-Dist: playwrightcapture[recaptcha] (>=1.24.11,<2.0.0)
32
- Requires-Dist: redis[hiredis] (>=5.0.6,<6.0.0)
31
+ Requires-Dist: playwrightcapture[recaptcha] (>=1.25.5,<2.0.0)
32
+ Requires-Dist: redis[hiredis] (>=5.0.7,<6.0.0)
33
33
  Requires-Dist: requests (>=2.32.3,<3.0.0)
34
34
  Requires-Dist: ua-parser (>=0.18.0,<0.19.0)
35
35
  Project-URL: Documentation, https://lacuscore.readthedocs.io/en/latest/
@@ -4,7 +4,7 @@ from __future__ import annotations
4
4
 
5
5
  from enum import IntEnum, unique
6
6
  from logging import LoggerAdapter
7
- from typing import MutableMapping, Any, TypedDict
7
+ from typing import MutableMapping, Any, TypedDict, Literal
8
8
 
9
9
  from playwrightcapture.capture import CaptureResponse as PlaywrightCaptureResponse
10
10
 
@@ -77,7 +77,7 @@ class CaptureSettings(TypedDict, total=False):
77
77
  url: str | None
78
78
  document_name: str | None
79
79
  document: str | None
80
- browser: str | None
80
+ browser: Literal['chromium', 'firefox', 'webkit'] | None
81
81
  device_name: str | None
82
82
  user_agent: str | None
83
83
  proxy: str | dict[str, str] | None
@@ -30,7 +30,7 @@ from dns.exception import DNSException
30
30
  from dns.exception import Timeout as DNSTimeout
31
31
 
32
32
  from defang import refang # type: ignore[import-untyped]
33
- from playwrightcapture import Capture, PlaywrightCaptureException
33
+ from playwrightcapture import Capture, PlaywrightCaptureException, InvalidPlaywrightParameter
34
34
  from redis import Redis
35
35
  from redis.exceptions import ConnectionError as RedisConnectionError
36
36
  from redis.exceptions import DataError
@@ -603,7 +603,7 @@ class LacusCore():
603
603
  stats_pipeline.zincrby(f'stats:{today}:errors', 1, result['error_name'])
604
604
  except RetryCapture as e:
605
605
  raise e
606
- except PlaywrightCaptureException as e:
606
+ except (PlaywrightCaptureException, InvalidPlaywrightParameter) as e:
607
607
  logger.warning(f'Invalid parameters for the capture of {url} - {e}')
608
608
  result = {'error': f'Invalid parameters for the capture of {url} - {e}'}
609
609
  raise CaptureError(f'Invalid parameters for the capture of {url} - {e}')
@@ -633,7 +633,7 @@ class LacusCore():
633
633
  logger.debug(f'Retrying {url} for the first time.')
634
634
  retry = True
635
635
  self.redis.setex(f'lacus:capture_retry:{uuid}',
636
- self.max_capture_time * (self.max_retries + 1),
636
+ self.max_capture_time * (self.max_retries + 10),
637
637
  self.max_retries)
638
638
  else:
639
639
  current_retry = int(_current_retry.decode())
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "lacuscore"
3
- version = "1.9.6"
3
+ version = "1.10.1"
4
4
  description = "Core of Lacus, usable as a module"
5
5
  authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
6
6
  license = "BSD-3-Clause"
@@ -34,10 +34,10 @@ Sphinx = [
34
34
  {version = "<7.2", python = "<3.9", optional = true},
35
35
  {version = "^7.2", python = ">=3.9", optional = true}
36
36
  ]
37
- playwrightcapture = {extras = ["recaptcha"], version = "^1.24.11"}
37
+ playwrightcapture = {extras = ["recaptcha"], version = "^1.25.5"}
38
38
  defang = "^0.5.3"
39
39
  ua-parser = "^0.18.0"
40
- redis = {version = "^5.0.6", extras = ["hiredis"]}
40
+ redis = {version = "^5.0.7", extras = ["hiredis"]}
41
41
  dnspython = "^2.6.1"
42
42
  async-timeout = {version = "^4.0.3", python = "<3.11"}
43
43
 
@@ -46,8 +46,8 @@ docs = ["Sphinx"]
46
46
 
47
47
  [tool.poetry.group.dev.dependencies]
48
48
  types-redis = {version = "^4.6.0.20240425"}
49
- mypy = "^1.10.0"
50
- types-requests = "^2.32.0.20240602"
49
+ mypy = "^1.10.1"
50
+ types-requests = "^2.32.0.20240712"
51
51
  types-beautifulsoup4 = "^4.12.0.20240511"
52
52
  ipython = [
53
53
  {version = "<8.13.0", python = "<3.9"},
File without changes
File without changes
File without changes