Jarvis-Brain 0.1.7.1__py3-none-any.whl → 0.1.7.3__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.7.1.dist-info → jarvis_brain-0.1.7.3.dist-info}/METADATA +1 -1
- {jarvis_brain-0.1.7.1.dist-info → jarvis_brain-0.1.7.3.dist-info}/RECORD +6 -6
- mcp_tools/dp_tools.py +1 -1
- tools/browser_proxy.py +6 -6
- {jarvis_brain-0.1.7.1.dist-info → jarvis_brain-0.1.7.3.dist-info}/WHEEL +0 -0
- {jarvis_brain-0.1.7.1.dist-info → jarvis_brain-0.1.7.3.dist-info}/entry_points.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
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=LT2x9edWmmDqNoy66zPgwjUSLpYbMPUPluvDoAXs0FU,10421
|
|
3
3
|
mcp_tools/main.py,sha256=Fdt2N3oKGwvruuno_ywnuWSlm1BexE9ZY669H2LTo9w,1056
|
|
4
4
|
tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
tools/browser_manager.py,sha256=EXM7n-sDOtdQGpWkVTAZHWhepVU-7PAoUTDNgGF9_fQ,1938
|
|
6
|
-
tools/browser_proxy.py,sha256=
|
|
6
|
+
tools/browser_proxy.py,sha256=ii4GCKOU-R6Uoj1I3k4RMqtuLOiddd4WAjG5WGc51F8,6359
|
|
7
7
|
tools/tools.py,sha256=TaWs-CNXy-py9BFmCnJrQ09ke938xXpImf-N2Qo_Rvc,4708
|
|
8
|
-
jarvis_brain-0.1.7.
|
|
9
|
-
jarvis_brain-0.1.7.
|
|
10
|
-
jarvis_brain-0.1.7.
|
|
11
|
-
jarvis_brain-0.1.7.
|
|
8
|
+
jarvis_brain-0.1.7.3.dist-info/METADATA,sha256=62mF8nqQZcrtOJtlTzUODlHGpUvpg9FcuisQDAtnwIs,241
|
|
9
|
+
jarvis_brain-0.1.7.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
10
|
+
jarvis_brain-0.1.7.3.dist-info/entry_points.txt,sha256=YFQT4xpkUqt5dM5wlKPQQOqcjMuFrT9iuRAzIpAyH7U,51
|
|
11
|
+
jarvis_brain-0.1.7.3.dist-info/RECORD,,
|
mcp_tools/dp_tools.py
CHANGED
|
@@ -42,7 +42,7 @@ def register_get_html(mcp: FastMCP, browser_manager, client_manager: DPProxyClie
|
|
|
42
42
|
async def get_html(browser_port: int, tab_id: str) -> dict[str, Any]:
|
|
43
43
|
_browser = browser_manager.get_browser(browser_port)
|
|
44
44
|
tab = _browser.get_tab(tab_id)
|
|
45
|
-
file_name_prefix = str(tab.title).
|
|
45
|
+
file_name_prefix = hashlib.md5(str(tab.title).encode('utf-8')).hexdigest()
|
|
46
46
|
if not os.path.exists(html_source_code_local_save_path):
|
|
47
47
|
os.makedirs(html_source_code_local_save_path)
|
|
48
48
|
min_html, compress_rate = compress_html(tab.html)
|
tools/browser_proxy.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import threading
|
|
2
2
|
from collections import deque
|
|
3
|
-
|
|
3
|
+
import time
|
|
4
4
|
from DrissionPage import ChromiumPage, ChromiumOptions
|
|
5
5
|
from DrissionPage._pages.chromium_tab import ChromiumTab
|
|
6
6
|
from DrissionPage._units.listener import DataPacket
|
|
@@ -133,21 +133,21 @@ def check_data_packet(packet: DataPacket, client: DPProxyClient):
|
|
|
133
133
|
data = None
|
|
134
134
|
if packet.request.hasPostData:
|
|
135
135
|
data = packet.request.postData
|
|
136
|
+
body = packet.response.body
|
|
136
137
|
temp_dict = {
|
|
137
138
|
"url": url,
|
|
138
139
|
"method": method,
|
|
139
140
|
"request_data": data,
|
|
140
|
-
"request_headers": packet.request.headers,
|
|
141
|
-
"response_headers": packet.response.headers,
|
|
142
|
-
"response_body":
|
|
141
|
+
"request_headers": dict(packet.request.headers),
|
|
142
|
+
"response_headers": dict(packet.response.headers),
|
|
143
|
+
"response_body": body,
|
|
143
144
|
}
|
|
144
|
-
print(temp_dict)
|
|
145
|
+
# print(temp_dict)
|
|
145
146
|
client.packet_queue.append(temp_dict)
|
|
146
147
|
|
|
147
148
|
|
|
148
149
|
client_manager = DPProxyClientManager()
|
|
149
150
|
|
|
150
|
-
#
|
|
151
151
|
# if __name__ == '__main__':
|
|
152
152
|
# co = ChromiumOptions().set_user_agent(
|
|
153
153
|
# "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36")
|
|
File without changes
|
|
File without changes
|