Skip to content

Commit

Permalink
Merge pull request #149 from NekoAria/2.0
Browse files Browse the repository at this point in the history
修正对订阅 `第一次抓取成功` 的逻辑
  • Loading branch information
Quan authored Jul 2, 2021
2 parents a1ad050 + 01989e6 commit d874e90
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/plugins/ELF_RSS2/RSS/rss_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d874e90

Please sign in to comment.