From 3c6ba354c201e17fd03979cf50a368d4b6e52ec9 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 11 Jan 2020 17:39:34 +0100 Subject: [PATCH 1/5] [roosterteeth] Changed API endpoint New endpoint allows to request metadata for bonus episodes Fixes #23590 --- youtube_dl/extractor/roosterteeth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.py index 8883639b2..aa473363d 100644 --- a/youtube_dl/extractor/roosterteeth.py +++ b/youtube_dl/extractor/roosterteeth.py @@ -50,7 +50,7 @@ class RoosterTeethIE(InfoExtractor): 'url': 'https://roosterteeth.com/watch/million-dollars-but-season-2-million-dollars-but-the-game-announcement', 'only_matching': True, }] - _EPISODE_BASE_URL = 'https://svod-be.roosterteeth.com/api/v1/episodes/' + _EPISODE_BASE_URL = 'https://svod-be.roosterteeth.com/api/v1/watch/' def _login(self): username, password = self._get_login_info() From 3dd445217ba8072973dddf6ee11bfa02d8c054be Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 11 Jan 2020 17:42:12 +0100 Subject: [PATCH 2/5] [roosterteeth] Allow bonus_feature_image as thumbnails Certain bonus episodes do not have their thumbnail taged with "episode_image", but as "bonus_feature_image". --- youtube_dl/extractor/roosterteeth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.py index aa473363d..e434e1fab 100644 --- a/youtube_dl/extractor/roosterteeth.py +++ b/youtube_dl/extractor/roosterteeth.py @@ -109,7 +109,7 @@ class RoosterTeethIE(InfoExtractor): thumbnails = [] for image in episode.get('included', {}).get('images', []): - if image.get('type') == 'episode_image': + if image.get('type') in {'episode_image', 'bonus_feature_image'}: img_attributes = image.get('attributes') or {} for k in ('thumb', 'small', 'medium', 'large'): img_url = img_attributes.get(k) From 319395a7ddda830d537c613c9ab0ab3da72c5b72 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 11 Jan 2020 17:44:18 +0100 Subject: [PATCH 3/5] [roosterteeth] Added test case for ability to download bonus episodes --- youtube_dl/extractor/roosterteeth.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.py index e434e1fab..5955e1543 100644 --- a/youtube_dl/extractor/roosterteeth.py +++ b/youtube_dl/extractor/roosterteeth.py @@ -30,6 +30,19 @@ class RoosterTeethIE(InfoExtractor): 'series': 'Million Dollars, But...', 'episode': 'Million Dollars, But... The Game Announcement', }, + }, { + 'url': 'https://roosterteeth.com/watch/rwby-bonus-25', + 'md5': 'fe8d9d976b272c18a24fe7f1f5830084', + 'info_dict': { + 'id': '31', + 'display_id': 'rwby-bonus-25', + 'title': 'Volume 2, World of Remnant 3', + 'description': 'md5:8d58d3270292ea11da00ea712bbfb009', + 'episode': 'Volume 2, World of Remnant 3', + 'channel_id': '92b6bb21-91d2-4b1b-bf95-3268fa0d9939', + 'thumbnail': r're:^https?://.*\.(png|jpe?g)$', + 'ext': 'mp4', + }, }, { 'url': 'http://achievementhunter.roosterteeth.com/episode/off-topic-the-achievement-hunter-podcast-2016-i-didn-t-think-it-would-pass-31', 'only_matching': True, From 443891704884661a8894c553863abe58efbf4877 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 17 May 2020 01:15:57 +0200 Subject: [PATCH 4/5] [roosterteeth] rwby-bonus-25 Test: Fixed invalid channel_id --- youtube_dl/extractor/roosterteeth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.py index 5955e1543..a735006eb 100644 --- a/youtube_dl/extractor/roosterteeth.py +++ b/youtube_dl/extractor/roosterteeth.py @@ -39,7 +39,7 @@ class RoosterTeethIE(InfoExtractor): 'title': 'Volume 2, World of Remnant 3', 'description': 'md5:8d58d3270292ea11da00ea712bbfb009', 'episode': 'Volume 2, World of Remnant 3', - 'channel_id': '92b6bb21-91d2-4b1b-bf95-3268fa0d9939', + 'channel_id': 'fab60c1c-29cb-43bc-9383-5c3538d9e246', 'thumbnail': r're:^https?://.*\.(png|jpe?g)$', 'ext': 'mp4', }, From 03ccfc49834b215fed2bb73423d24ea584f1503c Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sun, 17 May 2020 13:46:53 +0200 Subject: [PATCH 5/5] [roosterteeth] Fixed syntax "if in" for Python 2.6.9 --- youtube_dl/extractor/roosterteeth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/roosterteeth.py b/youtube_dl/extractor/roosterteeth.py index a735006eb..993a5c0e4 100644 --- a/youtube_dl/extractor/roosterteeth.py +++ b/youtube_dl/extractor/roosterteeth.py @@ -122,7 +122,7 @@ class RoosterTeethIE(InfoExtractor): thumbnails = [] for image in episode.get('included', {}).get('images', []): - if image.get('type') in {'episode_image', 'bonus_feature_image'}: + if image.get('type') in ('episode_image', 'bonus_feature_image'): img_attributes = image.get('attributes') or {} for k in ('thumb', 'small', 'medium', 'large'): img_url = img_attributes.get(k)