Fix poster link problem

This commit is contained in:
EstrellaXD
2023-05-11 13:59:06 +08:00
parent ab5a2acd80
commit 0fc00c4c1c
3 changed files with 4 additions and 8 deletions

View File

@@ -180,7 +180,8 @@ class BangumiDatabase(DataConnector):
return ""
for official_title, poster_link in data:
if official_title in bangumi_name:
return poster_link
if poster_link:
return poster_link
return ""
def match_list(self, title_dict: dict, rss_link: str) -> dict:

View File

@@ -63,7 +63,7 @@ def tmdb_parser(title, language) -> TMDBInfo | None:
break
url_info = info_url(id, language)
info_content = req.get_json(url_info)
season = [{"season": s.get("name"), "air_date": s.get("air_date")} for s in info_content.get("seasons")]
season = [{"season": s.get("name"), "air_date": s.get("air_date"), "poster_path": s.get("poster_path")} for s in info_content.get("seasons")]
last_season = get_season(season)
original_title = info_content.get("original_name")
official_title = info_content.get("name")
@@ -74,5 +74,5 @@ def tmdb_parser(title, language) -> TMDBInfo | None:
if __name__ == '__main__':
title = "鬼灭之刃+刀匠村篇"
title = "鬼灭之刃"
print(tmdb_parser(title, "zh"))

View File

@@ -99,8 +99,3 @@ def torrent_parser(
suffix=suffix
)
if __name__ == '__main__':
name = "海盗战记 (2019) S01E01.mp4"
bf = torrent_parser(name, file_type="media")
print(bf)