Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[bug匯報]對於沒有合法title的視頻, 程序會在combine_video時出錯 #91

Open
BeautyyuYanli opened this issue Jun 30, 2020 · 1 comment

Comments

@BeautyyuYanli
Copy link

BeautyyuYanli commented Jun 30, 2020

對於沒有合法title的視頻, 例如av22706030#75 中提到的視頻, 程序將無法創建文件夾/bilibili_video/video_title/, 故對應的文件將下載在文件夾/bilibili_video/

當該文件夾包含一個以上的視頻文件時, 函數combine_video會認爲正在下載的視頻是一個分段視頻, 並試圖進行合並. 但事實上該視頻並非分段視頻, 故會出現如下報錯

  File "/.../downloader.py", line 239, in main
    combine_video(title_list)
  File "/.../downloader.py", line 167, in combine_video
    for file in sorted(os.listdir(current_video_path), key=lambda x: int(x[x.rindex("-") + 1:x.rindex(".")])):
  File "/.../downloader.py", line 167, in <lambda>
    for file in sorted(os.listdir(current_video_path), key=lambda x: int(x[x.rindex("-") + 1:x.rindex(".")])):
ValueError: substring not found

一個可以考慮的解決方案是, 在title後添加一個隨機字符串

@BeautyyuYanli
Copy link
Author

多說一句, 這裏的issues有太多的spam了, 建議清理一下

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant