This commit is contained in:
caiwx86 2024-02-21 19:01:06 +08:00
parent 9b6fb12c8d
commit 9b3ac8878f
2 changed files with 3 additions and 4 deletions

View File

@ -45,7 +45,7 @@ RETRY_HTTP_CODES = [408, 401]
CONCURRENT_REQUESTS_PER_DOMAIN = 16
CONCURRENT_REQUESTS_PER_IP = 16
PROXY_LIST = [
"http://127.0.0.1:7890",
# "http://127.0.0.1:7890",
# "http://10.0.10.117:8123",
]
# Disable cookies (enabled by default)

View File

@ -11,7 +11,7 @@ class RmComicSpider(scrapy.Spider):
main_url = 'https://'+allowed_domains[0]
start_urls = main_url+'/books'
# 遍历网站页数
# 遍历网站页数数据
def start_requests(self):
for x in range(0,60):
yield scrapy.Request(self.start_urls+"?&page="+str(x), callback=self.books_comic)
@ -30,8 +30,7 @@ class RmComicSpider(scrapy.Spider):
for chapter, link in zip(comic_item.get_chapters(), comic_item.get_chapter_href()):
item = comic_item.load_item()
cbz_path = ComicPath().get_file_path(item=item, result_type="cbz", convert=True, chapter=chapter)
#if not checkUtils().is_error(item) and os.path.exists(cbz_path):
if os.path.exists(cbz_path):
if not checkUtils().is_error(item) and os.path.exists(cbz_path):
logging.info(f"漫画 {cbz_path} 已存在, 跳过中...")
yield item
else: