parsagon 0.14.28__py3-none-any.whl → 0.14.30__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.
- parsagon/api.py +8 -0
- parsagon/executor.py +4 -0
- {parsagon-0.14.28.dist-info → parsagon-0.14.30.dist-info}/METADATA +2 -1
- {parsagon-0.14.28.dist-info → parsagon-0.14.30.dist-info}/RECORD +7 -7
- {parsagon-0.14.28.dist-info → parsagon-0.14.30.dist-info}/WHEEL +1 -1
- {parsagon-0.14.28.dist-info → parsagon-0.14.30.dist-info}/entry_points.txt +0 -0
- {parsagon-0.14.28.dist-info → parsagon-0.14.30.dist-info}/top_level.txt +0 -0
parsagon/api.py
CHANGED
@@ -170,6 +170,14 @@ def get_json_about_data(data, question, model=None):
|
|
170
170
|
return poll_about_data("/transformers/get-json-about-data/", {"data": data, "question": question, "model": model})
|
171
171
|
|
172
172
|
|
173
|
+
def get_serp_data(url):
|
174
|
+
"""
|
175
|
+
Get Google results
|
176
|
+
:param url: the search url
|
177
|
+
"""
|
178
|
+
return _api_call(httpx.post, "/transformers/get-serp-data/", json={"url": url})
|
179
|
+
|
180
|
+
|
173
181
|
def create_pipeline(name, description, program_sketch, pseudocode, secrets):
|
174
182
|
return _api_call(
|
175
183
|
httpx.post,
|
parsagon/executor.py
CHANGED
@@ -9,6 +9,7 @@ import psutil
|
|
9
9
|
import time
|
10
10
|
from urllib.parse import urljoin
|
11
11
|
|
12
|
+
from lxml import etree
|
12
13
|
import lxml.html
|
13
14
|
from pypdf import PdfReader
|
14
15
|
from pyvirtualdisplay import Display
|
@@ -32,6 +33,7 @@ from parsagon.api import (
|
|
32
33
|
get_str_about_data,
|
33
34
|
get_bool_about_data,
|
34
35
|
get_json_about_data,
|
36
|
+
get_serp_data,
|
35
37
|
)
|
36
38
|
from parsagon.custom_function import CustomFunction
|
37
39
|
from parsagon.exceptions import ParsagonException
|
@@ -146,6 +148,7 @@ class Executor:
|
|
146
148
|
"get_str_about_data": get_str_about_data,
|
147
149
|
"get_bool_about_data": get_bool_about_data,
|
148
150
|
"get_json_about_data": get_json_about_data,
|
151
|
+
"get_serp_data": get_serp_data,
|
149
152
|
"get_pdf_text": self.get_pdf_text,
|
150
153
|
}
|
151
154
|
self.custom_functions = {}
|
@@ -289,6 +292,7 @@ class Executor:
|
|
289
292
|
parent.remove(lxml_elem)
|
290
293
|
except IndexError:
|
291
294
|
continue
|
295
|
+
etree.indent(root)
|
292
296
|
return lxml.html.tostring(root).decode()
|
293
297
|
|
294
298
|
def get_elem(self, description, elem_type):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parsagon
|
3
|
-
Version: 0.14.
|
3
|
+
Version: 0.14.30
|
4
4
|
Summary: Allows you to create browser automations with natural language
|
5
5
|
Author-email: Sandy Suh <sandy@parsagon.io>
|
6
6
|
Project-URL: Homepage, https://parsagon.io
|
@@ -10,6 +10,7 @@ Requires-Python: >=3.8
|
|
10
10
|
Description-Content-Type: text/markdown
|
11
11
|
Requires-Dist: selenium ==4.9.1
|
12
12
|
Requires-Dist: lxml ==4.9.2
|
13
|
+
Requires-Dist: cssselect ==1.2.0
|
13
14
|
Requires-Dist: httpx ==0.27.0
|
14
15
|
Requires-Dist: psutil ==5.9.6
|
15
16
|
Requires-Dist: rich ==13.6.0
|
@@ -1,11 +1,11 @@
|
|
1
1
|
parsagon/__init__.py,sha256=_S5MlYHBViB4iY96_UbGo3mfGndE8MmFmb1EORJppK8,452
|
2
|
-
parsagon/api.py,sha256=
|
2
|
+
parsagon/api.py,sha256=UuHPK1HsKF0pvqUeBGlv2tDHHK5-i0PP9Di3bolcr2g,10383
|
3
3
|
parsagon/assistant.py,sha256=V3NL6UdDqe74W_X3wPQ1qwFuJRvHzitXtOt-XSCXvds,4065
|
4
4
|
parsagon/create.py,sha256=igrJN8jVP5p3P9-dPSabrHGOQOlG2Flx7ep4SqEDB14,4373
|
5
5
|
parsagon/custom_function.py,sha256=oEj28qItaHUnsvLIHD7kg5QL3J3aO6rW6xKKP-H-Drs,770
|
6
6
|
parsagon/edit.py,sha256=aLeAcp1hFHm29qh6do21cfYykK76CsHC4tc9Uh2_2bk,3006
|
7
7
|
parsagon/exceptions.py,sha256=tG1vnpmUN1GdJ1GSpe1MaWH3zWmFLZCwtOfEGu8qPP0,910
|
8
|
-
parsagon/executor.py,sha256=
|
8
|
+
parsagon/executor.py,sha256=ATdRivS1I4NaEwjlxKyHmTNfQp6YQQHLi6nhS3n9o9Q,27475
|
9
9
|
parsagon/gui_entry.py,sha256=bqG9K0CArXWWwDGoT8aV17YLNM8MfjSf6SJ_B3QbNeA,671
|
10
10
|
parsagon/highlights.js,sha256=2UDfUApblU9xtGgTLCq4X7rHRV0wcqDSSFZPmJS6fJg,16643
|
11
11
|
parsagon/main.py,sha256=WPxrT1ZyPe6wNSFP7GnnKIGisgPM2dFieHP2TC5TGVQ,9467
|
@@ -25,8 +25,8 @@ parsagon/tests/test_invalid_args.py,sha256=TAFdHGy92lUxjljPrtODOuEGVss6rn-F5GvEK
|
|
25
25
|
parsagon/tests/test_pipeline_operations.py,sha256=aEwZNtIwOl9X7jdLDLB4YEdgMp7_x8PXCINAE7RT4NY,805
|
26
26
|
parsagon/tests/test_print.py,sha256=BG7f55YDBoL0S7k291-so_Gje_hUAQOkB-jh-bEYsJY,198
|
27
27
|
parsagon/tests/test_secrets.py,sha256=Ctsscl2tmMTZcFAy5dnyqUlgTov2UharZgLpbRCLdEg,2662
|
28
|
-
parsagon-0.14.
|
29
|
-
parsagon-0.14.
|
30
|
-
parsagon-0.14.
|
31
|
-
parsagon-0.14.
|
32
|
-
parsagon-0.14.
|
28
|
+
parsagon-0.14.30.dist-info/METADATA,sha256=nKJwDk_-ryuUmt-LsUHBWw4YRQ_pC8uHbLh123XyeT8,2494
|
29
|
+
parsagon-0.14.30.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
30
|
+
parsagon-0.14.30.dist-info/entry_points.txt,sha256=I1UlPUb4oY2k9idkI8kvdkEcrjKGRSOl5pMbA6uu6kw,48
|
31
|
+
parsagon-0.14.30.dist-info/top_level.txt,sha256=ih5uYQzW4qjhRKppys-WiHLIbXVZ99YdqDcfAtlcQwk,9
|
32
|
+
parsagon-0.14.30.dist-info/RECORD,,
|
File without changes
|
File without changes
|