diff --git a/common/BaseComicEntity.py b/common/BaseComicEntity.py index 7a6fb67..2fe510b 100644 --- a/common/BaseComicEntity.py +++ b/common/BaseComicEntity.py @@ -37,6 +37,7 @@ class baseComic: if not ciUtils.isUpdateComic(): ntfy.sendMsg(f"开始下载 漫画:{book_name}",alert=True) Comic.setCurrentDownLink(comic_href) + ComicPath.IS_UPDATE_COMIC = True return True else: ntfy.sendMsg(f"{book_name} 已是最新",alert=True) diff --git a/common/Constant.py b/common/Constant.py index c1efcc0..9c745ec 100644 --- a/common/Constant.py +++ b/common/Constant.py @@ -81,6 +81,7 @@ class ComicPath: ICONS_PATH = "icons" COMIC_INFO_XML = "ComicInfo.xml" TIME_SLEEP = 0.5 + IS_UPDATE_COMIC = False #顶级路径 @classmethod diff --git a/domain/RouMan.py b/domain/RouMan.py index a8d0e8b..9b89311 100644 --- a/domain/RouMan.py +++ b/domain/RouMan.py @@ -1,4 +1,5 @@ from common.Constant import pathStr +from common.Constant import ComicPath from common.Comic import ListComic from common.Comic import Comic from common.BaseComicEntity import baseComic @@ -22,7 +23,7 @@ class comicEntity: def oneComic(cls,sleep=None): c_url = Comic.getCurrentDownLink() if c_url == None: return None - title = htmlUtils.getXpathData('//div[@class="col"]/h5/text()',url=c_url,num=0,update=True) + title = htmlUtils.getXpathData('//div[@class="col"]/h5/text()',url=c_url,num=0,update=ComicPath.IS_UPDATE_COMIC) #别名 #alias = htmlUtils.xpathData('//span[contains(@class,"bookid_alias")]/text()',num=1) icon = htmlUtils.getXpathData('//img[@class="img-thumbnail"]/@src',num=0)