mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-01 12:05:26 +02:00
[canvas] Add subtitles test (#8537)
This commit is contained in:
parent
fd7a3ea4a4
commit
6eff2605d6
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class CanvasIE(InfoExtractor):
|
class CanvasIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?canvas\.be/video/(?:[^/]+/)*(?P<id>[^/?#&]+)'
|
_VALID_URL = r'https?://(?:www\.)?canvas\.be/video/(?:[^/]+/)*(?P<id>[^/?#&]+)'
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
'url': 'http://www.canvas.be/video/de-afspraak/najaar-2015/de-afspraak-veilt-voor-de-warmste-week',
|
'url': 'http://www.canvas.be/video/de-afspraak/najaar-2015/de-afspraak-veilt-voor-de-warmste-week',
|
||||||
'md5': 'ea838375a547ac787d4064d8c7860a6c',
|
'md5': 'ea838375a547ac787d4064d8c7860a6c',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -18,7 +18,27 @@ class CanvasIE(InfoExtractor):
|
|||||||
'thumbnail': 're:^https?://.*\.jpg$',
|
'thumbnail': 're:^https?://.*\.jpg$',
|
||||||
'duration': 49.02,
|
'duration': 49.02,
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
# with subtitles
|
||||||
|
'url': 'http://www.canvas.be/video/panorama/2016/pieter-0167',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'mz-ast-5240ff21-2d30-4101-bba6-92b5ec67c625',
|
||||||
|
'display_id': 'pieter-0167',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Pieter 0167',
|
||||||
|
'description': 'md5:943cd30f48a5d29ba02c3a104dc4ec4e',
|
||||||
|
'thumbnail': 're:^https?://.*\.jpg$',
|
||||||
|
'duration': 2553.08,
|
||||||
|
'subtitles': {
|
||||||
|
'nl': [{
|
||||||
|
'ext': 'vtt',
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
}
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
|
Loading…
Reference in New Issue
Block a user