parsagon 0.15.3__tar.gz → 0.17.0__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.15.3 → parsagon-0.17.0}/PKG-INFO +1 -1
- {parsagon-0.15.3 → parsagon-0.17.0}/pyproject.toml +1 -1
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/api.py +3 -1
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/executor.py +12 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/main.py +5 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/runs.py +2 -1
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon.egg-info/PKG-INFO +1 -1
- {parsagon-0.15.3 → parsagon-0.17.0}/README.md +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/setup.cfg +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/__init__.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/__init__.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/assistant.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/create.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/custom_function.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/edit.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/exceptions.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/gui/__init__.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/gui/controller.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/gui/menu.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/gui/window.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/gui_entry.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/highlights.js +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/print.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/secrets.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/settings.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/__init__.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/api_mocks.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/conftest.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/test_executor.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/test_invalid_args.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/test_pipeline_operations.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/test_print.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon/tests/test_secrets.py +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon.egg-info/SOURCES.txt +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon.egg-info/dependency_links.txt +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon.egg-info/entry_points.txt +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon.egg-info/requires.txt +0 -0
- {parsagon-0.15.3 → parsagon-0.17.0}/src/parsagon.egg-info/top_level.txt +0 -0
@@ -247,7 +247,7 @@ def get_pipelines():
|
|
247
247
|
return _api_call(httpx.get, f"/pipelines/")
|
248
248
|
|
249
249
|
|
250
|
-
def get_pipeline_code(pipeline_name, variables, headless, use_uc, optimize, use_proxy, pipeline_id=None):
|
250
|
+
def get_pipeline_code(pipeline_name, variables, headless, use_cdp, use_uc, optimize, use_proxy, pipeline_id=None):
|
251
251
|
if pipeline_id:
|
252
252
|
return _api_call(
|
253
253
|
httpx.post,
|
@@ -255,6 +255,7 @@ def get_pipeline_code(pipeline_name, variables, headless, use_uc, optimize, use_
|
|
255
255
|
json={
|
256
256
|
"variables": variables,
|
257
257
|
"headless": headless,
|
258
|
+
"use_cdp": use_cdp,
|
258
259
|
"use_uc": use_uc,
|
259
260
|
"optimize": optimize,
|
260
261
|
"use_proxy": use_proxy,
|
@@ -268,6 +269,7 @@ def get_pipeline_code(pipeline_name, variables, headless, use_uc, optimize, use_
|
|
268
269
|
json={
|
269
270
|
"variables": variables,
|
270
271
|
"headless": headless,
|
272
|
+
"use_cdp": use_cdp,
|
271
273
|
"use_uc": use_uc,
|
272
274
|
"optimize": optimize,
|
273
275
|
"use_proxy": use_proxy,
|
@@ -157,6 +157,7 @@ class Executor:
|
|
157
157
|
"get_serp_data": get_serp_data,
|
158
158
|
"get_pdf_text": self.get_pdf_text,
|
159
159
|
"str_to_iso8601": self.str_to_iso8601,
|
160
|
+
"get_network_requests": self.get_network_requests,
|
160
161
|
}
|
161
162
|
self.custom_functions = {}
|
162
163
|
self.infer = infer
|
@@ -713,6 +714,17 @@ class Executor:
|
|
713
714
|
s = " ".join(s.split()[:-1])
|
714
715
|
return ""
|
715
716
|
|
717
|
+
def get_network_requests(window_id, delay=30):
|
718
|
+
requests = []
|
719
|
+
|
720
|
+
def handle_request(event):
|
721
|
+
requests.append(event)
|
722
|
+
|
723
|
+
driver.switch_to.window(window_id)
|
724
|
+
driver.add_cdp_listener("Network.requestWillBeSent", handle_request)
|
725
|
+
wait(delay)
|
726
|
+
return requests
|
727
|
+
|
716
728
|
def execute(self, code):
|
717
729
|
loc = {}
|
718
730
|
try:
|
@@ -144,6 +144,11 @@ def get_args(argv):
|
|
144
144
|
type=str,
|
145
145
|
help="write the data to the given file path",
|
146
146
|
)
|
147
|
+
parser_run.add_argument(
|
148
|
+
"--use_cdp",
|
149
|
+
action="store_true",
|
150
|
+
help="enable CDP (only in undetected mode)",
|
151
|
+
)
|
147
152
|
parser_run.add_argument(
|
148
153
|
"--undetected",
|
149
154
|
action="store_true",
|
@@ -28,6 +28,7 @@ def run(
|
|
28
28
|
remote=False,
|
29
29
|
output_log=False,
|
30
30
|
output_file=None,
|
31
|
+
use_cdp=False,
|
31
32
|
undetected=False,
|
32
33
|
optimize=False,
|
33
34
|
use_proxy=False,
|
@@ -83,7 +84,7 @@ def run(
|
|
83
84
|
|
84
85
|
run = create_pipeline_run(pipeline_id, variables, True)
|
85
86
|
code = get_pipeline_code(
|
86
|
-
program_name, variables, headless, undetected, optimize, use_proxy, pipeline_id=program_id
|
87
|
+
program_name, variables, headless, use_cdp, undetected, optimize, use_proxy, pipeline_id=program_id
|
87
88
|
)["code"]
|
88
89
|
start_time = datetime.datetime.now(datetime.timezone.utc).isoformat()
|
89
90
|
run_data = {"start_time": start_time}
|
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
|