mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-19 06:39:16 +00:00
Add YouTube client that can access 1080p non split streams
This commit is contained in:
parent
e5d4f11104
commit
ecab240771
|
@ -238,6 +238,16 @@
|
|||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 85
|
||||
},
|
||||
# This client has 1080p non split stream videos
|
||||
'media_connect_frontend': {
|
||||
'INNERTUBE_CONTEXT': {
|
||||
'client': {
|
||||
'clientName': 'MEDIA_CONNECT_FRONTEND',
|
||||
'clientVersion': '0.1',
|
||||
},
|
||||
},
|
||||
'INNERTUBE_CONTEXT_CLIENT_NAME': 95
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
@ -258,7 +268,7 @@ def build_innertube_clients():
|
|||
THIRD_PARTY = {
|
||||
'embedUrl': 'https://www.youtube.com/', # Can be any valid URL
|
||||
}
|
||||
BASE_CLIENTS = ('ios', 'android', 'web', 'tv', 'mweb')
|
||||
BASE_CLIENTS = ('ios', 'android', 'web', 'tv', 'mweb', 'media_connect_frontend')
|
||||
priority = qualities(BASE_CLIENTS[::-1])
|
||||
|
||||
for client, ytcfg in tuple(INNERTUBE_CLIENTS.items()):
|
||||
|
@ -3619,7 +3629,7 @@ def _extract_player_response(self, client, video_id, master_ytcfg, player_ytcfg,
|
|||
|
||||
def _get_requested_clients(self, url, smuggled_data):
|
||||
requested_clients = []
|
||||
default = ['ios', 'android', 'web']
|
||||
default = ['ios', 'android', 'web', 'media_connect_frontend']
|
||||
allowed_clients = sorted(
|
||||
(client for client in INNERTUBE_CLIENTS.keys() if client[:1] != '_'),
|
||||
key=lambda client: INNERTUBE_CLIENTS[client]['priority'], reverse=True)
|
||||
|
|
Loading…
Reference in a new issue