lacuscore 1.15.0__py3-none-any.whl → 1.15.1__py3-none-any.whl

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/helpers.py CHANGED
@@ -122,12 +122,12 @@ class CaptureSettings(BaseModel):
122
122
  storage: dict[str, Any] | None = None
123
123
  headers: dict[str, str] | None = None
124
124
  http_credentials: dict[str, str] | None = None
125
- geolocation: dict[str, float] | None = None
125
+ geolocation: dict[str, str | int | float] | None = None
126
126
  timezone_id: str | None = None
127
127
  locale: str | None = None
128
- color_scheme: str | None = None
128
+ color_scheme: Literal['dark', 'light', 'no-preference', 'null'] | None = None
129
129
  java_script_enabled: bool = True
130
- viewport: dict[str, int] | None = None
130
+ viewport: dict[str, str | int] | None = None
131
131
  referer: str | None = None
132
132
  with_screenshot: bool = True
133
133
  with_favicon: bool = True
lacuscore/lacuscore.py CHANGED
@@ -269,7 +269,7 @@ class LacusCore():
269
269
  p = self.redis.pipeline()
270
270
  p.set(f'lacus:query_hash:{hash_query}', perma_uuid, nx=True, ex=recapture_interval)
271
271
  p.hset(f'lacus:capture_settings:{perma_uuid}', mapping=to_enqueue.redis_dump())
272
- p.expire(f'lacus:capture_settings:{perma_uuid}', self.max_capture_time * 2)
272
+ p.expire(f'lacus:capture_settings:{perma_uuid}', self.max_capture_time * 10)
273
273
  p.zadd('lacus:to_capture', {perma_uuid: priority if priority is not None else 0})
274
274
  try:
275
275
  p.execute()
@@ -527,16 +527,16 @@ class LacusCore():
527
527
  headless=to_capture.headless,
528
528
  uuid=uuid) as capture:
529
529
  # required by Mypy: https://github.com/python/mypy/issues/3004
530
- capture.headers = to_capture.headers # type: ignore[assignment]
530
+ capture.headers = to_capture.headers
531
531
  capture.cookies = cookies # type: ignore[assignment]
532
- capture.storage = to_capture.storage # type: ignore[assignment]
533
- capture.viewport = to_capture.viewport # type: ignore[assignment]
534
- capture.user_agent = to_capture.user_agent # type: ignore[assignment]
535
- capture.http_credentials = to_capture.http_credentials # type: ignore[assignment]
536
- capture.geolocation = to_capture.geolocation # type: ignore[assignment]
537
- capture.timezone_id = to_capture.timezone_id # type: ignore[assignment]
538
- capture.locale = to_capture.locale # type: ignore[assignment]
539
- capture.color_scheme = to_capture.color_scheme # type: ignore[assignment]
532
+ capture.storage = to_capture.storage
533
+ capture.viewport = to_capture.viewport
534
+ capture.user_agent = to_capture.user_agent
535
+ capture.http_credentials = to_capture.http_credentials
536
+ capture.geolocation = to_capture.geolocation
537
+ capture.timezone_id = to_capture.timezone_id
538
+ capture.locale = to_capture.locale
539
+ capture.color_scheme = to_capture.color_scheme
540
540
  capture.java_script_enabled = to_capture.java_script_enabled
541
541
 
542
542
  # make sure the initialization doesn't take too long
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lacuscore
3
- Version: 1.15.0
3
+ Version: 1.15.1
4
4
  Summary: Core of Lacus, usable as a module
5
5
  License: BSD-3-Clause
6
6
  Author: Raphaël Vinot
@@ -27,7 +27,7 @@ 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
29
  Requires-Dist: playwrightcapture[recaptcha] (>=1.30.0)
30
- Requires-Dist: pydantic (>=2.11.4)
30
+ Requires-Dist: pydantic (>=2.11.5)
31
31
  Requires-Dist: redis[hiredis] (>=5.3.0,<6.0.0)
32
32
  Requires-Dist: requests (>=2.32.3)
33
33
  Requires-Dist: typing-extensions (>=4.12.2,<5.0.0) ; python_version < "3.12"
@@ -0,0 +1,10 @@
1
+ lacuscore/__init__.py,sha256=aLBshQPT9IBDKn5qWrX9A_exqtLFPyLsQiPWdfpAFjA,537
2
+ lacuscore/helpers.py,sha256=dZjKKSp_4nFlRwvJmB6U8n0TAG2UL5JQjHdng14TX1c,14328
3
+ lacuscore/lacus_monitoring.py,sha256=r6IaYuh6sMq43eOWdZx0fU8p4PWVZlqSD6nr6yOaTUU,2713
4
+ lacuscore/lacuscore.py,sha256=QWjTsZ7Bf3Vx0SnuK03z8zoIsGUg-vDXTG14SfwX0G8,44454
5
+ lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
7
+ lacuscore-1.15.1.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
8
+ lacuscore-1.15.1.dist-info/METADATA,sha256=LFRnpbf8kk9SzaKP-eSW2ovBd9flI7pbJAO1TGuPTqw,2654
9
+ lacuscore-1.15.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
+ lacuscore-1.15.1.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- lacuscore/__init__.py,sha256=aLBshQPT9IBDKn5qWrX9A_exqtLFPyLsQiPWdfpAFjA,537
2
- lacuscore/helpers.py,sha256=d1rMHEA9A9NwfKksa2JvhLu-egaCBf1Vs2F7ALtAhmo,14264
3
- lacuscore/lacus_monitoring.py,sha256=r6IaYuh6sMq43eOWdZx0fU8p4PWVZlqSD6nr6yOaTUU,2713
4
- lacuscore/lacuscore.py,sha256=5JeM2XyMUZJWMIWul1j3GGKmzH8lUZubXkL-ec56rtk,44705
5
- lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
7
- lacuscore-1.15.0.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
8
- lacuscore-1.15.0.dist-info/METADATA,sha256=5eyPOYlSPXqh6HlXAF3QPXL_Rk4ZtZu8wlSaqH0Tl5U,2654
9
- lacuscore-1.15.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
- lacuscore-1.15.0.dist-info/RECORD,,