Skip to content

Commit

Permalink
Fix Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
fangxx3863 committed May 2, 2022
1 parent 82d7ff8 commit 2abdead
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bilinovel2epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def 标准化JSON(s:str)->dict:
# 下载函数
def 下载文件(url, path='file'):
if isinstance(url, str):
urlFile = Path(url.split("/")[-1])
urlFile = Path(path + "/" + url.split("/")[-1])
if urlFile.exists():
pass
else:
Expand All @@ -116,7 +116,7 @@ def 下载文件(url, path='file'):
if isinstance(url, list):
errUrls = []
for i in url:
urlFile = Path(i.split("/")[-1])
urlFile = Path(path + "/" + i.split("/")[-1])
if urlFile.exists():
pass
else:
Expand All @@ -136,7 +136,7 @@ def 下载图片集合(urls, jobs):
while errUrls:
for i in errUrls:
try:
os.remove(str(i).split("src=\"")[-1][:-3].split("/")[-1] + ".part")
os.remove("file/" + str(i).split("src=\"")[-1][:-3].split("/")[-1] + ".part")
except:
continue
errUrls = 下载文件(errUrls)
Expand Down

0 comments on commit 2abdead

Please sign in to comment.