mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-04 19:30:13 +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"])
|
response = requests.get(subtitle["url"])
|
||||||
if response.ok:
|
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:
|
with open(dest_path, "w", encoding="utf-8") as subfile:
|
||||||
subfile.write(response.text)
|
subfile.write(response.text)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user