Skip to content

Commit f25ddca

Browse files
committed
[youtube] fix caption tracks extraction
1 parent 51a7eb5 commit f25ddca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/you_get/extractors/youtube.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ def prepare(self, **kwargs):
286286
for ct in caption_tracks:
287287
ttsurl, lang = ct['baseUrl'], ct['languageCode']
288288

289+
if ttsurl.startswith('/'):
290+
ttsurl = 'https://www.youtube.com' + ttsurl
289291
tts_xml = parseString(get_content(ttsurl))
290292
transcript = tts_xml.getElementsByTagName('transcript')[0]
291293
texts = transcript.getElementsByTagName('text')

0 commit comments

Comments
 (0)