0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-22 02:15:12 +00:00

[youtube:api] Prefer minified JSON response

Authored-by: coletdjnz
This commit is contained in:
coletdjnz 2022-03-16 09:28:22 +13:00
parent d71fd41249
commit 5dbc77df26
No known key found for this signature in database
GPG key ID: 91984263BB39894A

View file

@ -458,7 +458,7 @@ def _call_api(self, ep, query, video_id, fatal=True, headers=None,
'https://%s/youtubei/v1/%s' % (api_hostname or self._get_innertube_host(default_client), ep),
video_id=video_id, fatal=fatal, note=note, errnote=errnote,
data=json.dumps(data).encode('utf8'), headers=real_headers,
query={'key': api_key or self._extract_api_key()})
query={'key': api_key or self._extract_api_key(), 'prettyPrint': 'false'})
def extract_yt_initial_data(self, item_id, webpage, fatal=True):
data = self._search_regex(