20260911update
This commit is contained in:
+11
-2
@@ -33,7 +33,10 @@ class FileNaming:
|
||||
return filename
|
||||
|
||||
@classmethod
|
||||
def chinese_file_name(cls, name): return cls.fix_file_name(cls.chinese_convert(name))
|
||||
def chinese_file_name(cls, name, trim=True):
|
||||
if trim:
|
||||
name = name.strip()
|
||||
return cls.fix_file_name(cls.chinese_convert(name))
|
||||
|
||||
class ImageItem(BaseModel):
|
||||
url: HttpUrl
|
||||
@@ -186,7 +189,13 @@ class MangaInfo(BaseModel):
|
||||
#1
|
||||
if isinstance(v , str):
|
||||
list_name = []
|
||||
return list_name.append(v)
|
||||
list_name.append(v)
|
||||
return list_name
|
||||
elif isinstance(v, list):
|
||||
list_name = []
|
||||
for name in v:
|
||||
list_name.append(FileNaming.chinese_file_name(name))
|
||||
return list_name
|
||||
return v
|
||||
|
||||
def get_list_chapter(cls):
|
||||
|
||||
@@ -5,32 +5,31 @@ base_url: https://rouman5.com
|
||||
|
||||
selectors:
|
||||
manga_list:
|
||||
title: '//div[@class="truncate text-foreground"]/text()'
|
||||
url: '//main//div[@class="grid grid-cols-1 sm:grid-cols-4 md:grid-cols-6 gap-2 sm:gap-4"]//a/@href'
|
||||
updated_at: '//div[@class="grid grid-cols-1 sm:grid-cols-4 md:grid-cols-6 gap-2 sm:gap-4"]//a//div[@class="flex items-center space-x-1 justify-end"]/div[2]/text()'
|
||||
title: '//div[@class="site-comic-grid"]//a[@class="site-comic"]//h3/text()'
|
||||
url: '//div[@class="site-comic-grid"]//a[@class="site-comic"]/@href'
|
||||
updated_at: '//div[@class="site-comic-grid"]//a[@class="site-comic"]/div[@class="site-comic-meta"][2]/span[2]/text()'
|
||||
manga_info:
|
||||
title: '//div[@class="basis-3/5 text-sm sm:text-base"]//div[@class="text-xl text-foreground"]/text()'
|
||||
title: '//div[@class="site-book-info"]/h1[1]/text()'
|
||||
author:
|
||||
selector: '//div[@class="basis-3/5 text-sm sm:text-base"]//span[@class="text-foreground"]/text()'
|
||||
index: 0
|
||||
selector: '//div[@class="site-book-info"]//dl[@class="site-book-data"]/dd[1]/text()'
|
||||
status:
|
||||
selector: '//div[@class="basis-3/5 text-sm sm:text-base"]//span[@class="text-foreground"]/text()'
|
||||
index: 1
|
||||
selector: '//div[@class="site-book-info"]//dl[@class="site-book-data"]/dd[2]/text()'
|
||||
index: 0
|
||||
description:
|
||||
selector: '//div[@class="my-2 text-foreground text-sm sm:text-base"]/p/text()'
|
||||
selector: '//div[@class="site-book-synopsis text-foreground"]/p/text()'
|
||||
index: 1
|
||||
cover: '//div[@class="flex flex-row gap-3 sm:gap-4"]//div[@class="basis-2/5"]/img[@class="rounded"]/@src'
|
||||
cover: '//div[@class="site-book-overview"]/img[@class="site-detail-cover"]/@src'
|
||||
#status: .book-detail dl dt:contains("状态") + dd
|
||||
tags:
|
||||
selector: '//div[@class="basis-3/5 text-sm sm:text-base"]//span[@class="text-foreground"]/text()'
|
||||
index: 3
|
||||
#tags:
|
||||
# selector: '//div[@class="basis-3/5 text-sm sm:text-base"]//span[@class="text-foreground"]/text()'
|
||||
# index: 3
|
||||
# date: '//div[@class="text-gray-500 text-sm mt-2"]/div/text()'
|
||||
genre:
|
||||
value: "韩漫"
|
||||
age_rating:
|
||||
value: "R18+"
|
||||
chapter_link: '//div[@class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2 px-2 py-4"]//a/@href'
|
||||
chapters_name: '//main//div[@class="text truncate bg-muted p-2 hover:bg-primary/10"]/text()'
|
||||
chapter_link: '//div[@class="site-chapters"]//a/@href'
|
||||
chapters_name: '//main//div[@class="site-chapters"]//a/span/text()'
|
||||
|
||||
chapter_list:
|
||||
container: '//main//div[@class="text truncate bg-muted p-2 hover:bg-primary/10"]/text()'
|
||||
|
||||
Reference in New Issue
Block a user