🐛 修复文章定时抓取时返回全部文章而不是新文档的问题

This commit is contained in:
洛水居室 2022-10-22 14:35:18 +08:00
parent 2f8d70334f
commit f55077e713
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -49,7 +49,7 @@ class Post(Plugin.Conversation, BasePlugin.Conversation):
def __init__(self):
self.bbs = Hyperion()
self.last_post_id_list: List[int] = []
if config.channels is not None and len(config.channels) > 0:
if config.channels and len(config.channels) > 0:
logger.success("文章定时推送处理已经开启")
bot.app.job_queue.run_repeating(self.task, 60 * 3)
@ -80,7 +80,7 @@ class Post(Plugin.Conversation, BasePlugin.Conversation):
self.last_post_id_list = temp_post_id_list
for post_id in temp_post_id_list:
for post_id in new_post_id_list:
try:
post_info = await self.bbs.get_post_info(2, post_id)
except APIHelperException as exc: