加入美图网提取功能

This commit is contained in:
liuwei
2025-02-27 16:18:40 +08:00
parent 00b05565bb
commit 324612dc21
2 changed files with 7 additions and 4 deletions

View File

@@ -42,6 +42,7 @@ from message_summary.message_summary_4o import message_summary
from sehuatang.shehuatang import pdf_file_path
from xiuren.meitu_dl import meitu_dowload_pic
from xiuren.random_pic import get_xiuren_pic
from xiuren.xiuren_pdf import generate_pdf_from_images
class Robot(Job):
@@ -538,7 +539,10 @@ class Robot(Job):
def xiu_ren_download_task(self):
try:
path = meitu_dowload_pic()
# 每天下载10组图然后发一个帖子PDF
download_path = meitu_dowload_pic()
path = generate_pdf_from_images(download_path)
self.wcf.send_file(path, "45317011307@chatroom")
except Exception as e:
self.LOG.error(f"xiuren_dowload_pic error{e}")

View File

@@ -153,9 +153,8 @@ def meitu_dowload_pic():
time.sleep(1)
# 将下载好的帖子生成PDF
return generate_pdf_from_images(download_root)
return download_root
if __name__ == "__main__":
meitu_dowload_pic()
meitu_dowload_pic()