mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[extractor/crunchyroll:beta] Use streams API (#4555)
Closes #4452 Authored by: tejing1
This commit is contained in:
		@@ -1774,7 +1774,7 @@ The following extractors use this feature:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#### crunchyrollbeta
 | 
					#### crunchyrollbeta
 | 
				
			||||||
* `format`: Which stream type(s) to extract. Default is `adaptive_hls` Eg: `crunchyrollbeta:format=vo_adaptive_hls`
 | 
					* `format`: Which stream type(s) to extract. Default is `adaptive_hls` Eg: `crunchyrollbeta:format=vo_adaptive_hls`
 | 
				
			||||||
    * Potentially useful values include `adaptive_hls`, `adaptive_dash`, `vo_adaptive_hls`, `vo_adaptive_dash`, `download_hls`, `trailer_hls`, `trailer_dash`
 | 
					    * Potentially useful values include `adaptive_hls`, `adaptive_dash`, `vo_adaptive_hls`, `vo_adaptive_dash`, `download_hls`, `download_dash`, `multitrack_adaptive_hls_v2`
 | 
				
			||||||
* `hardsub`: Preference order for which hardsub versions to extract. Default is `None` (no hardsubs). Eg: `crunchyrollbeta:hardsub=en-US,None`
 | 
					* `hardsub`: Preference order for which hardsub versions to extract. Default is `None` (no hardsubs). Eg: `crunchyrollbeta:hardsub=en-US,None`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### vikichannel
 | 
					#### vikichannel
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -801,7 +801,9 @@ class CrunchyrollBetaIE(CrunchyrollBetaBaseIE):
 | 
				
			|||||||
        if episode_response.get('is_premium_only') and not episode_response.get('playback'):
 | 
					        if episode_response.get('is_premium_only') and not episode_response.get('playback'):
 | 
				
			||||||
            raise ExtractorError('This video is for premium members only.', expected=True)
 | 
					            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()
 | 
					        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'])]
 | 
					        requested_hardsubs = [('' if val == 'none' else val) for val in (self._configuration_arg('hardsub') or ['none'])]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user