fix: fix parser log problem.

This commit is contained in:
EstrellaXD
2023-05-29 17:54:31 +08:00
parent 7f5447c37c
commit 68f9e491e8
3 changed files with 4 additions and 8 deletions

View File

@@ -179,9 +179,3 @@ def raw_parser(raw: str) -> Episode | None:
return Episode(
name_en, name_zh, name_jp, season, sr, episode, sub, group, dpi, source
)
if __name__ == "__main__":
title = "【幻樱字幕组】【4月新番】【古见同学有交流障碍症 第二季 Komi-san wa, Komyushou Desu. S02】【22】【GB_MP4】【1920X1080】"
ep = raw_parser(title)
print(ep)

View File

@@ -84,8 +84,9 @@ class RSSAnalyser:
return []
# New List
new_data = self.torrents_to_data(torrents_to_add, rss_link, full_parse)
if full_parse:
database.insert_list(new_data)
if new_data:
if full_parse:
database.insert_list(new_data)
return new_data
def run(self, rss_link: str = settings.rss_link):

View File

@@ -69,3 +69,4 @@ def test_raw_parser():
assert info.resolution == "720P"
assert info.episode == 5
assert info.season == 1