This commit is contained in:
caiwx86 2022-12-20 17:35:04 +08:00
parent 82d3694d7e
commit 57db571e5d
2 changed files with 7 additions and 7 deletions

View File

@ -61,10 +61,10 @@ class htmlUtils:
url_text = res
if type == "json":
url_text = res.json()
else:
cls.saveHtml(curl,res.text)
if type == None:
url_text = html.fromstring(res.text)
cls.saveHtml(curl,res.text)
cls.saveHtml(curl,res.text)
except:
print(f'Retry! 第{count}')
time.sleep(3)

View File

@ -86,10 +86,10 @@ class comicEntity:
cls.count_chapter += 1
#一本漫画下载后等待
#清空文件夹
pathDirComic = comicInfo.getDirComic()
if os.path.exists(pathDirComic):
shutil.rmtree(pathDirComic)
if not sleep == None:
path_dir_comic = comicInfo.getDirComic()
if os.path.exists(path_dir_comic):
shutil.rmtree(path_dir_comic)
if sleep != None:
time.sleep(sleep)
'''