From 324612dc2145bd6d5707709e26cc9364bf121a82 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 27 Feb 2025 16:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=BE=8E=E5=9B=BE=E7=BD=91?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 6 +++++- xiuren/meitu_dl.py | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/robot.py b/robot.py index c539594..bb15aa8 100644 --- a/robot.py +++ b/robot.py @@ -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}") diff --git a/xiuren/meitu_dl.py b/xiuren/meitu_dl.py index 0a080a9..ef1ed0e 100644 --- a/xiuren/meitu_dl.py +++ b/xiuren/meitu_dl.py @@ -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() \ No newline at end of file + meitu_dowload_pic()