aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-02-01 17:56:22 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-02-01 17:56:22 +0100
commitedba5137b8e08bdf143a0dd4c43f90f0cc54ec4c (patch)
tree5d98af6ea60a6dd14c0ac5845d0005db845d3f73 /youtube_dl
parent233a22960af8043515b17780b5bd69566dc90b36 (diff)
Fix Facebook IE
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/InfoExtractors.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index 0860937ee..8d8c591f7 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -2050,8 +2050,10 @@ class FacebookIE(InfoExtractor):
if not m:
raise ExtractorError(u'Cannot parse data')
data = dict(json.loads(m.group(1)))
- video_url = compat_urllib_parse.unquote(data['hd_src'])
- video_duration = int(data['video_duration'])
+ params_raw = compat_urllib_parse.unquote(data['params'])
+ params = json.loads(params_raw)
+ video_url = params['hd_src']
+ video_duration = int(params['video_duration'])
m = re.search('<h2 class="uiHeaderTitle">([^<]+)</h2>', webpage)
if not m:
@@ -2064,7 +2066,7 @@ class FacebookIE(InfoExtractor):
'url': video_url,
'ext': 'mp4',
'duration': video_duration,
- 'thumbnail': data['thumbnail_src'],
+ 'thumbnail': params['thumbnail_src'],
}
return [info]