mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 05:25:02 +03:00
[youtube] fix caption tracks extraction
Some checks failed
develop / build (3.10) (push) Has been cancelled
develop / build (3.11) (push) Has been cancelled
develop / build (3.12) (push) Has been cancelled
develop / build (3.13) (push) Has been cancelled
develop / build (3.7) (push) Has been cancelled
develop / build (3.8) (push) Has been cancelled
develop / build (3.9) (push) Has been cancelled
develop / build (pypy-3.10) (push) Has been cancelled
develop / build (pypy-3.8) (push) Has been cancelled
develop / build (pypy-3.9) (push) Has been cancelled
Some checks failed
develop / build (3.10) (push) Has been cancelled
develop / build (3.11) (push) Has been cancelled
develop / build (3.12) (push) Has been cancelled
develop / build (3.13) (push) Has been cancelled
develop / build (3.7) (push) Has been cancelled
develop / build (3.8) (push) Has been cancelled
develop / build (3.9) (push) Has been cancelled
develop / build (pypy-3.10) (push) Has been cancelled
develop / build (pypy-3.8) (push) Has been cancelled
develop / build (pypy-3.9) (push) Has been cancelled
This commit is contained in:
parent
51a7eb5efc
commit
f25ddca25a
@ -286,6 +286,8 @@ class YouTube(VideoExtractor):
|
||||
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')
|
||||
|
Loading…
Reference in New Issue
Block a user