From 52013aff3f06382816e90cd19a1c34e4401b014e Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 5 Feb 2022 23:42:42 +0700 Subject: [PATCH] fix subtitle download of first video of channel without folder --- tubearchivist/home/src/index/video.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tubearchivist/home/src/index/video.py b/tubearchivist/home/src/index/video.py index 897371b..e22e52d 100644 --- a/tubearchivist/home/src/index/video.py +++ b/tubearchivist/home/src/index/video.py @@ -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: