mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-07-11 22:47:18 +08:00
fix: fix #354
This commit is contained in:
@@ -37,7 +37,8 @@ def is_animation(tv_id, language) -> bool:
|
||||
|
||||
|
||||
def get_season(seasons: list) -> int:
|
||||
ss = sorted(seasons, key=lambda e: e.get("air_date"), reverse=True)
|
||||
ss = [s for s in seasons if s["air_date"] is not None]
|
||||
ss = sorted(ss, key=lambda e: e.get("air_date"), reverse=True)
|
||||
for season in ss:
|
||||
if re.search(r"第 \d 季", season.get("season")) is not None:
|
||||
date = season.get("air_date").split("-")
|
||||
@@ -84,8 +85,3 @@ def tmdb_parser(title, language) -> TMDBInfo | None:
|
||||
)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
title = "海盗战记"
|
||||
print(tmdb_parser(title, "zh").last_season)
|
||||
|
||||
Reference in New Issue
Block a user