From: Philipp Hagemeister Date: Mon, 18 Feb 2013 22:12:48 +0000 (+0100) Subject: facebook: also download lq videos X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=7796e8c2cb2827ba7f7ef5e0c1dd0c299281026d;p=youtube-dl facebook: also download lq videos --- diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index d7ddf4e37..36f025078 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -2098,6 +2098,10 @@ class FacebookIE(InfoExtractor): params_raw = compat_urllib_parse.unquote(data['params']) params = json.loads(params_raw) video_url = params['hd_src'] + if not video_url: + video_url = params['sd_src'] + if not video_url: + raise ExtractorError(u'Cannot find video URL') video_duration = int(params['video_duration']) m = re.search('

([^<]+)

', webpage)