]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Fix issue downloading facebook videos
authorShai Coleman <shai.coleman@storyful.com>
Wed, 22 Jun 2016 11:52:15 +0000 (12:52 +0100)
committerShai Coleman <shai.coleman@storyful.com>
Wed, 22 Jun 2016 11:52:15 +0000 (12:52 +0100)
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

youtube_dl/extractor/facebook.py

index f5bbd39d2d0e90996c118e3fae325034fc2bbb6d..9b87b37ae54da724c360e85429de804f29413bc6 100644 (file)
@@ -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'):