A feature-rich command-line audio/video downloader
[youtube] Add `default` player client (#1685)
coletdjnzd0d012d4e79c
diff --git a/README.md b/README.mdindex 1612bda5ae..96f5d7ecb2 100644--- a/README.md+++ b/README.md@@ -1552,7 +1552,7 @@ The following extractors use this feature:#### youtube* `skip`: `hls` or `dash` (or both) to skip download of the respective manifests-* `player_client`: Clients to extract video data from. The main clients are `web`, `android`, `ios`, `mweb`. These also have `_music`, `_embedded`, `_agegate`, and `_creator` variants (Eg: `web_embedded`) (`mweb` has only `_agegate`). By default, `android,web` is used, but the agegate and creator variants are added as required for age-gated videos. Similarly the music variants are added for `music.youtube.com` urls. You can also use `all` to use all the clients+* `player_client`: Clients to extract video data from. The main clients are `web`, `android`, `ios`, `mweb`. These also have `_music`, `_embedded`, `_agegate`, and `_creator` variants (Eg: `web_embedded`) (`mweb` has only `_agegate`). By default, `android,web` is used, but the agegate and creator variants are added as required for age-gated videos. Similarly the music variants are added for `music.youtube.com` urls. You can also use `all` to use all the clients, and `default` for the default clients.* `player_skip`: Skip some network requests that are generally needed for robust extraction. One or more of `configs` (skip client configs), `webpage` (skip initial webpage), `js` (skip js player). While these options can help reduce the number of requests needed or avoid some rate-limiting, they could cause some issues. See [#860](https://github.com/yt-dlp/yt-dlp/pull/860) for more details* `include_live_dash`: Include live dash formats (These formats don't download properly)* `comment_sort`: `top` or `new` (default) - choose comment sorting mode (on YouTube's side)diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.pyindex 3ae0f5a270..203f4a92ad 100644--- a/yt_dlp/extractor/youtube.py+++ b/yt_dlp/extractor/youtube.py@@ -2339,18 +2339,21 @@ class YoutubeIE(YoutubeBaseInfoExtractor):def _get_requested_clients(self, url, smuggled_data):requested_clients = []+ default = ['android', 'web']allowed_clients = sorted([client for client in INNERTUBE_CLIENTS.keys() if client[:1] != '_'],key=lambda client: INNERTUBE_CLIENTS[client]['priority'], reverse=True)for client in self._configuration_arg('player_client'):if client in allowed_clients:requested_clients.append(client)+ elif client == 'default':+ requested_clients.extend(default)elif client == 'all':requested_clients.extend(allowed_clients)else:self.report_warning(f'Skipping unsupported client {client}')if not requested_clients:- requested_clients = ['android', 'web']+ requested_clients = defaultif smuggled_data.get('is_music_url') or self.is_music_url(url):requested_clients.extend(