aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/crunchyroll.py
diff options
context:
space:
mode:
authorJeff Huffman <tejing@tejing.com>2022-08-04 14:05:58 -0400
committerGitHub <noreply@github.com>2022-08-04 23:35:58 +0530
commitf62f553d46856aff2e36a0d561ec78a1d28d5b68 (patch)
tree8f38654c30791af98e492b43225eb6193a9864c1 /yt_dlp/extractor/crunchyroll.py
parent989a01c2610832193c268d072ada8814bfd4c00d (diff)
downloadhypervideo-pre-f62f553d46856aff2e36a0d561ec78a1d28d5b68.tar.lz
hypervideo-pre-f62f553d46856aff2e36a0d561ec78a1d28d5b68.tar.xz
hypervideo-pre-f62f553d46856aff2e36a0d561ec78a1d28d5b68.zip
[extractor/crunchyroll:beta] Use streams API (#4555)
Closes #4452 Authored by: tejing1
Diffstat (limited to 'yt_dlp/extractor/crunchyroll.py')
-rw-r--r--yt_dlp/extractor/crunchyroll.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/extractor/crunchyroll.py b/yt_dlp/extractor/crunchyroll.py
index bacdb8515..fccf05480 100644
--- a/yt_dlp/extractor/crunchyroll.py
+++ b/yt_dlp/extractor/crunchyroll.py
@@ -801,7 +801,9 @@ class CrunchyrollBetaIE(CrunchyrollBetaBaseIE):
if episode_response.get('is_premium_only') and not episode_response.get('playback'):
raise ExtractorError('This video is for premium members only.', expected=True)
- stream_response = self._download_json(episode_response['playback'], display_id, note='Retrieving stream info')
+ stream_response = self._download_json(
+ f'{api_domain}{episode_response["__links__"]["streams"]["href"]}', display_id,
+ note='Retrieving stream info', query=params)
get_streams = lambda name: (traverse_obj(stream_response, name) or {}).items()
requested_hardsubs = [('' if val == 'none' else val) for val in (self._configuration_arg('hardsub') or ['none'])]