Merge 76862a39da
into 7d740e7dc7
This commit is contained in:
commit
754e70f589
|
@ -302,14 +302,14 @@ class TVPlayIE(InfoExtractor):
|
|||
|
||||
# TODO: webvtt in m3u8
|
||||
subtitles = {}
|
||||
sami_path = video.get('sami_path')
|
||||
if sami_path:
|
||||
lang = self._search_regex(
|
||||
r'_([a-z]{2})\.xml', sami_path, 'lang',
|
||||
default=compat_urlparse.urlparse(url).netloc.rsplit('.', 1)[-1])
|
||||
subtitles[lang] = [{
|
||||
'url': sami_path,
|
||||
}]
|
||||
sub_paths = [video.get(key) for key in ['sami_path', 'subtitles_webvtt', 'subtitles_for_hearing_impaired']]
|
||||
default = compat_urlparse.urlparse(url).netloc.rsplit('.', 1)[-1]
|
||||
for path in sub_paths:
|
||||
if path:
|
||||
lang = self._search_regex(r'_([a-z]{2}(?:_sdh)?)\.(?:vtt|xml)', path, 'lang', default)
|
||||
subtitles[lang] = [{
|
||||
'url': path,
|
||||
}]
|
||||
|
||||
series = video.get('format_title')
|
||||
episode_number = int_or_none(video.get('format_position', {}).get('episode'))
|
||||
|
@ -360,6 +360,33 @@ class ViafreeIE(InfoExtractor):
|
|||
# with relatedClips
|
||||
'url': 'http://www.viafree.se/program/reality/sommaren-med-youtube-stjarnorna/sasong-1/avsnitt-1',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
# with subtitles
|
||||
'url': 'https://www.viafree.se/program/livsstil/varldens-basta-burgare/sasong-2/avsnitt-1',
|
||||
'info_dict': {
|
||||
'id': '828877',
|
||||
'ext': 'mp4',
|
||||
'title': 'Världens bästa burgare S02E01',
|
||||
'description': '',
|
||||
'series': 'Världens bästa burgare',
|
||||
'season': 'Säsong 2',
|
||||
'season_number': 2,
|
||||
'duration': 2580,
|
||||
'timestamp': 1491233172,
|
||||
'upload_date': '20170403',
|
||||
'subtitles': {
|
||||
'sv': [{
|
||||
'ext': 'vtt',
|
||||
}],
|
||||
'sv_sdh': [{
|
||||
'ext': 'vtt',
|
||||
}]
|
||||
},
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
},
|
||||
'add_ie': [TVPlayIE.ie_key()],
|
||||
}, {
|
||||
# Different og:image URL schema
|
||||
'url': 'http://www.viafree.se/program/reality/sommaren-med-youtube-stjarnorna/sasong-1/avsnitt-2',
|
||||
|
|
Loading…
Reference in New Issue