lacuscore 1.16.1__py3-none-any.whl → 1.16.3__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
@@ -133,6 +133,7 @@ class CaptureSettings(BaseModel):
133
133
  with_favicon: bool = True
134
134
  allow_tracking: bool = False
135
135
  headless: bool = True
136
+ init_script: str | None = None
136
137
  force: bool = False
137
138
  recapture_interval: int = 300
138
139
  priority: int = 0
lacuscore/lacuscore.py CHANGED
@@ -150,6 +150,7 @@ class LacusCore():
150
150
  allow_tracking: bool=False,
151
151
  headless: bool=True,
152
152
  max_retries: int | None=None,
153
+ init_script: str | None=None,
153
154
  force: bool=False,
154
155
  recapture_interval: int=300,
155
156
  priority: int=0,
@@ -184,6 +185,7 @@ class LacusCore():
184
185
  allow_tracking: bool=False,
185
186
  headless: bool=True,
186
187
  max_retries: int | None=None,
188
+ init_script: str | None=None,
187
189
  force: bool=False,
188
190
  recapture_interval: int=300,
189
191
  priority: int=0,
@@ -220,6 +222,7 @@ class LacusCore():
220
222
  :param allow_tracking: If True, PlaywrightCapture will attempt to click through the cookie banners. It is totally dependent on the framework used on the website.
221
223
  :param headless: Whether to run the browser in headless mode. WARNING: requires to run in a graphical environment.
222
224
  :param max_retries: The maximum anount of retries for this capture
225
+ :param init_script: A JavaScript that will be executed on each page of the capture.
223
226
 
224
227
  :param force: Force recapture, even if the same one was already done within the recapture_interval
225
228
  :param recapture_interval: The time the enqueued settings are kept in memory to avoid duplicates
@@ -243,6 +246,7 @@ class LacusCore():
243
246
  'allow_tracking': allow_tracking,
244
247
  # Quietly force it to true if headed is not allowed.
245
248
  'headless': headless if self.headed_allowed else True,
249
+ 'init_script': init_script,
246
250
  'max_retries': max_retries}
247
251
  try:
248
252
  to_enqueue = CaptureSettings(**settings)
@@ -529,6 +533,7 @@ class LacusCore():
529
533
  general_timeout_in_sec=to_capture.general_timeout_in_sec,
530
534
  loglevel=self.master_logger.getEffectiveLevel(),
531
535
  headless=to_capture.headless,
536
+ init_script=to_capture.init_script,
532
537
  uuid=uuid) as capture:
533
538
  # required by Mypy: https://github.com/python/mypy/issues/3004
534
539
  capture.headers = to_capture.headers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lacuscore
3
- Version: 1.16.1
3
+ Version: 1.16.3
4
4
  Summary: Core of Lacus, usable as a module
5
5
  License: BSD-3-Clause
6
6
  Author: Raphaël Vinot
@@ -26,7 +26,7 @@ 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.31.1)
29
+ Requires-Dist: playwrightcapture[recaptcha] (>=1.31.4)
30
30
  Requires-Dist: pydantic (>=2.11.7)
31
31
  Requires-Dist: redis[hiredis] (>=5.3.0,<6.0.0)
32
32
  Requires-Dist: requests (>=2.32.4)
@@ -0,0 +1,10 @@
1
+ lacuscore/__init__.py,sha256=aLBshQPT9IBDKn5qWrX9A_exqtLFPyLsQiPWdfpAFjA,537
2
+ lacuscore/helpers.py,sha256=_m0KEwYxoQ-Q9-GH9cbCmxV5xWnisZzObPKn4rS6Ygo,14363
3
+ lacuscore/lacus_monitoring.py,sha256=r6IaYuh6sMq43eOWdZx0fU8p4PWVZlqSD6nr6yOaTUU,2713
4
+ lacuscore/lacuscore.py,sha256=8Z3ES5865I-6mqgrhAcu52PIRxUPWmDChxSZhHLuawQ,45069
5
+ lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
7
+ lacuscore-1.16.3.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
8
+ lacuscore-1.16.3.dist-info/METADATA,sha256=30oE-gjHjLBwFbFN3Ld92c_sbuDkSa8iNqqK9Af2qn0,2654
9
+ lacuscore-1.16.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
+ lacuscore-1.16.3.dist-info/RECORD,,
@@ -1,10 +0,0 @@
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=I7jQ83-2vDdd4UBWHR0VHQChsWv_CL4F3XzkbW6q3ZI,44773
5
- lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
7
- lacuscore-1.16.1.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
8
- lacuscore-1.16.1.dist-info/METADATA,sha256=EwSgtoBVhg3Q6F_uRrWRYIwsbh-ytr5VHg5i2-DL9U0,2654
9
- lacuscore-1.16.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
10
- lacuscore-1.16.1.dist-info/RECORD,,