chatgpt-mirai-qq-bot-web-search 0.2.13__py3-none-any.whl → 0.2.15__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.
- {chatgpt_mirai_qq_bot_web_search-0.2.13.dist-info → chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info}/METADATA +2 -1
- {chatgpt_mirai_qq_bot_web_search-0.2.13.dist-info → chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info}/RECORD +7 -7
- web_search/web_searcher.py +1 -5
- {chatgpt_mirai_qq_bot_web_search-0.2.13.dist-info → chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info}/LICENSE +0 -0
- {chatgpt_mirai_qq_bot_web_search-0.2.13.dist-info → chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info}/WHEEL +0 -0
- {chatgpt_mirai_qq_bot_web_search-0.2.13.dist-info → chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info}/entry_points.txt +0 -0
- {chatgpt_mirai_qq_bot_web_search-0.2.13.dist-info → chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: chatgpt-mirai-qq-bot-web-search
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.15
|
4
4
|
Summary: WebSearch adapter for lss233/chatgpt-mirai-qq-bot
|
5
5
|
Home-page: https://github.com/chuanSir123/web_search
|
6
6
|
Author: chuanSir
|
@@ -17,6 +17,7 @@ License-File: LICENSE
|
|
17
17
|
Requires-Dist: playwright
|
18
18
|
Requires-Dist: trafilatura
|
19
19
|
Requires-Dist: lxml-html-clean
|
20
|
+
Requires-Dist: kirara-ai<3.2.0
|
20
21
|
|
21
22
|
# web_search for ChatGPT-Mirai-QQ-Bot
|
22
23
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
web_search/__init__.py,sha256=_vfIxeLqXc53QoZ8sHzw_SbGkxb2CTRQdd1phQmC8GM,6147
|
2
2
|
web_search/blocks.py,sha256=QuXt3KMuY4hUW-ucleNYXFvW6YbUAB4Xu4m_SxdCd-U,9152
|
3
3
|
web_search/config.py,sha256=DhLiERBJR2V5Boglf7Aq9Rbc4vsvLIh67CrLDIPeqA0,398
|
4
|
-
web_search/web_searcher.py,sha256=
|
4
|
+
web_search/web_searcher.py,sha256=gYfD0K4_zTIn0pDbB2BABpw7poFuAC4mohJmQWL-3I4,21285
|
5
5
|
web_search/example/roleplayWithWebSearch.yaml,sha256=C-dGy3z8gcRcmxzurssP-kPRLqMf1TYR-nnNUaJjISE,7468
|
6
|
-
chatgpt_mirai_qq_bot_web_search-0.2.
|
7
|
-
chatgpt_mirai_qq_bot_web_search-0.2.
|
8
|
-
chatgpt_mirai_qq_bot_web_search-0.2.
|
9
|
-
chatgpt_mirai_qq_bot_web_search-0.2.
|
10
|
-
chatgpt_mirai_qq_bot_web_search-0.2.
|
11
|
-
chatgpt_mirai_qq_bot_web_search-0.2.
|
6
|
+
chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info/LICENSE,sha256=ILBn-G3jdarm2w8oOrLmXeJNU3czuJvVhDLBASWdhM8,34522
|
7
|
+
chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info/METADATA,sha256=cbaQedDYd6H_4Upgw3Z9TRx8GbXG9ZegvrczHIOWvD4,1767
|
8
|
+
chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
9
|
+
chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info/entry_points.txt,sha256=o3kRDSdSmSdnCKlK6qS57aN0WpI4ab-Nxub2NwUrjf0,64
|
10
|
+
chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info/top_level.txt,sha256=PoNm8MJYw_y8RTMaNlY0ePLoNHxVUAE2IHDuL5fFubI,11
|
11
|
+
chatgpt_mirai_qq_bot_web_search-0.2.15.dist-info/RECORD,,
|
web_search/web_searcher.py
CHANGED
@@ -62,10 +62,8 @@ class WebSearcher:
|
|
62
62
|
async def _ensure_initialized(self,proxy):
|
63
63
|
"""确保浏览器已初始化"""
|
64
64
|
try:
|
65
|
-
if self.context:
|
66
|
-
return self.context
|
67
|
-
self.playwright = await async_playwright().start()
|
68
65
|
|
66
|
+
self.playwright = await async_playwright().start()
|
69
67
|
# 创建用户数据目录路径
|
70
68
|
user_data_dir = os.path.join(os.path.expanduser("~"), ".playwright_user_data")+f'{random.randint(1, 1000000)}'
|
71
69
|
os.makedirs(user_data_dir, exist_ok=True)
|
@@ -106,7 +104,6 @@ class WebSearcher:
|
|
106
104
|
user_data_dir=user_data_dir,
|
107
105
|
**context_options
|
108
106
|
)
|
109
|
-
|
110
107
|
self.browser = None # 不再需要单独的browser引用
|
111
108
|
|
112
109
|
except Exception as e:
|
@@ -148,7 +145,6 @@ class WebSearcher:
|
|
148
145
|
|
149
146
|
except Exception as e:
|
150
147
|
logger.error(f"Failed to initialize WebSearcher: {e}")
|
151
|
-
await self.close()
|
152
148
|
raise
|
153
149
|
|
154
150
|
async def simulate_human_scroll(self, page):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|