pylookyloo 1.28.0__py3-none-any.whl → 1.29.0__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.
Potentially problematic release.
This version of pylookyloo might be problematic. Click here for more details.
- pylookyloo/api.py +23 -1
- {pylookyloo-1.28.0.dist-info → pylookyloo-1.29.0.dist-info}/METADATA +5 -5
- pylookyloo-1.29.0.dist-info/RECORD +8 -0
- {pylookyloo-1.28.0.dist-info → pylookyloo-1.29.0.dist-info}/WHEEL +1 -1
- pylookyloo-1.28.0.dist-info/RECORD +0 -8
- {pylookyloo-1.28.0.dist-info → pylookyloo-1.29.0.dist-info}/LICENSE +0 -0
- {pylookyloo-1.28.0.dist-info → pylookyloo-1.29.0.dist-info}/entry_points.txt +0 -0
pylookyloo/api.py
CHANGED
|
@@ -60,8 +60,10 @@ class CaptureSettings(TypedDict, total=False):
|
|
|
60
60
|
device_name: str | None
|
|
61
61
|
user_agent: str | None
|
|
62
62
|
proxy: str | dict[str, str] | None
|
|
63
|
+
remote_lacus_name: str | None
|
|
63
64
|
general_timeout_in_sec: int | None
|
|
64
65
|
cookies: list[dict[str, Any]] | None
|
|
66
|
+
storage: str | dict[str, Any] | None
|
|
65
67
|
headers: str | dict[str, str] | None
|
|
66
68
|
http_credentials: dict[str, int] | None
|
|
67
69
|
geolocation: dict[str, float] | None
|
|
@@ -127,6 +129,11 @@ class Lookyloo():
|
|
|
127
129
|
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json', tree_uuid, 'status'))))
|
|
128
130
|
return r.json()
|
|
129
131
|
|
|
132
|
+
def get_remote_lacuses(self) -> list[dict[str, Any]]:
|
|
133
|
+
'''Get the list of Lacus instances configured on the Lookyloo instance'''
|
|
134
|
+
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json', 'remote_lacuses'))))
|
|
135
|
+
return r.json()
|
|
136
|
+
|
|
130
137
|
def get_capture_stats(self, tree_uuid: str) -> dict[str, Any]:
|
|
131
138
|
'''Get statistics of the capture'''
|
|
132
139
|
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json', tree_uuid, 'stats'))))
|
|
@@ -169,8 +176,10 @@ class Lookyloo():
|
|
|
169
176
|
browser: str | None=None, device_name: str | None=None,
|
|
170
177
|
user_agent: str | None=None,
|
|
171
178
|
proxy: str | dict[str, str] | None=None,
|
|
179
|
+
remote_lacus_name: str | None=None,
|
|
172
180
|
general_timeout_in_sec: int | None=None,
|
|
173
181
|
cookies: list[dict[str, Any]] | None=None,
|
|
182
|
+
storage: str | dict[str, Any] | None=None,
|
|
174
183
|
headers: str | dict[str, str] | None=None,
|
|
175
184
|
http_credentials: dict[str, int] | None=None,
|
|
176
185
|
geolocation: dict[str, float] | None=None,
|
|
@@ -193,8 +202,10 @@ class Lookyloo():
|
|
|
193
202
|
browser: str | None=None, device_name: str | None=None,
|
|
194
203
|
user_agent: str | None=None,
|
|
195
204
|
proxy: str | dict[str, str] | None=None,
|
|
205
|
+
remote_lacus_name: str | None=None,
|
|
196
206
|
general_timeout_in_sec: int | None=None,
|
|
197
207
|
cookies: list[dict[str, Any]] | None=None,
|
|
208
|
+
storage: str | dict[str, Any] | None=None,
|
|
198
209
|
headers: str | dict[str, str] | None=None,
|
|
199
210
|
http_credentials: dict[str, int] | None=None,
|
|
200
211
|
geolocation: dict[str, float] | None=None,
|
|
@@ -220,7 +231,8 @@ class Lookyloo():
|
|
|
220
231
|
:param browser: The browser to use for the capture, must be something Playwright knows
|
|
221
232
|
:param device_name: The name of the device, must be something Playwright knows
|
|
222
233
|
:param user_agent: The user agent the browser will use for the capture
|
|
223
|
-
:param proxy:
|
|
234
|
+
:param proxy: Capture via a proxy. It can either be the full URL to a SOCKS5 proxy, or the name of a specific proxy configured on a remote lacus instance.
|
|
235
|
+
:param remote_lacus_name: The name of the remote Lacus instance to use for the capture (only if lookyloo is configured this way)
|
|
224
236
|
:param general_timeout_in_sec: The capture will raise a timeout it it takes more than that time
|
|
225
237
|
:param cookies: A list of cookies
|
|
226
238
|
:param headers: The headers to pass to the capture
|
|
@@ -270,6 +282,8 @@ class Lookyloo():
|
|
|
270
282
|
to_send['general_timeout_in_sec'] = general_timeout_in_sec
|
|
271
283
|
if cookies:
|
|
272
284
|
to_send['cookies'] = cookies
|
|
285
|
+
if storage:
|
|
286
|
+
to_send['storage'] = storage
|
|
273
287
|
if headers:
|
|
274
288
|
to_send['headers'] = headers
|
|
275
289
|
if http_credentials:
|
|
@@ -425,6 +439,14 @@ class Lookyloo():
|
|
|
425
439
|
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json', capture_uuid, 'cookies'))))
|
|
426
440
|
return r.json()
|
|
427
441
|
|
|
442
|
+
def get_storage(self, capture_uuid: str) -> dict[str, Any]:
|
|
443
|
+
'''Returns the complete storage state.
|
|
444
|
+
|
|
445
|
+
:param capture_uuid: UUID of the capture
|
|
446
|
+
'''
|
|
447
|
+
r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json', capture_uuid, 'storage'))))
|
|
448
|
+
return r.json()
|
|
449
|
+
|
|
428
450
|
def get_html(self, capture_uuid: str) -> StringIO:
|
|
429
451
|
'''Returns the rendered HTML as it would be in the browser after the page loaded.
|
|
430
452
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pylookyloo
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.29.0
|
|
4
4
|
Summary: Python CLI and module for Lookyloo
|
|
5
|
-
License:
|
|
5
|
+
License: GPL-2.0-or-later
|
|
6
6
|
Author: Raphaël Vinot
|
|
7
7
|
Author-email: raphael.vinot@circl.lu
|
|
8
8
|
Requires-Python: >=3.9
|
|
@@ -11,7 +11,7 @@ Classifier: Environment :: Console
|
|
|
11
11
|
Classifier: Intended Audience :: Information Technology
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: Intended Audience :: Telecommunications Industry
|
|
14
|
-
Classifier: License :: OSI Approved ::
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
|
|
15
15
|
Classifier: Operating System :: POSIX :: Linux
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -23,8 +23,8 @@ Classifier: Topic :: Internet
|
|
|
23
23
|
Classifier: Topic :: Security
|
|
24
24
|
Provides-Extra: docs
|
|
25
25
|
Provides-Extra: examples
|
|
26
|
-
Requires-Dist: Sphinx (>=8.
|
|
27
|
-
Requires-Dist: pylacus (>=1.
|
|
26
|
+
Requires-Dist: Sphinx (>=8.2.3) ; (python_version >= "3.11") and (extra == "docs")
|
|
27
|
+
Requires-Dist: pylacus (>=1.14.0) ; extra == "examples"
|
|
28
28
|
Requires-Dist: requests (>=2.32.3)
|
|
29
29
|
Project-URL: Documentation, https://pylookyloo.readthedocs.io/en/latest/
|
|
30
30
|
Project-URL: Repository, https://github.com/lookyloo/PyLookyloo
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
pylookyloo/__init__.py,sha256=_JYXwXHL7ShZkeruvGd8qDTpxNRfuDjvV65SOMMU6yc,1922
|
|
2
|
+
pylookyloo/api.py,sha256=Udgl9O8R1IPzNCXfpP3zad7Y6Q0n2neVEWpAJQ58yHM,31907
|
|
3
|
+
pylookyloo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
pylookyloo-1.29.0.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
|
|
5
|
+
pylookyloo-1.29.0.dist-info/METADATA,sha256=69lw0CSTxdx9wv1H4Ltby-m52jSxjzm_ktD6Ysr7gsw,2387
|
|
6
|
+
pylookyloo-1.29.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
7
|
+
pylookyloo-1.29.0.dist-info/entry_points.txt,sha256=y2c0Ujg8co6Xyf7MoxStVU-fLQMZBSGAg-KFidmsha4,44
|
|
8
|
+
pylookyloo-1.29.0.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pylookyloo/__init__.py,sha256=_JYXwXHL7ShZkeruvGd8qDTpxNRfuDjvV65SOMMU6yc,1922
|
|
2
|
-
pylookyloo/api.py,sha256=h6v4hf4HtxUD-pf4uEKSurMw_QYnpcgYUBk3dv7v1Nc,30733
|
|
3
|
-
pylookyloo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
pylookyloo-1.28.0.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
|
|
5
|
-
pylookyloo-1.28.0.dist-info/METADATA,sha256=mG1xvmCC10QP-yBYZ4PkfI8NVLiZe9f8HOAHLeydKrY,2347
|
|
6
|
-
pylookyloo-1.28.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
7
|
-
pylookyloo-1.28.0.dist-info/entry_points.txt,sha256=y2c0Ujg8co6Xyf7MoxStVU-fLQMZBSGAg-KFidmsha4,44
|
|
8
|
-
pylookyloo-1.28.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|