mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 20:00:15 +00:00
fix subtitle download of first video of channel without folder
This commit is contained in:
parent
44af78b7e3
commit
52013aff3f
@ -113,6 +113,8 @@ class YoutubeSubtitle:
|
||||
)
|
||||
response = requests.get(subtitle["url"])
|
||||
if response.ok:
|
||||
# create folder here for first video of channel
|
||||
os.makedirs(os.path.split(dest_path)[0], exist_ok=True)
|
||||
with open(dest_path, "w", encoding="utf-8") as subfile:
|
||||
subfile.write(response.text)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user