fix douban scraper

This commit is contained in:
jxxghp
2023-11-19 09:05:58 +08:00
parent b6ac5f0f84
commit 11d65e7527
3 changed files with 27 additions and 5 deletions

View File

@ -41,6 +41,10 @@ class DoubanScraper:
# 生成电影图片
self.__save_image(url=mediainfo.poster_path,
file_path=file_path.with_name(f"poster{Path(mediainfo.poster_path).suffix}"))
# 背景图
if mediainfo.backdrop_path:
self.__save_image(url=mediainfo.backdrop_path,
file_path=file_path.with_name(f"backdrop{Path(mediainfo.backdrop_path).suffix}"))
# 电视剧
else:
# 不存在时才处理
@ -51,6 +55,10 @@ class DoubanScraper:
# 生成根目录图片
self.__save_image(url=mediainfo.poster_path,
file_path=file_path.with_name(f"poster{Path(mediainfo.poster_path).suffix}"))
# 背景图
if mediainfo.backdrop_path:
self.__save_image(url=mediainfo.backdrop_path,
file_path=file_path.with_name(f"backdrop{Path(mediainfo.backdrop_path).suffix}"))
# 季目录NFO
if not file_path.with_name("season.nfo").exists():
self.__gen_tv_season_nfo_file(mediainfo=mediainfo,