lacuscore 1.15.1__tar.gz → 1.16.0__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.3
2
2
  Name: lacuscore
3
- Version: 1.15.1
3
+ Version: 1.16.0
4
4
  Summary: Core of Lacus, usable as a module
5
5
  License: BSD-3-Clause
6
6
  Author: Raphaël Vinot
@@ -26,10 +26,10 @@ Requires-Dist: async-timeout (>=5.0.1) ; python_version < "3.11"
26
26
  Requires-Dist: defang (>=0.5.3)
27
27
  Requires-Dist: dnspython (>=2.7.0)
28
28
  Requires-Dist: eval-type-backport (>=0.2.2) ; python_version < "3.10"
29
- Requires-Dist: playwrightcapture[recaptcha] (>=1.30.0)
29
+ Requires-Dist: playwrightcapture[recaptcha] (>=1.31.0)
30
30
  Requires-Dist: pydantic (>=2.11.5)
31
31
  Requires-Dist: redis[hiredis] (>=5.3.0,<6.0.0)
32
- Requires-Dist: requests (>=2.32.3)
32
+ Requires-Dist: requests (>=2.32.4)
33
33
  Requires-Dist: typing-extensions (>=4.12.2,<5.0.0) ; python_version < "3.12"
34
34
  Requires-Dist: ua-parser[regex] (>=1.0.1)
35
35
  Project-URL: Documentation, https://lacuscore.readthedocs.io/en/latest/
@@ -137,12 +137,12 @@ class LacusCore():
137
137
  storage: dict[str, Any] | None=None,
138
138
  headers: dict[str, str] | None=None,
139
139
  http_credentials: dict[str, str] | None=None,
140
- geolocation: dict[str, float] | None=None,
140
+ geolocation: dict[str, str | int | float] | None=None,
141
141
  timezone_id: str | None=None,
142
142
  locale: str | None=None,
143
143
  color_scheme: str | None=None,
144
144
  java_script_enabled: bool=True,
145
- viewport: dict[str, int] | None=None,
145
+ viewport: dict[str, int | str] | None=None,
146
146
  referer: str | None=None,
147
147
  rendered_hostname_only: bool=True,
148
148
  with_screenshot: bool=True,
@@ -171,12 +171,12 @@ class LacusCore():
171
171
  storage: dict[str, Any] | None=None,
172
172
  headers: dict[str, str] | None=None,
173
173
  http_credentials: dict[str, str] | None=None,
174
- geolocation: dict[str, float] | None=None,
174
+ geolocation: dict[str, str | int | float] | None=None,
175
175
  timezone_id: str | None=None,
176
176
  locale: str | None=None,
177
177
  color_scheme: str | None=None,
178
178
  java_script_enabled: bool=True,
179
- viewport: dict[str, int] | None=None,
179
+ viewport: dict[str, int | str] | None=None,
180
180
  referer: str | None=None,
181
181
  rendered_hostname_only: bool=True,
182
182
  with_screenshot: bool=True,
@@ -260,6 +260,10 @@ class LacusCore():
260
260
  # Make sure we do not already have a capture with that UUID
261
261
  if self.get_capture_status(uuid) == CaptureStatus.UNKNOWN:
262
262
  perma_uuid = uuid
263
+ elif (self.get_capture_status(uuid) == CaptureStatus.DONE
264
+ and self.get_capture(uuid).get('error') is not None):
265
+ # The UUID exists, the capture is done, but it has an error -> re-capture on the same UUID
266
+ perma_uuid = uuid
263
267
  else:
264
268
  perma_uuid = str(uuid4())
265
269
  self.master_logger.warning(f'UUID {uuid} already exists, forcing a new one: {perma_uuid}.')
@@ -379,7 +383,7 @@ class LacusCore():
379
383
  logger=logger,
380
384
  message='Capture raised an uncaught exception')
381
385
  # Make sur the task starts.
382
- await asyncio.sleep(0.5)
386
+ await asyncio.sleep(0.1)
383
387
 
384
388
  async def _capture(self, uuid: str, priority: int) -> None:
385
389
  """Trigger a specific capture
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lacuscore"
3
- version = "1.15.1"
3
+ version = "1.16.0"
4
4
  description = "Core of Lacus, usable as a module"
5
5
  authors = [
6
6
  {name="Raphaël Vinot", email="raphael.vinot@circl.lu"}
@@ -14,8 +14,8 @@ requires-python = ">=3.9.2,<4.0"
14
14
  dynamic = [ "classifiers" ]
15
15
 
16
16
  dependencies = [
17
- "requests (>=2.32.3)",
18
- "playwrightcapture[recaptcha] (>=1.30.0)",
17
+ "requests (>=2.32.4)",
18
+ "playwrightcapture[recaptcha] (>=1.31.0)",
19
19
  "defang (>=0.5.3)",
20
20
  "ua-parser[regex] (>=1.0.1)",
21
21
  "redis[hiredis] (>=5.3.0,<6.0.0)",
@@ -49,7 +49,7 @@ docs = ["Sphinx (>=8.2.3) ; python_version >= \"3.11\""]
49
49
  [tool.poetry.group.dev.dependencies]
50
50
  mypy = "^1.16.0"
51
51
  types-redis = {version = "^4.6.0.20241004"}
52
- types-requests = "^2.32.0.20250602"
52
+ types-requests = "^2.32.4.20250611"
53
53
  types-beautifulsoup4 = "^4.12.0.20250516"
54
54
  pytest = "^8.4.0"
55
55
 
File without changes
File without changes