sanitize chapter names

This commit is contained in:
Puyodead1 2021-05-18 22:17:25 -04:00
parent d58bb86e6d
commit 2e0acda71a

View File

@ -242,7 +242,7 @@ def parse(data):
chapters[-1]["lectures"].append(obj) chapters[-1]["lectures"].append(obj)
for chapter in chapters: for chapter in chapters:
chapter_dir = f"%s\\%s. %s" % (download_dir,chapters.index(chapter) + 1,chapter["title"]) chapter_dir = f"%s\\%s. %s" % (download_dir,chapters.index(chapter) + 1,sanitize(chapter["title"]))
if not os.path.exists(chapter_dir): if not os.path.exists(chapter_dir):
os.mkdir(chapter_dir) os.mkdir(chapter_dir)