lacuscore 1.12.4__tar.gz → 1.12.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.
- {lacuscore-1.12.4 → lacuscore-1.12.6}/PKG-INFO +4 -4
- {lacuscore-1.12.4 → lacuscore-1.12.6}/lacuscore/lacuscore.py +4 -6
- {lacuscore-1.12.4 → lacuscore-1.12.6}/pyproject.toml +5 -5
- {lacuscore-1.12.4 → lacuscore-1.12.6}/LICENSE +0 -0
- {lacuscore-1.12.4 → lacuscore-1.12.6}/README.md +0 -0
- {lacuscore-1.12.4 → lacuscore-1.12.6}/lacuscore/__init__.py +0 -0
- {lacuscore-1.12.4 → lacuscore-1.12.6}/lacuscore/helpers.py +0 -0
- {lacuscore-1.12.4 → lacuscore-1.12.6}/lacuscore/lacus_monitoring.py +0 -0
- {lacuscore-1.12.4 → lacuscore-1.12.6}/lacuscore/py.typed +0 -0
- {lacuscore-1.12.4 → lacuscore-1.12.6}/lacuscore/task_logger.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lacuscore
|
3
|
-
Version: 1.12.
|
3
|
+
Version: 1.12.6
|
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
|
@@ -29,11 +29,11 @@ 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.7.0,<3.0.0) ; python_version >= "3.9"
|
31
31
|
Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0) ; python_version < "3.10"
|
32
|
-
Requires-Dist: playwrightcapture[recaptcha] (>=1.27.
|
33
|
-
Requires-Dist: pydantic (>=2.10.
|
32
|
+
Requires-Dist: playwrightcapture[recaptcha] (>=1.27.4,<2.0.0)
|
33
|
+
Requires-Dist: pydantic (>=2.10.2,<3.0.0)
|
34
34
|
Requires-Dist: redis[hiredis] (>=5.2.0,<6.0.0)
|
35
35
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
36
|
-
Requires-Dist: ua-parser (>=0.
|
36
|
+
Requires-Dist: ua-parser[regex] (>=1.0.0,<2.0.0)
|
37
37
|
Project-URL: Documentation, https://lacuscore.readthedocs.io/en/latest/
|
38
38
|
Project-URL: Repository, https://github.com/ail-project/LacusCore
|
39
39
|
Description-Content-Type: text/markdown
|
@@ -24,6 +24,8 @@ from collections.abc import Iterator
|
|
24
24
|
from uuid import uuid4
|
25
25
|
from urllib.parse import urlsplit
|
26
26
|
|
27
|
+
import ua_parser
|
28
|
+
|
27
29
|
from dns.resolver import Cache
|
28
30
|
from dns.asyncresolver import Resolver
|
29
31
|
from dns.exception import DNSException
|
@@ -34,7 +36,6 @@ from pydantic import ValidationError
|
|
34
36
|
from redis import Redis
|
35
37
|
from redis.exceptions import ConnectionError as RedisConnectionError
|
36
38
|
from redis.exceptions import DataError
|
37
|
-
from ua_parser import user_agent_parser # type: ignore[import-untyped]
|
38
39
|
|
39
40
|
from . import task_logger
|
40
41
|
from .helpers import (
|
@@ -108,9 +109,6 @@ class LacusCore():
|
|
108
109
|
self.dnsresolver.timeout = 2
|
109
110
|
self.dnsresolver.lifetime = 3
|
110
111
|
|
111
|
-
# Enable new chromium headless by default.
|
112
|
-
os.environ["PLAYWRIGHT_CHROMIUM_USE_HEADLESS_NEW"] = "1"
|
113
|
-
|
114
112
|
def check_redis_up(self) -> bool:
|
115
113
|
"""Check if redis is reachable"""
|
116
114
|
return bool(self.redis.ping())
|
@@ -451,8 +449,8 @@ class LacusCore():
|
|
451
449
|
if to_capture.browser:
|
452
450
|
browser_engine = to_capture.browser
|
453
451
|
elif to_capture.user_agent:
|
454
|
-
parsed_string =
|
455
|
-
browser_family = parsed_string
|
452
|
+
parsed_string = ua_parser.parse(to_capture.user_agent).with_defaults()
|
453
|
+
browser_family = parsed_string.user_agent.family.lower()
|
456
454
|
if browser_family.startswith('chrom'):
|
457
455
|
browser_engine = 'chromium'
|
458
456
|
elif browser_family.startswith('firefox'):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "lacuscore"
|
3
|
-
version = "1.12.
|
3
|
+
version = "1.12.6"
|
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,13 +34,13 @@ Sphinx = [
|
|
34
34
|
{version = "^7.2", python = ">=3.9,<3.10", optional = true},
|
35
35
|
{version = "^8", python = ">=3.10", optional = true}
|
36
36
|
]
|
37
|
-
playwrightcapture = {extras = ["recaptcha"], version = "^1.27.
|
37
|
+
playwrightcapture = {extras = ["recaptcha"], version = "^1.27.4"}
|
38
38
|
defang = "^0.5.3"
|
39
|
-
ua-parser = "^0.
|
39
|
+
ua-parser = {extras = ["regex"], version = "^1.0.0"}
|
40
40
|
redis = {version = "^5.2.0", extras = ["hiredis"]}
|
41
41
|
dnspython = {version = "^2.7.0", python = ">=3.9"}
|
42
42
|
async-timeout = {version = "^4.0.3", python = "<3.11"}
|
43
|
-
pydantic = "^2.10.
|
43
|
+
pydantic = "^2.10.2"
|
44
44
|
eval-type-backport = {version = "^0.2.0", python = "<3.10"}
|
45
45
|
|
46
46
|
[tool.poetry.extras]
|
@@ -55,7 +55,7 @@ ipython = [
|
|
55
55
|
{version = "^8.18.0", python = ">=3.9"},
|
56
56
|
{version = "^8.19.0", python = ">=3.10"}
|
57
57
|
]
|
58
|
-
pytest = "^8.3.
|
58
|
+
pytest = "^8.3.4"
|
59
59
|
|
60
60
|
[build-system]
|
61
61
|
requires = ["poetry_core"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|