[extractor/ARD] Add vtt subtitles (#5835)

Authored by: CapacitorSet
This commit is contained in:
Giulio Muscarello 2022-12-24 11:49:10 +01:00 committed by GitHub
parent 1c226ccdd4
commit d61ef7f343
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,6 +46,9 @@ class ARDMediathekBaseIE(InfoExtractor):
subtitles['de'] = [{ subtitles['de'] = [{
'ext': 'ttml', 'ext': 'ttml',
'url': subtitle_url, 'url': subtitle_url,
}, {
'ext': 'vtt',
'url': subtitle_url.replace('/ebutt/', '/webvtt/') + '.vtt',
}] }]
return { return {
@ -286,16 +289,16 @@ class ARDMediathekIE(ARDMediathekBaseIE):
class ARDIE(InfoExtractor): class ARDIE(InfoExtractor):
_VALID_URL = r'(?P<mainurl>https?://(?:www\.)?daserste\.de/(?:[^/?#&]+/)+(?P<id>[^/?#&]+))\.html' _VALID_URL = r'(?P<mainurl>https?://(?:www\.)?daserste\.de/(?:[^/?#&]+/)+(?P<id>[^/?#&]+))\.html'
_TESTS = [{ _TESTS = [{
# available till 7.01.2022 # available till 7.12.2023
'url': 'https://www.daserste.de/information/talk/maischberger/videos/maischberger-die-woche-video100.html', 'url': 'https://www.daserste.de/information/talk/maischberger/videos/maischberger-video-424.html',
'md5': '867d8aa39eeaf6d76407c5ad1bb0d4c1', 'md5': 'a438f671e87a7eba04000336a119ccc4',
'info_dict': { 'info_dict': {
'id': 'maischberger-die-woche-video100', 'id': 'maischberger-video-424',
'display_id': 'maischberger-die-woche-video100', 'display_id': 'maischberger-video-424',
'ext': 'mp4', 'ext': 'mp4',
'duration': 3687.0, 'duration': 4452.0,
'title': 'maischberger. die woche vom 7. Januar 2021', 'title': 'maischberger am 07.12.2022',
'upload_date': '20210107', 'upload_date': '20221207',
'thumbnail': r're:^https?://.*\.jpg$', 'thumbnail': r're:^https?://.*\.jpg$',
}, },
}, { }, {