1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-03 04:42:52 +08:00

[francetv] Also fetch the hmac token for m3u8 URLs

they seem to be required now, else we get 403 errors.
This commit is contained in:
François Revol 2018-02-09 16:09:08 +01:00
parent 5828489072
commit fc6fd5b3a5

View File

@ -64,8 +64,12 @@ class FranceTVBaseInfoExtractor(InfoExtractor):
f4m_url + '&hdcore=3.7.0&plugin=aasp-3.7.0.39.44', f4m_url + '&hdcore=3.7.0&plugin=aasp-3.7.0.39.44',
video_id, f4m_id=format_id, fatal=False)) video_id, f4m_id=format_id, fatal=False))
elif ext == 'm3u8': elif ext == 'm3u8':
m3u8_url = self._download_webpage(
'http://hdfauth.francetv.fr/esi/TA?url=%s' % video_url,
video_id, 'Downloading m3u8 token', fatal=False)
if m3u8_url:
formats.extend(self._extract_m3u8_formats( formats.extend(self._extract_m3u8_formats(
video_url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',
m3u8_id=format_id, fatal=False)) m3u8_id=format_id, fatal=False))
elif video_url.startswith('rtmp'): elif video_url.startswith('rtmp'):
formats.append({ formats.append({