mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-31 02:23:06 +08:00
[srf] Show display_id when present
This commit is contained in:
parent
5141249c59
commit
65c1a750f5
@ -45,12 +45,12 @@ class SrfIE(InfoExtractor):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
display_id = re.match(self._VALID_URL, url).group('display_id') or video_id
|
||||||
|
|
||||||
video_data = self._download_xml(
|
video_data = self._download_xml(
|
||||||
'http://il.srgssr.ch/integrationlayer/1.0/ue/srf/video/play/%s.xml' % video_id,
|
'http://il.srgssr.ch/integrationlayer/1.0/ue/srf/video/play/%s.xml' % video_id,
|
||||||
video_id)
|
display_id)
|
||||||
|
|
||||||
display_id = re.match(self._VALID_URL, url).group('display_id')
|
|
||||||
title = xpath_text(
|
title = xpath_text(
|
||||||
video_data, './AssetMetadatas/AssetMetadata/title', fatal=True)
|
video_data, './AssetMetadatas/AssetMetadata/title', fatal=True)
|
||||||
thumbnails = [{
|
thumbnails = [{
|
||||||
@ -68,10 +68,10 @@ class SrfIE(InfoExtractor):
|
|||||||
format_id = '%s-%s' % (quality, item.attrib['protocol'])
|
format_id = '%s-%s' % (quality, item.attrib['protocol'])
|
||||||
if original_ext == 'f4m':
|
if original_ext == 'f4m':
|
||||||
formats.extend(self._extract_f4m_formats(
|
formats.extend(self._extract_f4m_formats(
|
||||||
full_url + '?hdcore=3.4.0', video_id, f4m_id=format_id))
|
full_url + '?hdcore=3.4.0', display_id, f4m_id=format_id))
|
||||||
elif original_ext == 'm3u8':
|
elif original_ext == 'm3u8':
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
full_url, video_id, 'mp4', m3u8_id=format_id))
|
full_url, display_id, 'mp4', m3u8_id=format_id))
|
||||||
else:
|
else:
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': full_url,
|
'url': full_url,
|
||||||
|
Loading…
Reference in New Issue
Block a user