From 01989e6f2f6d8854e3aa6bd9a25546ae372a87d8 Mon Sep 17 00:00:00 2001 From: NekoAria <990879119@qq.com> Date: Sat, 3 Jul 2021 00:15:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=EF=B8=8F=20Bug=20fixes.=20-=20?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=AF=B9=E8=AE=A2=E9=98=85=20`=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E6=8A=93=E5=8F=96=E6=88=90=E5=8A=9F`=20?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/ELF_RSS2/RSS/rss_parsing.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/ELF_RSS2/RSS/rss_parsing.py b/src/plugins/ELF_RSS2/RSS/rss_parsing.py index fd1ed156..4ed2dcaa 100644 --- a/src/plugins/ELF_RSS2/RSS/rss_parsing.py +++ b/src/plugins/ELF_RSS2/RSS/rss_parsing.py @@ -86,11 +86,9 @@ async def start(rss: rss_class.Rss) -> None: f"{rss.name}[{rss.get_url()}]抓取失败!已达最大重试次数!请检查订阅地址!{cookies_str}\nE: {e}" ) return - old_rss_list = read_rss(rss.name).get("entries") - if not old_rss_list: - if not new_rss_list: - logger.info(f"{rss.name} 目前还没有内容!") - return + old_rss = read_rss(rss.name) + old_rss_list = old_rss.get("entries") + if not old_rss: write_rss(name=rss.name, new_rss=new_rss) logger.info(f"{rss.name} 第一次抓取成功!") return