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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Jarvis_Brain
3
- Version: 0.1.5.6
3
+ Version: 0.1.5.8
4
4
  Summary: Jarvis brain mcp
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: beautifulsoup4
@@ -1,10 +1,10 @@
1
1
  mcp_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mcp_tools/dp_tools.py,sha256=ARrxVFpY2zb5JKfqny0mj4QkvQF2EWr7OEBkhK4kdcg,8718
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.6.dist-info/METADATA,sha256=emj8lgXEsC98KUYBsvJOcROwou39qE6U8cbYsGlVQKk,241
8
- jarvis_brain-0.1.5.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
- jarvis_brain-0.1.5.6.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
10
- jarvis_brain-0.1.5.6.dist-info/RECORD,,
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 + f"_{tab_id}.html"
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: