Skip to content

Commit

Permalink
fix wrong sep in url parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
aki committed May 27, 2021
1 parent 6dd8417 commit a03ef55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def scrape(ci, folderPath, downloadList, urls):
content_ts = response.content

os.path.split(urls)
fileName = urls.split(os.path.sep)[-1][0:-3]
fileName = urls.split('/')[-1][0:-3]
saveName = os.path.join(folderPath, fileName + ".mp4")
if os.path.exists(saveName):
# 跳過已下載
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


# 建立番號資料夾
urlSplit = url.split(os.path.sep)
urlSplit = url.split('/')
dirName = urlSplit[-2]
if not os.path.exists(dirName):
os.makedirs(dirName)
Expand Down

0 comments on commit a03ef55

Please sign in to comment.