mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2026-04-29 19:05:38 +00:00
✨ 重构 meogirl 模块,统一导入命名并添加类型忽略注释
This commit is contained in:
@@ -2,7 +2,7 @@ import re
|
||||
import urllib.parse
|
||||
|
||||
import httpx
|
||||
from bs4 import BeautifulSoup
|
||||
from bs4 import BeautifulSoup # type: ignore
|
||||
from nonebot.log import logger
|
||||
|
||||
headers = {
|
||||
@@ -64,9 +64,9 @@ async def introduce(msg: str):
|
||||
elif response.status_code == 404:
|
||||
logger.info(f'未找到"{msg}", 进行搜索')
|
||||
|
||||
from . import mg_Search
|
||||
from . import mg_search
|
||||
|
||||
context = await mg_Search.search(msg, 1)
|
||||
context = await mg_search.search(msg, 1)
|
||||
keyword = re.search(r".*?\n", context, flags=re.DOTALL).group()[:-1] # type: ignore
|
||||
|
||||
logger.success(f'搜索完成, 打开"{keyword}"')
|
||||
|
||||
Reference in New Issue
Block a user