Jarvis-Brain 0.1.4.4__py3-none-any.whl → 0.1.4.6__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,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Jarvis_Brain
3
- Version: 0.1.4.4
3
+ Version: 0.1.4.6
4
4
  Summary: Jarvis brain mcp
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: beautifulsoup4
7
7
  Requires-Dist: curl-cffi
8
8
  Requires-Dist: drissionpage
9
9
  Requires-Dist: fastmcp
10
- Requires-Dist: htmlmin
10
+ Requires-Dist: minify-html
@@ -0,0 +1,10 @@
1
+ mcp_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mcp_tools/dp_tools.py,sha256=S0__-GrhekKlJ4TjibgUHzlIFabu4zCkHSei6i5H5uo,7985
3
+ mcp_tools/main.py,sha256=wplNNm2IjL1QcmPPBf1SOU2_HZIU75VQA3UBjun33g8,795
4
+ tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ tools/browser_manager.py,sha256=WPvQjG54oblGa--2qWOAJOf8bmvVbu8UniB1zLSM_hM,1459
6
+ tools/tools.py,sha256=qPa80xzQWCD8mSdg8isCgyei0XN8a7guGtR2J_MbQDU,4481
7
+ jarvis_brain-0.1.4.6.dist-info/METADATA,sha256=-LUwetAQs5uP-PUHBCOqg7-c1tEeC3XLjVfAflhLyMk,241
8
+ jarvis_brain-0.1.4.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
+ jarvis_brain-0.1.4.6.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
10
+ jarvis_brain-0.1.4.6.dist-info/RECORD,,
mcp_tools/dp_tools.py CHANGED
@@ -5,8 +5,6 @@ from DrissionPage._elements.none_element import NoneElement
5
5
  from fastmcp import FastMCP
6
6
 
7
7
  from tools.tools import compress_html, requests_html, dp_headless_html, assert_waf_cookie, dp_mcp_message_pack
8
- import psutil
9
- from pathlib import Path
10
8
 
11
9
  html_source_code_local_save_path = os.path.join(os.getcwd(), "html-source-code")
12
10
  waf_status_code_dict = {
mcp_tools/main.py CHANGED
@@ -1,6 +1,6 @@
1
- # main.py
2
- from mcp_tools.dp_tools import *
3
1
  from fastmcp import FastMCP
2
+
3
+ from mcp_tools.dp_tools import *
4
4
  from tools.browser_manager import browser_manager
5
5
 
6
6
  mcp = FastMCP("Jarvis Brain Mcp Tools")
tools/browser_manager.py CHANGED
@@ -1,8 +1,9 @@
1
1
  """浏览器池管理模块 - 单例模式确保状态共享"""
2
2
  import random
3
- from DrissionPage import ChromiumPage, ChromiumOptions
4
3
  from typing import Optional, Tuple
5
4
 
5
+ from DrissionPage import ChromiumPage, ChromiumOptions
6
+
6
7
 
7
8
  class BrowserManager:
8
9
  """浏览器池管理器 - 使用单例模式"""
tools/tools.py CHANGED
@@ -1,10 +1,10 @@
1
1
  import time
2
2
 
3
- import htmlmin
3
+ import minify_html
4
+ from DrissionPage import ChromiumPage, ChromiumOptions
5
+ from bs4 import BeautifulSoup
4
6
  from curl_cffi import requests
5
7
  from lxml import html, etree
6
- from bs4 import BeautifulSoup
7
- from DrissionPage import ChromiumPage, ChromiumOptions
8
8
 
9
9
 
10
10
  # 使用requests获取html,用于测试是否使用了瑞数和jsl
@@ -60,7 +60,7 @@ def compress_html(content, only_text=False):
60
60
  element.attrib.pop(attr)
61
61
 
62
62
  result = etree.tostring(doc, encoding='unicode')
63
- result = htmlmin.minify(result)
63
+ result = minify_html.minify(result)
64
64
  compress_rate = round(len(content) / len(result) * 100)
65
65
  print(f"html压缩比=> {compress_rate}%")
66
66
  if not only_text:
@@ -1,10 +0,0 @@
1
- mcp_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mcp_tools/dp_tools.py,sha256=W9DLblNn1hQUmjvsvVOpb_hXVWI1BKD6VvI_VeI_QBI,8024
3
- mcp_tools/main.py,sha256=RPz7trCoyTPxj9PX6SFHP7bNdI8-NvpqbrFy2pge-Qg,804
4
- tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- tools/browser_manager.py,sha256=AM9hIQKtgMVxIZsEPxfHj9q41ZtzHrOS69wtgGBE3-Q,1458
6
- tools/tools.py,sha256=xw-aqUGEjeg32SfQJmlx0sXvxlvVSQb9BF5PrIVJLk0,4473
7
- jarvis_brain-0.1.4.4.dist-info/METADATA,sha256=9oAbXlGVAhX4f8XVWgE_DrOULumDkOiuID-5oXFwo1M,237
8
- jarvis_brain-0.1.4.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
9
- jarvis_brain-0.1.4.4.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
10
- jarvis_brain-0.1.4.4.dist-info/RECORD,,