aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-12-29 14:58:22 +0100
committerremitamine <remitamine@gmail.com>2015-12-29 14:58:59 +0100
commitf2017cb020efe0956049bda11df4eec7c5985fda (patch)
tree1376b14cc066b4852ba808cdcbefb56efb0faf85
parentf889ac45b83cd771919fba29c14cee9d24e637b7 (diff)
[srgssr] split long lines and use m3u8_native
-rw-r--r--youtube_dl/extractor/rts.py2
-rw-r--r--youtube_dl/extractor/srgssr.py11
2 files changed, 9 insertions, 4 deletions
diff --git a/youtube_dl/extractor/rts.py b/youtube_dl/extractor/rts.py
index f063ab5dd..3cc32847b 100644
--- a/youtube_dl/extractor/rts.py
+++ b/youtube_dl/extractor/rts.py
@@ -197,7 +197,7 @@ class RTSIE(SRGSSRIE):
media_id, f4m_id=format_id, fatal=False))
elif format_url.endswith('.m3u8'):
formats.extend(self._extract_m3u8_formats(
- format_url, media_id, 'mp4', m3u8_id=format_id, fatal=False))
+ format_url, media_id, 'mp4', 'm3u8_native', m3u8_id=format_id, fatal=False))
else:
formats.append({
'format_id': format_id,
diff --git a/youtube_dl/extractor/srgssr.py b/youtube_dl/extractor/srgssr.py
index 2c8b4276b..d06d34316 100644
--- a/youtube_dl/extractor/srgssr.py
+++ b/youtube_dl/extractor/srgssr.py
@@ -29,7 +29,8 @@ class SRGSSRIE(InfoExtractor):
media_id)[media_type.capitalize()]
if media_data.get('block') and media_data['block'] in self._ERRORS:
- raise ExtractorError('%s said: %s' % (self.IE_NAME, self._ERRORS[media_data['block']]), expected=True)
+ raise ExtractorError('%s said: %s' % (
+ self.IE_NAME, self._ERRORS[media_data['block']]), expected=True)
return media_data
@@ -62,9 +63,13 @@ class SRGSSRIE(InfoExtractor):
assets[quality['@quality']] = quality['text']
asset_url = assets.get('HD') or assets.get('HQ') or assets.get('SD') or assets.get('MQ') or assets.get('LQ')
if '.f4m' in asset_url:
- formats.extend(self._extract_f4m_formats(asset_url + '?hdcore=3.4.0', media_id, f4m_id='hds', fatal=False))
+ formats.extend(self._extract_f4m_formats(
+ asset_url + '?hdcore=3.4.0', media_id,
+ f4m_id='hds', fatal=False))
elif '.m3u8' in asset_url:
- formats.extend(self._extract_m3u8_formats(asset_url, media_id, m3u8_id='hls', fatal=False))
+ formats.extend(self._extract_m3u8_formats(
+ asset_url, media_id, 'mp4', 'm3u8_native',
+ m3u8_id='hls', fatal=False))
else:
for asset in source['url']:
asset_url = asset['text']