mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 10:52:34 +00:00
Fix issue downloading facebook videos
youtube-dl expects the format items to be returned as a list, but when there's only one item Facebook returns a dict instead, this wraps the dict in a list if necessary
This commit is contained in:
parent
7cfc1e2a10
commit
ca74c90bf5
@ -239,6 +239,8 @@ def video_data_list2dict(video_data):
|
|||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for format_id, f in video_data.items():
|
for format_id, f in video_data.items():
|
||||||
|
if f and isinstance(f, dict):
|
||||||
|
f = [f]
|
||||||
if not f or not isinstance(f, list):
|
if not f or not isinstance(f, list):
|
||||||
continue
|
continue
|
||||||
for quality in ('sd', 'hd'):
|
for quality in ('sd', 'hd'):
|
||||||
|
Loading…
Reference in New Issue
Block a user