pylookyloo 1.27.0__tar.gz → 1.27.1__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.

Potentially problematic release.


This version of pylookyloo might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pylookyloo
3
- Version: 1.27.0
3
+ Version: 1.27.1
4
4
  Summary: Python CLI and module for Lookyloo
5
5
  License: BSD-3-Clause
6
6
  Author: Raphaël Vinot
@@ -22,7 +22,9 @@ Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Topic :: Internet
23
23
  Classifier: Topic :: Security
24
24
  Provides-Extra: docs
25
+ Provides-Extra: examples
25
26
  Requires-Dist: Sphinx (>=8.1.3) ; (python_version >= "3.10") and (extra == "docs")
27
+ Requires-Dist: pylacus (>=1.12.1) ; extra == "examples"
26
28
  Requires-Dist: requests (>=2.32.3)
27
29
  Project-URL: Documentation, https://pylookyloo.readthedocs.io/en/latest/
28
30
  Project-URL: Repository, https://github.com/lookyloo/PyLookyloo
@@ -46,6 +46,7 @@ class CaptureSettings(TypedDict, total=False):
46
46
  locale: str | None
47
47
  color_scheme: str | None
48
48
  java_script_enabled: bool
49
+ headless: bool
49
50
  viewport: dict[str, int] | None
50
51
  referer: str | None
51
52
 
@@ -154,6 +155,7 @@ class Lookyloo():
154
155
  locale: str | None=None,
155
156
  color_scheme: str | None=None,
156
157
  java_script_enabled: bool=True,
158
+ headless: bool=True,
157
159
  viewport: dict[str, int] | None=None,
158
160
  referer: str | None=None,
159
161
  listing: bool | None=None,
@@ -177,6 +179,7 @@ class Lookyloo():
177
179
  locale: str | None=None,
178
180
  color_scheme: str | None=None,
179
181
  java_script_enabled: bool | None=None,
182
+ headless: bool=True,
180
183
  viewport: dict[str, int] | None=None,
181
184
  referer: str | None=None,
182
185
  listing: bool | None=None,
@@ -204,6 +207,7 @@ class Lookyloo():
204
207
  :param locale: The locale of the browser
205
208
  :param color_scheme: The prefered color scheme of the browser (light or dark)
206
209
  :param java_script_enabled: If False, no JS will run during the capture.
210
+ :param headless: If False, the browser will be headed, it requires the capture to be done on a desktop.
207
211
  :param viewport: The viewport of the browser used for capturing
208
212
  :param referer: The referer URL for the capture
209
213
  :param listing: If False, the capture will be not be on the publicly accessible index page of lookyloo
@@ -257,6 +261,8 @@ class Lookyloo():
257
261
  to_send['color_scheme'] = color_scheme
258
262
  if java_script_enabled is not None:
259
263
  to_send['java_script_enabled'] = java_script_enabled
264
+ if headless is not None:
265
+ to_send['headless'] = headless
260
266
  if viewport:
261
267
  to_send['viewport'] = viewport
262
268
  if referer:
@@ -539,6 +545,14 @@ class Lookyloo():
539
545
  r = self.session.get(url)
540
546
  return r.json()
541
547
 
548
+ def push_from_lacus(self, capture: dict[str, Any]) -> dict[str, Any]:
549
+ '''Push a capture from Lacus to Lookyloo
550
+
551
+ :param capture: The capture to push from Lacus
552
+ '''
553
+ r = self.session.post(urljoin(self.root_url, str(PurePosixPath('json', 'upload'))), json=capture)
554
+ return r.json()
555
+
542
556
  @overload
543
557
  def upload_capture(self, *, quiet: Literal[True],
544
558
  listing: bool = False,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pylookyloo"
3
- version = "1.27.0"
3
+ version = "1.27.1"
4
4
  description = "Python CLI and module for Lookyloo"
5
5
  authors = [
6
6
  {name="Raphaël Vinot", email="raphael.vinot@circl.lu"}
@@ -36,11 +36,11 @@ classifiers = [
36
36
  lookyloo = 'pylookyloo:main'
37
37
 
38
38
  [project.optional-dependencies]
39
-
40
39
  docs = ["Sphinx (>=8.1.3) ; python_version >= \"3.10\""]
40
+ examples = ["pylacus (>=1.12.1)"]
41
41
 
42
42
  [tool.poetry.group.dev.dependencies]
43
- mypy = "^1.14.1"
43
+ mypy = "^1.15.0"
44
44
  types-requests = "^2.32.0.20241016"
45
45
  pytest = "^8.3.4"
46
46
 
File without changes
File without changes