From: Shai Coleman Date: Wed, 22 Jun 2016 11:52:15 +0000 (+0100) Subject: Fix issue downloading facebook videos X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=ca74c90bf55cfb16f5eadc3a63e9389202ee80f5;p=youtube-dl.git 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 --- 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'):