mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-04 19:30:13 +00:00
fix key error for subtitle source
This commit is contained in:
parent
a2cae51f48
commit
0414df0de0
@ -112,7 +112,7 @@ class YoutubeSubtitle:
|
|||||||
videos_base = self.video.config["application"]["videos"]
|
videos_base = self.video.config["application"]["videos"]
|
||||||
for subtitle in relevant_subtitles:
|
for subtitle in relevant_subtitles:
|
||||||
dest_path = os.path.join(videos_base, subtitle["media_url"])
|
dest_path = os.path.join(videos_base, subtitle["media_url"])
|
||||||
source = subtitle["media_url"]
|
source = subtitle["source"]
|
||||||
response = requests.get(subtitle["url"])
|
response = requests.get(subtitle["url"])
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
print(f"{self.video.youtube_id}: failed to download subtitle")
|
print(f"{self.video.youtube_id}: failed to download subtitle")
|
||||||
|
Loading…
Reference in New Issue
Block a user