1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-16 06:25:13 +00:00

#86 [youtube_live_chat] Use POST API (Closes #82)

YouTube has removed support for the old GET based live chat API, and it's now returning 404

Authored by siikamiika
This commit is contained in:
siikamiika
2021-02-15 11:57:21 +02:00
committed by GitHub
parent 7620cd46c3
commit 273762c8d0
3 changed files with 45 additions and 38 deletions

View File

@@ -95,11 +95,12 @@ class FragmentFD(FileDownloader):
frag_index_stream.write(json.dumps({'downloader': downloader}))
frag_index_stream.close()
def _download_fragment(self, ctx, frag_url, info_dict, headers=None):
def _download_fragment(self, ctx, frag_url, info_dict, headers=None, request_data=None):
fragment_filename = '%s-Frag%d' % (ctx['tmpfilename'], ctx['fragment_index'])
fragment_info_dict = {
'url': frag_url,
'http_headers': headers or info_dict.get('http_headers'),
'request_data': request_data,
}
success = ctx['dl'].download(fragment_filename, fragment_info_dict)
if not success: