mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-06 13:07:07 +01:00
[ie/roosterteeth] Extract ad-free streams (#9355)
Closes #7647 Authored by: jkmartindale
This commit is contained in:
parent
96f3924bac
commit
dd29e6e5fd
@ -91,6 +91,15 @@ class RoosterTeethIE(RoosterTeethBaseIE):
|
||||
'thumbnail': r're:^https?://.*\.png$',
|
||||
'series': 'Million Dollars, But...',
|
||||
'episode': 'Million Dollars, But... The Game Announcement',
|
||||
'tags': ['Game Show', 'Sketch'],
|
||||
'season_number': 2,
|
||||
'availability': 'public',
|
||||
'episode_number': 10,
|
||||
'episode_id': '00374575-464e-11e7-a302-065410f210c4',
|
||||
'season': 'Season 2',
|
||||
'season_id': 'ffa27d48-464d-11e7-a302-065410f210c4',
|
||||
'channel_id': '92b6bb21-91d2-4b1b-bf95-3268fa0d9939',
|
||||
'duration': 145,
|
||||
},
|
||||
'params': {'skip_download': True},
|
||||
}, {
|
||||
@ -104,6 +113,15 @@ class RoosterTeethIE(RoosterTeethBaseIE):
|
||||
'channel_id': '92f780eb-ebfe-4bf5-a3b5-c6ad5460a5f1',
|
||||
'thumbnail': r're:^https?://.*\.(png|jpe?g)$',
|
||||
'ext': 'mp4',
|
||||
'availability': 'public',
|
||||
'episode_id': 'f8117b13-f068-499e-803e-eec9ea2dec8c',
|
||||
'episode_number': 3,
|
||||
'tags': ['Animation'],
|
||||
'season_id': '4b8f0a9e-12c4-41ed-8caa-fed15a85bab8',
|
||||
'season': 'Season 1',
|
||||
'series': 'RWBY: World of Remnant',
|
||||
'season_number': 1,
|
||||
'duration': 216,
|
||||
},
|
||||
'params': {'skip_download': True},
|
||||
}, {
|
||||
@ -133,10 +151,10 @@ def _real_extract(self, url):
|
||||
|
||||
try:
|
||||
video_data = self._download_json(
|
||||
api_episode_url + '/videos', display_id,
|
||||
'Downloading video JSON metadata')['data'][0]
|
||||
api_episode_url + '/videos', display_id, 'Downloading video JSON metadata',
|
||||
headers={'Client-Type': 'web'})['data'][0] # web client-type yields ad-free streams
|
||||
m3u8_url = video_data['attributes']['url']
|
||||
# XXX: additional URL at video_data['links']['download']
|
||||
# XXX: additional ad-free URL at video_data['links']['download'] but often gives 403 errors
|
||||
except ExtractorError as e:
|
||||
if isinstance(e.cause, HTTPError) and e.cause.status == 403:
|
||||
if self._parse_json(e.cause.response.read().decode(), display_id).get('access') is False:
|
||||
|
Loading…
Reference in New Issue
Block a user