lacuscore 1.12.0__tar.gz → 1.12.2__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.0 → lacuscore-1.12.2}/PKG-INFO +2 -2
- {lacuscore-1.12.0 → lacuscore-1.12.2}/lacuscore/lacuscore.py +8 -4
- {lacuscore-1.12.0 → lacuscore-1.12.2}/pyproject.toml +2 -2
- {lacuscore-1.12.0 → lacuscore-1.12.2}/LICENSE +0 -0
- {lacuscore-1.12.0 → lacuscore-1.12.2}/README.md +0 -0
- {lacuscore-1.12.0 → lacuscore-1.12.2}/lacuscore/__init__.py +0 -0
- {lacuscore-1.12.0 → lacuscore-1.12.2}/lacuscore/helpers.py +0 -0
- {lacuscore-1.12.0 → lacuscore-1.12.2}/lacuscore/lacus_monitoring.py +0 -0
- {lacuscore-1.12.0 → lacuscore-1.12.2}/lacuscore/py.typed +0 -0
- {lacuscore-1.12.0 → lacuscore-1.12.2}/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.2
|
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,7 +29,7 @@ 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.
|
32
|
+
Requires-Dist: playwrightcapture[recaptcha] (>=1.27.1,<2.0.0)
|
33
33
|
Requires-Dist: pydantic (>=2.9.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)
|
@@ -376,6 +376,10 @@ class LacusCore():
|
|
376
376
|
logger.warning(f'Settings invalid: {e}')
|
377
377
|
raise CaptureSettingsError('Invalid settings', e)
|
378
378
|
|
379
|
+
# If the class is initialized with max_retries below the one provided in the settings, we use the lowest value
|
380
|
+
# NOTE: make sure the variable is initialized *before* we raise any RetryCapture
|
381
|
+
max_retries = min([to_capture.max_retries, self.max_retries]) if to_capture.max_retries is not None else self.max_retries
|
382
|
+
|
379
383
|
if to_capture.document:
|
380
384
|
# we do not have a URL yet.
|
381
385
|
document_as_bytes = b64decode(to_capture.document)
|
@@ -474,8 +478,6 @@ class LacusCore():
|
|
474
478
|
cookie['path'] = '/'
|
475
479
|
cookies.append(cookie)
|
476
480
|
|
477
|
-
# If the class is initialized with max_retries below the one provided in the settings, we use the lowest value
|
478
|
-
max_retries = min([to_capture.max_retries, self.max_retries]) if to_capture.max_retries is not None else self.max_retries
|
479
481
|
try:
|
480
482
|
logger.debug(f'Capturing {url}')
|
481
483
|
stats_pipeline.sadd(f'stats:{today}:captures', url)
|
@@ -618,6 +620,8 @@ class LacusCore():
|
|
618
620
|
self._store_capture_response(p, uuid, result)
|
619
621
|
else:
|
620
622
|
logger.warning('Got no result at all for the capture.')
|
623
|
+
result = {'error': 'No result at all for the capture, Playwright failed.'}
|
624
|
+
self._store_capture_response(p, uuid, result)
|
621
625
|
p.delete(f'lacus:capture_settings:{uuid}')
|
622
626
|
p.zrem('lacus:ongoing', uuid)
|
623
627
|
p.execute()
|
@@ -763,7 +767,7 @@ class LacusCore():
|
|
763
767
|
continue
|
764
768
|
raise e
|
765
769
|
except DNSException as e:
|
766
|
-
logger.
|
770
|
+
logger.debug(f'No A record for "{hostname}": {e}')
|
767
771
|
break
|
768
772
|
|
769
773
|
_current_retries = 0
|
@@ -779,6 +783,6 @@ class LacusCore():
|
|
779
783
|
continue
|
780
784
|
raise e
|
781
785
|
except DNSException as e:
|
782
|
-
logger.
|
786
|
+
logger.debug(f'No AAAA record for "{hostname}": {e}')
|
783
787
|
break
|
784
788
|
return resolved_ips
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "lacuscore"
|
3
|
-
version = "1.12.
|
3
|
+
version = "1.12.2"
|
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,7 +34,7 @@ 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.1"}
|
38
38
|
defang = "^0.5.3"
|
39
39
|
ua-parser = "^0.18.0"
|
40
40
|
redis = {version = "^5.2.0", extras = ["hiredis"]}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|