Fix check error, close #266

This commit is contained in:
EstrellaXD
2023-05-18 00:37:00 +08:00
parent 6498614b1b
commit 710cb40e41
9 changed files with 32 additions and 27 deletions

View File

@@ -36,11 +36,13 @@ class Checker:
def check_torrents() -> bool:
with RequestContent() as req:
try:
torrents = req.get_torrents(settings.rss_link)
torrents = req.get_torrents(settings.rss_link, retry=2)
if torrents:
return True
except AttributeError:
pass
link = f"https://mikanani.me/RSS/MyBangumi?token={settings.rss_parser.token}"
if req.get_torrents(link):
return True
return False
@staticmethod