diff options
Diffstat (limited to 'yt_dlp/extractor/youtube.py')
-rw-r--r-- | yt_dlp/extractor/youtube.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 1233cc399..de70fcdd3 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -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) |