diff options
author | coletdjnz <colethedj@protonmail.com> | 2021-11-16 14:22:01 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 01:22:01 +0000 |
commit | d0d012d4e79cd1420e96ce5c3d509771110d3ea1 (patch) | |
tree | 5f5e4ad8e6d43be7a57c67758109d887f25a86f2 /yt_dlp | |
parent | 013b50b7949563e445936302d6e486bab7100018 (diff) | |
download | hypervideo-pre-d0d012d4e79cd1420e96ce5c3d509771110d3ea1.tar.lz hypervideo-pre-d0d012d4e79cd1420e96ce5c3d509771110d3ea1.tar.xz hypervideo-pre-d0d012d4e79cd1420e96ce5c3d509771110d3ea1.zip |
[youtube] Add `default` player client (#1685)
Authored-by: coletdjnz
Diffstat (limited to 'yt_dlp')
-rw-r--r-- | yt_dlp/extractor/youtube.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 3ae0f5a27..203f4a92a 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 = default if smuggled_data.get('is_music_url') or self.is_music_url(url): requested_clients.extend( |