[WatchESPN] Support free videos and BAM_DTC (#4118)
Authored by: ischmidt20
This commit is contained in:
parent
8072ef2bbd
commit
0a4fb0d3fe
1 changed files with 8 additions and 1 deletions
|
@ -322,7 +322,7 @@ class WatchESPNIE(AdobePassIE):
|
||||||
video_id)['playbackState']
|
video_id)['playbackState']
|
||||||
|
|
||||||
# ESPN+ subscription required, through cookies
|
# ESPN+ subscription required, through cookies
|
||||||
if video_data.get('sourceId') == 'ESPN_DTC':
|
if 'DTC' in video_data.get('sourceId'):
|
||||||
cookie = self._get_cookies(url).get('ESPN-ONESITE.WEB-PROD.token')
|
cookie = self._get_cookies(url).get('ESPN-ONESITE.WEB-PROD.token')
|
||||||
if not cookie:
|
if not cookie:
|
||||||
self.raise_login_required(method='cookies')
|
self.raise_login_required(method='cookies')
|
||||||
|
@ -366,6 +366,13 @@ class WatchESPNIE(AdobePassIE):
|
||||||
})
|
})
|
||||||
m3u8_url, headers = playback['stream']['complete'][0]['url'], {'authorization': token}
|
m3u8_url, headers = playback['stream']['complete'][0]['url'], {'authorization': token}
|
||||||
|
|
||||||
|
# No login required
|
||||||
|
elif video_data.get('sourceId') == 'ESPN_FREE':
|
||||||
|
asset = self._download_json(
|
||||||
|
f'https://watch.auth.api.espn.com/video/auth/media/{video_id}/asset?apikey=uiqlbgzdwuru14v627vdusswb',
|
||||||
|
video_id)
|
||||||
|
m3u8_url, headers = asset['stream'], {}
|
||||||
|
|
||||||
# TV Provider required
|
# TV Provider required
|
||||||
else:
|
else:
|
||||||
resource = self._get_mvpd_resource('ESPN', video_data['name'], video_id, None)
|
resource = self._get_mvpd_resource('ESPN', video_data['name'], video_id, None)
|
||||||
|
|
Loading…
Reference in a new issue