diff options
author | Shai Coleman <shai.coleman@storyful.com> | 2016-06-22 12:52:15 +0100 |
---|---|---|
committer | Shai Coleman <shai.coleman@storyful.com> | 2016-06-22 12:52:15 +0100 |
commit | ca74c90bf55cfb16f5eadc3a63e9389202ee80f5 (patch) | |
tree | 1130f8bd0a3afbf33609e3deb36ca41f09721ca3 /youtube_dl/extractor | |
parent | 7cfc1e2a104977c41f6008885b36b96bcb2b146e (diff) | |
download | youtube-dl-ca74c90bf55cfb16f5eadc3a63e9389202ee80f5.tar.xz |
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
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/facebook.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index f5bbd39d2..9b87b37ae 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -239,6 +239,8 @@ class FacebookIE(InfoExtractor): formats = [] for format_id, f in video_data.items(): + if f and isinstance(f, dict): + f = [f] if not f or not isinstance(f, list): continue for quality in ('sd', 'hd'): |