fix rouman
This commit is contained in:
@@ -12,12 +12,21 @@ from utils.downloader import download_images
|
||||
from utils.Ntfy import ntfy
|
||||
from utils.VerUtils import verUtils
|
||||
from PIL import Image
|
||||
import get_jm_url
|
||||
|
||||
class comicEntity:
|
||||
count_chapter = 0
|
||||
aid = None
|
||||
repeat = 0
|
||||
|
||||
@classmethod
|
||||
def baseReUrl(cls,url):
|
||||
newurl_list=get_jm_url.app()
|
||||
if newurl_list:
|
||||
if re.findall(r'https://(.*?)/\w+/\d+/',url)[0] not in newurl_list:
|
||||
for newurl in newurl_list:
|
||||
url = re.sub(re.findall(r'https://(.*?)/\w+/\d+/', url)[0], newurl, url)
|
||||
return url
|
||||
|
||||
@classmethod
|
||||
def downladsComcis(cls,url):
|
||||
|
||||
@@ -152,7 +152,8 @@ class comicEntity:
|
||||
isScramble = str(img).startswith("scramble=")
|
||||
if isScramble:
|
||||
c_path = os.path.join(chapter_dir, img)
|
||||
imageUtils.getScrambleImage(c_path)
|
||||
#imageUtils.getScrambleImage(c_path)
|
||||
imageUtils.encode_scramble_image(c_path)
|
||||
#进入下一阶段
|
||||
comicInfo.nextImgToDownloadChapter()
|
||||
return is_next
|
||||
@@ -172,10 +173,6 @@ class comicEntity:
|
||||
comicInfo.setComicName(bookName)
|
||||
comicInfo.setChapterName(chapterName)
|
||||
comicInfo.setDep(description)
|
||||
pathComicInfo = comicInfo.getPathComicInfoXML()
|
||||
if not os.path.exists(pathComicInfo):
|
||||
#print("不存在ComicInfo.xml 生成中...")
|
||||
comicInfo.writeComicInfoXML(chapterName)
|
||||
|
||||
if not chapterAPIPath == None:
|
||||
chapterAPIPath = str(chapterAPIPath).encode('utf-8').decode('unicode_escape')
|
||||
@@ -237,6 +234,11 @@ class comicEntity:
|
||||
except:
|
||||
ntfy(f"删除失败 {cbz_path}")
|
||||
if is_next:
|
||||
pathComicInfo = comicInfo.getPathComicInfoXML()
|
||||
if not os.path.exists(pathComicInfo):
|
||||
#print("不存在ComicInfo.xml 生成中...")
|
||||
comicInfo.setPages(list_fileName)
|
||||
comicInfo.writeComicInfoXML(chapterName)
|
||||
ntfy.sendMsg(f"{bookName} {chapterName} 下载中")
|
||||
download_images(list_img,comicInfo.getDirComicChapter(), filesName=list_fileName)
|
||||
return is_next
|
||||
Reference in New Issue
Block a user