This commit is contained in:
cwx committed 2022-12-17 20:50:34 +08:00
1 parent 9ad8a5f9cd
commit 815ad1f108
2 files changed
+14

No files matched your search

+10
View File
@@ -23,6 +23,7 @@ class comicInfo():
str_chapter = None str_chapter = None
str_icon = None str_icon = None
str_homePage = None str_homePage = None
str_listChapter = None
chapter_node = None chapter_node = None
comicName_node = None comicName_node = None
@@ -52,6 +53,15 @@ class comicInfo():
cls.str_chapter = cls.fixFileName(value) cls.str_chapter = cls.fixFileName(value)
cls.chapter_node = cls.setNodeAndValue(cls.chapter,value) cls.chapter_node = cls.setNodeAndValue(cls.chapter,value)
@classmethod
def setListChapter(cls, value):
cls.str_listChapter = value
@classmethod
def getLenChapters(cls):
return len(cls.str_listChapter)
@classmethod @classmethod
def setComicName(cls,value): def setComicName(cls,value):
cls.str_comicName = cls.fixFileName(value) cls.str_comicName = cls.fixFileName(value)
+4
View File
@@ -72,6 +72,7 @@ class comicEntity:
comicInfo.setCBS("韩漫") comicInfo.setCBS("韩漫")
comicInfo.setLang("zh") comicInfo.setLang("zh")
comicInfo.setComicNames(title+","+alias) comicInfo.setComicNames(title+","+alias)
comicInfo.setListChapter(chapters)
#comicUtils.setComic(title,alias,icon,author,tags,action,dep,update_date,chapters,chapter_href) #comicUtils.setComic(title,alias,icon,author,tags,action,dep,update_date,chapters,chapter_href)
count_chapter = 0 count_chapter = 0
@@ -81,6 +82,8 @@ class comicEntity:
if not comicInfo.nextExistsGetPath("done_"): if not comicInfo.nextExistsGetPath("done_"):
comicEntity.comicChapter(href,scramble=True,sleep=random.randint(15,25)) comicEntity.comicChapter(href,scramble=True,sleep=random.randint(15,25))
count_chapter += 1 count_chapter += 1
lenChapters = comicInfo.getLenChapters()
ntfy.sendMsg(f"预计总章节大小:{count_chapter} / {lenChapters}")
#一本漫画下载后等待 #一本漫画下载后等待
#清空文件夹 #清空文件夹
pathDirComic = comicInfo.getDirComic() pathDirComic = comicInfo.getDirComic()
@@ -119,6 +122,7 @@ class comicEntity:
ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节") ntfy.sendMsg(f"{sleep} 秒后开始下载下一个章节")
time.sleep(sleep) time.sleep(sleep)
@classmethod @classmethod
def Onechapter(cls,chapter_url,scramble=None): def Onechapter(cls,chapter_url,scramble=None):
if not str(chapter_url).startswith("http"): if not str(chapter_url).startswith("http"):