请教两个下载封面图片失败的问题
#263
-
1.能否在无法获取封面的情况下进行整理不太在意整理内容中有无封面,但很多fc2获取不到封面会导致整理失败,比如
能否忽略封面图之类的获取,只进行演员信息和标题之类的处理?尝试修改配置文件中的required_keys = title但并没有奏效 2.获取封面时出现的error目前只在这一个资源中出现
能在msin获取有效的图片链接但下载失败,是因为作品标题原因产生的路径问题吗 |
Beta Was this translation helpful? Give feedback.
Answered by
qicfan
Mar 27, 2024
Replies: 2 comments 1 reply
-
这是个BUG,着急用的话,可以使用源码运行,将根目录./JavSP.py的501到533行修改为下面的代码即可,主要每一行前面的空格都要原样复制。 if ('cover' in cfg.Crawler.required_keys):
inner_bar.set_description('下载封面图片')
if cfg.Picture.use_big_cover:
cover_dl = download_cover(movie.info.covers, movie.fanart_file, movie.info.big_covers)
else:
cover_dl = download_cover(movie.info.covers, movie.fanart_file)
check_step(cover_dl, '下载封面图片失败')
cover, pic_path = cover_dl
# 确保实际下载的封面的url与即将写入到movie.info中的一致
if cover != movie.info.cover:
movie.info.cover = cover
# 根据实际下载的封面的格式更新fanart/poster等图片的文件名
if pic_path != movie.fanart_file:
movie.fanart_file = pic_path
actual_ext = os.path.splitext(pic_path)[1]
movie.poster_file = os.path.splitext(movie.poster_file)[0] + actual_ext
if cfg.Picture.use_ai_crop and (
movie.info.uncensored or
movie.data_src == 'fc2' or
movie.info.label.upper() in cfg.Picture.use_ai_crop_labels or
(R'\d' in cfg.Picture.use_ai_crop_labels and re.match(r'(\d{6}[-_]\d{3})', movie.info.dvdid))):
method = cfg.Picture.ai_engine
inner_bar.set_description('使用AI裁剪海报封面')
else:
inner_bar.set_description('裁剪海报封面')
method = 'normal'
crop_poster_wrapper(movie.fanart_file, movie.poster_file, method, movie.hard_sub)
check_step(True)
if 'video_station' in cfg.NamingRule.media_servers:
postStep_videostation(movie)
if len(movie.files) > 1 and 'universal' not in cfg.NamingRule.media_servers:
postStep_MultiMoviePoster(movie) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
moefive
-
应该是标题末尾有三点导致路径解析出错了,最简单的解决方案就是修改config.ini里的save_dir,改成 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这是个BUG,着急用的话,可以使用源码运行,将根目录./JavSP.py的501到533行修改为下面的代码即可,主要每一行前面的空格都要原样复制。