Jarvis-Brain 0.1.5.3__py3-none-any.whl → 0.1.5.5__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.3.dist-info → jarvis_brain-0.1.5.5.dist-info}/METADATA +1 -1
- jarvis_brain-0.1.5.5.dist-info/RECORD +10 -0
- tools/browser_manager.py +2 -2
- tools/tools.py +7 -3
- jarvis_brain-0.1.5.3.dist-info/RECORD +0 -10
- {jarvis_brain-0.1.5.3.dist-info → jarvis_brain-0.1.5.5.dist-info}/WHEEL +0 -0
- {jarvis_brain-0.1.5.3.dist-info → jarvis_brain-0.1.5.5.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
mcp_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
mcp_tools/dp_tools.py,sha256=TsktupVxzQkDRH4w-niEqJba3LkeWxIeyyx24ehpqAs,8411
|
|
3
|
+
mcp_tools/main.py,sha256=SiLF-tcEdApkzMjTZJEpVYX5d-LPW7aqy6A6lCBA7YQ,829
|
|
4
|
+
tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
tools/browser_manager.py,sha256=MrdONq-qxkDsq_xWeS5MjbUelCaB_UdQ3H79r1M1yuI,1746
|
|
6
|
+
tools/tools.py,sha256=TaWs-CNXy-py9BFmCnJrQ09ke938xXpImf-N2Qo_Rvc,4708
|
|
7
|
+
jarvis_brain-0.1.5.5.dist-info/METADATA,sha256=dvTinD5zIVsMuiTqrpXFnHdzyTDN7ROGXKDY9G6Brx0,241
|
|
8
|
+
jarvis_brain-0.1.5.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
9
|
+
jarvis_brain-0.1.5.5.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
|
|
10
|
+
jarvis_brain-0.1.5.5.dist-info/RECORD,,
|
tools/browser_manager.py
CHANGED
|
@@ -24,8 +24,8 @@ class BrowserManager:
|
|
|
24
24
|
co = ChromiumOptions().set_local_port(random_port)
|
|
25
25
|
custom_data_dir = os.path.join(os.path.expanduser('~'), 'DrissionPage', "userData", f"{random_port}")
|
|
26
26
|
co.set_user_data_path(custom_data_dir) # 设置用户数据路径
|
|
27
|
-
if not os.path.exists(custom_data_dir):
|
|
28
|
-
|
|
27
|
+
# if not os.path.exists(custom_data_dir):
|
|
28
|
+
# os.makedirs(custom_data_dir)
|
|
29
29
|
self.browser_pool[random_port] = ChromiumPage(co)
|
|
30
30
|
return random_port, self.browser_pool[random_port]
|
|
31
31
|
|
tools/tools.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import time
|
|
2
|
-
|
|
2
|
+
import random
|
|
3
|
+
import os
|
|
3
4
|
import minify_html
|
|
4
5
|
from DrissionPage import ChromiumPage, ChromiumOptions
|
|
5
6
|
from bs4 import BeautifulSoup
|
|
@@ -21,8 +22,11 @@ def requests_html(url):
|
|
|
21
22
|
def dp_headless_html(url):
|
|
22
23
|
opt = ChromiumOptions().headless(True)
|
|
23
24
|
opt.set_argument('--no-sandbox')
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
"""创建新的浏览器实例"""
|
|
26
|
+
random_port = random.randint(9934, 10034)
|
|
27
|
+
custom_data_dir = os.path.join(os.path.expanduser('~'), 'DrissionPage', "userData", f"{random_port}")
|
|
28
|
+
opt.set_user_data_path(custom_data_dir) # 设置用户数据路径
|
|
29
|
+
opt.set_local_port(random_port)
|
|
26
30
|
page = ChromiumPage(opt)
|
|
27
31
|
tab = page.latest_tab
|
|
28
32
|
tab.get(url)
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
mcp_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mcp_tools/dp_tools.py,sha256=TsktupVxzQkDRH4w-niEqJba3LkeWxIeyyx24ehpqAs,8411
|
|
3
|
-
mcp_tools/main.py,sha256=SiLF-tcEdApkzMjTZJEpVYX5d-LPW7aqy6A6lCBA7YQ,829
|
|
4
|
-
tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
tools/browser_manager.py,sha256=tUK9aKCmUcVWf7ok5ZSuHuARlyOXwiQfsFBJYqdGEgY,1742
|
|
6
|
-
tools/tools.py,sha256=qPa80xzQWCD8mSdg8isCgyei0XN8a7guGtR2J_MbQDU,4481
|
|
7
|
-
jarvis_brain-0.1.5.3.dist-info/METADATA,sha256=t1FGy-0xSy4WjQDKC7NwXiTrGAQVmBBaS8ovhD6u3po,241
|
|
8
|
-
jarvis_brain-0.1.5.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
9
|
-
jarvis_brain-0.1.5.3.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
|
|
10
|
-
jarvis_brain-0.1.5.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|