lacuscore 1.10.2__tar.gz → 1.10.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lacuscore
3
- Version: 1.10.2
3
+ Version: 1.10.4
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,6 +28,7 @@ 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: eval-type-backport (>=0.2.0,<0.3.0) ; python_version < "3.10"
31
32
  Requires-Dist: playwrightcapture[recaptcha] (>=1.25.6,<2.0.0)
32
33
  Requires-Dist: pydantic (>=2.8.2,<3.0.0)
33
34
  Requires-Dist: redis[hiredis] (>=5.0.7,<6.0.0)
@@ -6,7 +6,7 @@ import json
6
6
 
7
7
  from enum import IntEnum, unique
8
8
  from logging import LoggerAdapter
9
- from typing import MutableMapping, Any, TypedDict, Literal, Mapping
9
+ from typing import MutableMapping, Any, TypedDict, Mapping
10
10
 
11
11
  from defang import refang # type: ignore[import-untyped]
12
12
  from pydantic import BaseModel, field_validator, model_validator, ValidationError
@@ -87,7 +87,7 @@ class CaptureSettings(BaseModel):
87
87
  url: str | None = None
88
88
  document_name: str | None = None
89
89
  document: str | None = None
90
- browser: Literal['chromium', 'firefox', 'webkit'] | None = None
90
+ browser: str | None = None
91
91
  device_name: str | None = None
92
92
  user_agent: str | None = None
93
93
  proxy: str | dict[str, str] | None = None
@@ -433,8 +433,8 @@ class LacusCore():
433
433
 
434
434
  # Set default as chromium
435
435
  browser_engine: BROWSER = "chromium"
436
- if to_capture.browser:
437
- browser_engine = to_capture.browser
436
+ if to_capture.browser in ['chromium', 'firefox', 'webkit']:
437
+ browser_engine = to_capture.browser # type: ignore[assignment]
438
438
  elif to_capture.user_agent:
439
439
  parsed_string = user_agent_parser.ParseUserAgent(to_capture.user_agent)
440
440
  browser_family = parsed_string['family'].lower()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "lacuscore"
3
- version = "1.10.2"
3
+ version = "1.10.4"
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"
@@ -41,6 +41,7 @@ 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
  pydantic = "^2.8.2"
44
+ eval-type-backport = {version = "^0.2.0", python = "<3.10"}
44
45
 
45
46
  [tool.poetry.extras]
46
47
  docs = ["Sphinx"]
File without changes
File without changes