Merge remote-tracking branch 'origin/master'

This commit is contained in:
SlyAimer 2025-02-16 14:37:16 +08:00
commit 7a5287a72f
4 changed files with 12 additions and 2 deletions

View file

@ -336,7 +336,7 @@ deepseek_url= "https://api.deepseek.com"
deepseek_key= "<KEY>"
```
将你自己的deepseek url和api填入并将文件重命名为<b><i>chat_ai.yaml</i></b>
将你自己的deepseek url和api填入并将文件重命名为<b><i>api_config.py</i></b>
再设置一个管理员认证密码,详见[下一节](#admin_control)。

View file

@ -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('(<a href="https://www.wenku8.net/zt/sugoi/2025.php"', '').replace(
'target="_blank">查看 这本轻小说真厉害2025 TOP榜单</a>)', '') + str(orders[8]) + str(orders[9]))
'target="_blank">查看 这本轻小说真厉害2025 TOP榜单</a>)', '') + str(orders[8]) + str(orders[9]) + str(orders[10]))
if __name__ == '__main__':

View file

@ -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")))

View file

@ -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")))