mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 03:41:00 +01:00
[facebook] Bypass download rate limits (closes #21018)
This commit is contained in:
parent
824fa51165
commit
2297c0d7d9
|
@ -405,6 +405,11 @@ def extract_from_jsmods_instances(js_data):
|
|||
if not formats:
|
||||
raise ExtractorError('Cannot find video formats')
|
||||
|
||||
# Downloads with browser's User-Agent are rate limited. Working around
|
||||
# with non-browser User-Agent.
|
||||
for f in formats:
|
||||
f.setdefault('http_headers', {})['User-Agent'] = 'facebookexternalhit/1.1'
|
||||
|
||||
self._sort_formats(formats)
|
||||
|
||||
video_title = self._html_search_regex(
|
||||
|
|
Loading…
Reference in New Issue
Block a user