fix
This commit is contained in:
parent
ea6b8bd8cc
commit
6423a68a48
8
main.py
8
main.py
@ -2,11 +2,15 @@ import os
|
||||
from utils.entity.RouMan import comicEntity
|
||||
from utils.comic.PathStr import pathStr
|
||||
#from utils.entity.JMTI import comicEntity
|
||||
from utils.comic.ComicInfo import comicInfo
|
||||
|
||||
def comics():
|
||||
for x in range(0,50):
|
||||
for x in range(0,52):
|
||||
comicEntity.downladsComcis("https://rm01.xyz/books?&page="+str(x))
|
||||
|
||||
|
||||
def skip():
|
||||
comicInfo.setComicNameSkips("")
|
||||
|
||||
if __name__ == '__main__':
|
||||
# pathStr.setComicMainPath("JM")
|
||||
comics()
|
||||
|
||||
@ -41,7 +41,8 @@ class comicInfo():
|
||||
str_files_img = None
|
||||
str_chapter_index= None
|
||||
str_value1 = None
|
||||
|
||||
list_skip = []
|
||||
|
||||
chapter_node = None
|
||||
comicName_node = None
|
||||
dep_node = None
|
||||
@ -225,6 +226,14 @@ class comicInfo():
|
||||
def getChapterIndex(cls):
|
||||
return cls.str_chapter_index
|
||||
|
||||
@classmethod
|
||||
def setComicNameSkips(cls,value):
|
||||
return cls.list_skip.append(value)
|
||||
|
||||
@classmethod
|
||||
def getIsComicNameSkips(cls,value):
|
||||
return value in ",".join(cls.list_skip)
|
||||
|
||||
'''
|
||||
获取网站主页
|
||||
'''
|
||||
|
||||
@ -20,6 +20,9 @@ class baseComic:
|
||||
random_int = random.randint(5,20)
|
||||
comicInfo.setComicName(book_name)
|
||||
dir_conf_comic = comicInfo.getDirConfComic()
|
||||
if comicInfo.getIsComicNameSkips(book_name):
|
||||
print(f"{book_name} 在白名单中,已跳过")
|
||||
return None
|
||||
if not os.path.exists(dir_conf_comic):
|
||||
ntfy.sendMsg(f"{random_int}秒后开始下载 漫画:{book_name}")
|
||||
time.sleep(random_int)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user