1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-15 03:27:46 +01:00

[mtv,cc] Use hls by default (closes #11641)

This commit is contained in:
Sergey M․ 2017-01-10 22:30:47 +07:00
parent 20faad74b6
commit 67fc365b86
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
2 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ class ComedyCentralFullEpisodesIE(MTVServicesInfoExtractor):
feed = self._download_json(video_zone['feed'], playlist_id) feed = self._download_json(video_zone['feed'], playlist_id)
mgid = feed['result']['data']['id'] mgid = feed['result']['data']['id']
videos_info = self._get_videos_info(mgid, use_hls=True) videos_info = self._get_videos_info(mgid)
return videos_info return videos_info

View File

@ -123,7 +123,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
} for typographic in transcript.findall('./typographic')] } for typographic in transcript.findall('./typographic')]
return subtitles return subtitles
def _get_video_info(self, itemdoc, use_hls=False): def _get_video_info(self, itemdoc, use_hls=True):
uri = itemdoc.find('guid').text uri = itemdoc.find('guid').text
video_id = self._id_from_uri(uri) video_id = self._id_from_uri(uri)
self.report_extraction(video_id) self.report_extraction(video_id)
@ -193,13 +193,13 @@ class MTVServicesInfoExtractor(InfoExtractor):
data['lang'] = self._LANG data['lang'] = self._LANG
return data return data
def _get_videos_info(self, uri, use_hls=False): def _get_videos_info(self, uri, use_hls=True):
video_id = self._id_from_uri(uri) video_id = self._id_from_uri(uri)
feed_url = self._get_feed_url(uri) feed_url = self._get_feed_url(uri)
info_url = update_url_query(feed_url, self._get_feed_query(uri)) info_url = update_url_query(feed_url, self._get_feed_query(uri))
return self._get_videos_info_from_url(info_url, video_id, use_hls) return self._get_videos_info_from_url(info_url, video_id, use_hls)
def _get_videos_info_from_url(self, url, video_id, use_hls=False): def _get_videos_info_from_url(self, url, video_id, use_hls=True):
idoc = self._download_xml( idoc = self._download_xml(
url, video_id, url, video_id,
'Downloading info', transform_source=fix_xml_ampersands) 'Downloading info', transform_source=fix_xml_ampersands)