捕获异常
This commit is contained in:
parent
35951852da
commit
d008efadcf
10
main.py
10
main.py
@ -1,4 +1,6 @@
|
|||||||
from utils.entity.RouMan import comicEntity
|
from utils.entity.RouMan import comicEntity
|
||||||
|
from utils.comic.ComicInfo import comicInfo
|
||||||
|
import os,shutil
|
||||||
|
|
||||||
def comics():
|
def comics():
|
||||||
for x in range(0,20):
|
for x in range(0,20):
|
||||||
@ -10,4 +12,10 @@ if __name__ == '__main__':
|
|||||||
# url = "https://rm01.xyz/books/3700b70b-c5a9-4328-9ae3-cffda6a77339/15"
|
# url = "https://rm01.xyz/books/3700b70b-c5a9-4328-9ae3-cffda6a77339/15"
|
||||||
# comicEntity.comicChapter(url,scramble=True)
|
# comicEntity.comicChapter(url,scramble=True)
|
||||||
# comicEntity.oneComic("https://rm01.xyz/books/c94f80c1-a673-4c74-bb5e-ad5ac7dd766b")
|
# comicEntity.oneComic("https://rm01.xyz/books/c94f80c1-a673-4c74-bb5e-ad5ac7dd766b")
|
||||||
comics()
|
try:
|
||||||
|
comics()
|
||||||
|
except:
|
||||||
|
dirComic = comicInfo.getDirComic()
|
||||||
|
if not dirComic == None and os.path.exists(dirComic):
|
||||||
|
shutil.rmtree(dirComic)
|
||||||
|
comics()
|
||||||
Loading…
Reference in New Issue
Block a user