mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-03 23:43:21 -04:00
Improve extractor_args
parsing
This commit is contained in:
@@ -2207,11 +2207,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
|
||||
player_url = self._extract_player_url(ytcfg, webpage)
|
||||
|
||||
player_client = try_get(self._configuration_arg('player_client'), lambda x: x[0], str) or ''
|
||||
if player_client.upper() not in ('WEB', 'ANDROID'):
|
||||
player_client = 'WEB'
|
||||
force_mobile_client = player_client.upper() == 'ANDROID'
|
||||
player_skip = self._configuration_arg('player_skip') or []
|
||||
player_client = (self._configuration_arg('player_client') or [''])[0]
|
||||
if player_client not in ('web', 'android', ''):
|
||||
self.report_warning(f'Invalid player_client {player_client} given. Falling back to WEB')
|
||||
force_mobile_client = player_client == 'android'
|
||||
player_skip = self._configuration_arg('player_skip')
|
||||
|
||||
def get_text(x):
|
||||
if not x:
|
||||
@@ -2489,7 +2489,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
dct['container'] = dct['ext'] + '_dash'
|
||||
formats.append(dct)
|
||||
|
||||
skip_manifests = self._configuration_arg('skip') or []
|
||||
skip_manifests = self._configuration_arg('skip')
|
||||
get_dash = 'dash' not in skip_manifests and self.get_param('youtube_include_dash_manifest', True)
|
||||
get_hls = 'hls' not in skip_manifests and self.get_param('youtube_include_hls_manifest', True)
|
||||
|
||||
|
Reference in New Issue
Block a user