This commit is contained in:
caiwx86 2025-01-11 19:13:52 +08:00
parent 358a6b73c5
commit 7777b7479a

View File

@ -46,10 +46,11 @@ class RmComicSpider(scrapy.Spider):
# 获取最终存放CBZ的路径 # 获取最终存放CBZ的路径
cbz_path = ComicPath(item=item).PATH_CBZ() cbz_path = ComicPath(item=item).PATH_CBZ()
# 校验繁体和简体中文CBZ路径是否存在 # 校验繁体和简体中文CBZ路径是否存在
if cbz_path !=None and os.path.exists(cbz_path): # if cbz_path !=None and os.path.exists(cbz_path):
logging.info(f"漫画 {cbz_path} 已存在, 跳过中...") # logging.info(f"漫画 {cbz_path} 已存在, 跳过中...")
yield item # yield item
else: #else:
if cbz_path !=None and not os.path.exists(cbz_path):
# 开始访问章节链接并跳转到self.parse_chapter # 开始访问章节链接并跳转到self.parse_chapter
yield scrapy.Request(self.main_url+link, meta={'item': item}, callback=self.parse_chapter) yield scrapy.Request(self.main_url+link, meta={'item': item}, callback=self.parse_chapter)