From c5c871c862935586d9480214e8ae8159daf15211 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Sun, 16 Feb 2025 12:50:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(lightnovel):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E6=9B=B4=E6=96=B0=E8=BD=BB=E5=B0=8F=E8=AF=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/clover_lightnovel/wenku8.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clover_lightnovel/wenku8.py b/src/clover_lightnovel/wenku8.py index 5c20d7c..3585ac4 100644 --- a/src/clover_lightnovel/wenku8.py +++ b/src/clover_lightnovel/wenku8.py @@ -99,7 +99,7 @@ async def get_books(): # print(orders[7].text) with open(getcwd() + "/src/clover_lightnovel/output1.html", 'w', encoding='utf-8') as file: file.write(head + str(orders[7]).replace('(查看 这本轻小说真厉害!2025 TOP榜单)', '') + str(orders[8]) + str(orders[9])) + 'target="_blank">查看 这本轻小说真厉害!2025 TOP榜单)', '') + str(orders[8]) + str(orders[9]) + str(orders[10])) if __name__ == '__main__': From 0a03d8325cc6f8c16922d50dd3eb7f470cea2632 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Sun, 16 Feb 2025 13:08:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(lightnovel):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/daily_report.py | 5 +++++ src/plugins/light_novel.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/plugins/daily_report.py b/src/plugins/daily_report.py index 5b250c6..b6d05d2 100644 --- a/src/plugins/daily_report.py +++ b/src/plugins/daily_report.py @@ -5,11 +5,16 @@ from nonebot.plugin import on_command from nonebot.adapters.qq import MessageSegment from src.clover_report.data_source import Report from src.configs.path_config import daily_news_path +import os daily_report = on_command("日报", rule=to_me(), priority=10, block=True) @daily_report.handle() async def handle_function(): + now = datetime.now() + file = Path() / daily_news_path / f"{now.date()}.png" + if not os.path.exists(file): + await daily_report.send("您是今天第一个查看日报的哦,来看看世界上都发生了些什么吧💫\nCrunching the latest news, just for you. Hang tight…") await Report.get_report_image() now = datetime.now().date() await daily_report.finish(MessageSegment.file_image(Path(daily_news_path+f"{now}.png"))) diff --git a/src/plugins/light_novel.py b/src/plugins/light_novel.py index e3339d3..6965bd9 100644 --- a/src/plugins/light_novel.py +++ b/src/plugins/light_novel.py @@ -5,11 +5,16 @@ from nonebot.plugin import on_command from nonebot.adapters.qq import MessageSegment from src.clover_lightnovel.html_to_img import get_ln_image from src.configs.path_config import light_novel_path +import os light_novel = on_command("轻小说", rule=to_me(), priority=10, block=True) @light_novel.handle() async def get_ln(): + now = datetime.now() + file = Path() / light_novel_path / f"{now.date()}.png" + if not os.path.exists(file): + await light_novel.send("正在为您整理最新轻小说咨询哦,请稍等🥳") await get_ln_image() now = datetime.now().date() await light_novel.finish(MessageSegment.file_image(Path(light_novel_path+f"{now}.png"))) \ No newline at end of file From 91fa1e4cfb543a4014394ed3631815f1d29645f8 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita <168412973+ClovertaTheTrilobita@users.noreply.github.com> Date: Sun, 16 Feb 2025 13:14:05 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a475df6..08f2582 100644 --- a/README.md +++ b/README.md @@ -336,7 +336,7 @@ deepseek_url= "https://api.deepseek.com" deepseek_key= "" ``` -将你自己的deepseek url和api填入,并将文件重命名为chat_ai.yaml。 +将你自己的deepseek url和api填入,并将文件重命名为api_config.py。 再设置一个管理员认证密码,详见[下一节](#admin_control)。