fix: analyser log error.

This commit is contained in:
EstrellaXD
2023-10-11 13:09:17 +08:00
parent 78e67fef85
commit de63a5b0b5

View File

@@ -82,16 +82,14 @@ class RSSAnalyser(TitleParser):
def link_to_data(self, rss: RSSItem) -> Bangumi | ResponseModel:
torrents = self.get_rss_torrents(rss.url, False)
try:
for torrent in torrents:
data = self.torrent_to_data(torrent, rss)
if data:
return data
except Exception as e:
logger.debug(e)
return ResponseModel(
status=False,
status_code=406,
msg_en="No new title has been found.",
msg_zh="没有找到新的番剧。",
)
for torrent in torrents:
data = self.torrent_to_data(torrent, rss)
if data:
return data
else:
return ResponseModel(
status=False,
status_code=406,
msg_en="Cannot parse this link.",
msg_zh="无法解析此链接。",
)