diff --git a/src/you_get/extractors/youtube.py b/src/you_get/extractors/youtube.py index 59f22c3cd2..8ecdc8aee3 100644 --- a/src/you_get/extractors/youtube.py +++ b/src/you_get/extractors/youtube.py @@ -286,6 +286,8 @@ def prepare(self, **kwargs): for ct in caption_tracks: ttsurl, lang = ct['baseUrl'], ct['languageCode'] + if ttsurl.startswith('/'): + ttsurl = 'https://www.youtube.com' + ttsurl tts_xml = parseString(get_content(ttsurl)) transcript = tts_xml.getElementsByTagName('transcript')[0] texts = transcript.getElementsByTagName('text')