mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-12 20:23:11 +00:00
[ie/facebook] Set format HTTP chunk size (#9058)
Closes #8197 Authored by: bashonly, kclauhk
This commit is contained in:
parent
9526b1f179
commit
5b68c478fb
@ -564,7 +564,11 @@ class FacebookIE(InfoExtractor):
|
|||||||
# Downloads with browser's User-Agent are rate limited. Working around
|
# Downloads with browser's User-Agent are rate limited. Working around
|
||||||
# with non-browser User-Agent.
|
# with non-browser User-Agent.
|
||||||
for f in info['formats']:
|
for f in info['formats']:
|
||||||
|
# Downloads with browser's User-Agent are rate limited. Working around
|
||||||
|
# with non-browser User-Agent.
|
||||||
f.setdefault('http_headers', {})['User-Agent'] = 'facebookexternalhit/1.1'
|
f.setdefault('http_headers', {})['User-Agent'] = 'facebookexternalhit/1.1'
|
||||||
|
# Formats larger than ~500MB will return error 403 unless chunk size is regulated
|
||||||
|
f.setdefault('downloader_options', {})['http_chunk_size'] = 250 << 20
|
||||||
|
|
||||||
def extract_relay_data(_filter):
|
def extract_relay_data(_filter):
|
||||||
return self._parse_json(self._search_regex(
|
return self._parse_json(self._search_regex(
|
||||||
|
Loading…
Reference in New Issue
Block a user