Jarvis-Brain 0.1.5.6__py3-none-any.whl → 0.1.5.8__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.
- {jarvis_brain-0.1.5.6.dist-info → jarvis_brain-0.1.5.8.dist-info}/METADATA +1 -1
- {jarvis_brain-0.1.5.6.dist-info → jarvis_brain-0.1.5.8.dist-info}/RECORD +5 -5
- mcp_tools/dp_tools.py +4 -2
- {jarvis_brain-0.1.5.6.dist-info → jarvis_brain-0.1.5.8.dist-info}/WHEEL +0 -0
- {jarvis_brain-0.1.5.6.dist-info → jarvis_brain-0.1.5.8.dist-info}/entry_points.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
mcp_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mcp_tools/dp_tools.py,sha256=
|
|
2
|
+
mcp_tools/dp_tools.py,sha256=ZZORkeIHnwATnp5yzZN0HtTPNsl42WlesPQkm5r6LEI,8811
|
|
3
3
|
mcp_tools/main.py,sha256=SiLF-tcEdApkzMjTZJEpVYX5d-LPW7aqy6A6lCBA7YQ,829
|
|
4
4
|
tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
tools/browser_manager.py,sha256=J8aNQECiQvucsUjLJQ9N-3f2xoyoCIxjV-kJ7YcoHv4,1849
|
|
6
6
|
tools/tools.py,sha256=TaWs-CNXy-py9BFmCnJrQ09ke938xXpImf-N2Qo_Rvc,4708
|
|
7
|
-
jarvis_brain-0.1.5.
|
|
8
|
-
jarvis_brain-0.1.5.
|
|
9
|
-
jarvis_brain-0.1.5.
|
|
10
|
-
jarvis_brain-0.1.5.
|
|
7
|
+
jarvis_brain-0.1.5.8.dist-info/METADATA,sha256=I05RaR-XQ_fMKN9DtdaMbvqCK3Sw50P2fjxbeX5OAWc,241
|
|
8
|
+
jarvis_brain-0.1.5.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
9
|
+
jarvis_brain-0.1.5.8.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
|
|
10
|
+
jarvis_brain-0.1.5.8.dist-info/RECORD,,
|
mcp_tools/dp_tools.py
CHANGED
|
@@ -32,10 +32,12 @@ def register_get_html(mcp: FastMCP, browser_manager):
|
|
|
32
32
|
async def get_html(browser_port: int, tab_id: str) -> dict[str, Any]:
|
|
33
33
|
_browser = browser_manager.get_browser(browser_port)
|
|
34
34
|
tab = _browser.get_tab(tab_id)
|
|
35
|
-
file_name = tab.title
|
|
35
|
+
file_name = str(tab.title).replace("/", "_").replace(":", "_")
|
|
36
|
+
file_name = file_name + f"_{tab_id}.html"
|
|
36
37
|
if not os.path.exists(html_source_code_local_save_path):
|
|
37
38
|
os.makedirs(html_source_code_local_save_path)
|
|
38
39
|
abs_path = os.path.join(html_source_code_local_save_path, file_name)
|
|
40
|
+
tab.wait.doc_loaded()
|
|
39
41
|
with open(abs_path, "w", encoding="utf-8") as f:
|
|
40
42
|
min_html, compress_rate = compress_html(tab.html)
|
|
41
43
|
f.write(min_html)
|
|
@@ -167,7 +169,7 @@ def register_highlight_element_captcha(mcp: FastMCP, browser_manager):
|
|
|
167
169
|
css_selector = css_selector
|
|
168
170
|
if "css:" not in css_selector:
|
|
169
171
|
css_selector = "css:" + css_selector
|
|
170
|
-
|
|
172
|
+
|
|
171
173
|
target_eles = tab.eles(css_selector)
|
|
172
174
|
exist_flag = False
|
|
173
175
|
if len(target_eles) != 0:
|
|
File without changes
|
|
File without changes
|