parsagon 0.14.34__tar.gz → 0.14.36__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.
- {parsagon-0.14.34 → parsagon-0.14.36}/PKG-INFO +3 -1
- {parsagon-0.14.34 → parsagon-0.14.36}/pyproject.toml +3 -1
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/executor.py +13 -1
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon.egg-info/PKG-INFO +3 -1
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon.egg-info/requires.txt +2 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/README.md +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/setup.cfg +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/__init__.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/__init__.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/api.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/assistant.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/create.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/custom_function.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/edit.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/exceptions.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/gui/__init__.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/gui/controller.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/gui/menu.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/gui/window.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/gui_entry.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/highlights.js +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/main.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/print.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/runs.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/secrets.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/settings.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/__init__.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/api_mocks.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/conftest.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/test_executor.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/test_invalid_args.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/test_pipeline_operations.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/test_print.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon/tests/test_secrets.py +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon.egg-info/SOURCES.txt +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon.egg-info/dependency_links.txt +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon.egg-info/entry_points.txt +0 -0
- {parsagon-0.14.34 → parsagon-0.14.36}/src/parsagon.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parsagon
|
3
|
-
Version: 0.14.
|
3
|
+
Version: 0.14.36
|
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
|
@@ -22,6 +22,8 @@ Requires-Dist: jsonpath-ng==1.5.3
|
|
22
22
|
Requires-Dist: simplejson==3.19.1
|
23
23
|
Requires-Dist: pypdf==4.2.0
|
24
24
|
Requires-Dist: python-dateutil==2.9.0.post0
|
25
|
+
Requires-Dist: html2text==2024.2.26
|
26
|
+
Requires-Dist: feedparser==6.0.11
|
25
27
|
Provides-Extra: dev
|
26
28
|
Requires-Dist: pytest==7.3.2; extra == "dev"
|
27
29
|
Requires-Dist: pytest-mock==3.11.1; extra == "dev"
|
@@ -16,7 +16,7 @@ line-length = 120
|
|
16
16
|
|
17
17
|
[project]
|
18
18
|
name = "parsagon"
|
19
|
-
version = "0.14.
|
19
|
+
version = "0.14.36"
|
20
20
|
description = "Allows you to create browser automations with natural language"
|
21
21
|
readme = "README.md"
|
22
22
|
requires-python = ">=3.8"
|
@@ -45,6 +45,8 @@ dependencies = [
|
|
45
45
|
'simplejson==3.19.1',
|
46
46
|
'pypdf==4.2.0',
|
47
47
|
'python-dateutil==2.9.0.post0',
|
48
|
+
'html2text==2024.2.26',
|
49
|
+
'feedparser==6.0.11',
|
48
50
|
]
|
49
51
|
|
50
52
|
[project.optional-dependencies]
|
@@ -10,6 +10,7 @@ import psutil
|
|
10
10
|
import time
|
11
11
|
from urllib.parse import urljoin
|
12
12
|
|
13
|
+
import html2text
|
13
14
|
from lxml import etree
|
14
15
|
import lxml.html
|
15
16
|
from pypdf import PdfReader
|
@@ -589,6 +590,12 @@ class Executor:
|
|
589
590
|
elem = self._id_to_elem(elem_id)
|
590
591
|
return elem.get_attribute("innerText")
|
591
592
|
|
593
|
+
def get_inner_markdown(self, window_id):
|
594
|
+
if self.driver.current_window_handle != window_id:
|
595
|
+
self.driver.switch_to.window(window_id)
|
596
|
+
html = self.driver.execute_script("return document.body.innerHTML;")
|
597
|
+
return html2text.html2text(html)
|
598
|
+
|
592
599
|
def scrape_data(self, schema, window_id, call_id):
|
593
600
|
"""
|
594
601
|
Scrapes data from the current page.
|
@@ -674,7 +681,12 @@ class Executor:
|
|
674
681
|
return text
|
675
682
|
|
676
683
|
def str_to_iso8601(self, s):
|
677
|
-
|
684
|
+
while s:
|
685
|
+
try:
|
686
|
+
return dateutil.parser.parse(s).isoformat()
|
687
|
+
except dateutil.parser._parser.ParserError:
|
688
|
+
s = " ".join(s.split()[:-1])
|
689
|
+
return ""
|
678
690
|
|
679
691
|
def execute(self, code):
|
680
692
|
loc = {}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: parsagon
|
3
|
-
Version: 0.14.
|
3
|
+
Version: 0.14.36
|
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
|
@@ -22,6 +22,8 @@ Requires-Dist: jsonpath-ng==1.5.3
|
|
22
22
|
Requires-Dist: simplejson==3.19.1
|
23
23
|
Requires-Dist: pypdf==4.2.0
|
24
24
|
Requires-Dist: python-dateutil==2.9.0.post0
|
25
|
+
Requires-Dist: html2text==2024.2.26
|
26
|
+
Requires-Dist: feedparser==6.0.11
|
25
27
|
Provides-Extra: dev
|
26
28
|
Requires-Dist: pytest==7.3.2; extra == "dev"
|
27
29
|
Requires-Dist: pytest-mock==3.11.1; extra == "dev"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|