加入美图网提取功能
This commit is contained in:
6
robot.py
6
robot.py
@@ -42,6 +42,7 @@ from message_summary.message_summary_4o import message_summary
|
|||||||
from sehuatang.shehuatang import pdf_file_path
|
from sehuatang.shehuatang import pdf_file_path
|
||||||
from xiuren.meitu_dl import meitu_dowload_pic
|
from xiuren.meitu_dl import meitu_dowload_pic
|
||||||
from xiuren.random_pic import get_xiuren_pic
|
from xiuren.random_pic import get_xiuren_pic
|
||||||
|
from xiuren.xiuren_pdf import generate_pdf_from_images
|
||||||
|
|
||||||
|
|
||||||
class Robot(Job):
|
class Robot(Job):
|
||||||
@@ -538,7 +539,10 @@ class Robot(Job):
|
|||||||
|
|
||||||
def xiu_ren_download_task(self):
|
def xiu_ren_download_task(self):
|
||||||
try:
|
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")
|
self.wcf.send_file(path, "45317011307@chatroom")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.LOG.error(f"xiuren_dowload_pic error:{e}")
|
self.LOG.error(f"xiuren_dowload_pic error:{e}")
|
||||||
|
|||||||
@@ -153,9 +153,8 @@ def meitu_dowload_pic():
|
|||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
# 将下载好的帖子生成PDF
|
return download_root
|
||||||
return generate_pdf_from_images(download_root)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
meitu_dowload_pic()
|
meitu_dowload_pic()
|
||||||
|
|||||||
Reference in New Issue
Block a user