+From 4b71bc3cfef0672726beaaa26e1c57c7eca33790 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
+Date: Sat, 22 Oct 2011 01:12:46 -0200
+Subject: [PATCH] Fix downloading of videos from facebook.
+
+---
+ youtube-dl | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/youtube-dl
++++ b/youtube-dl
+@@ -2712,8 +2712,9 @@
+ _VALID_URL = r'^(?:https?://)?(?:\w+\.)?facebook\.com/video/video\.php\?(?:.*?)v=(?P<ID>\d+)(?:.*)'
+ _LOGIN_URL = 'https://login.facebook.com/login.php?m&next=http%3A%2F%2Fm.facebook.com%2Fhome.php&'
+ _NETRC_MACHINE = 'facebook'
+- _available_formats = ['highqual', 'lowqual']
++ _available_formats = ['video', 'highqual', 'lowqual']
+ _video_extensions = {
++ 'video': 'mp4',
+ 'highqual': 'mp4',
+ 'lowqual': 'mp4',
+ }
+@@ -2741,10 +2742,9 @@
+ def _parse_page(self, video_webpage):
+ """Extract video information from page"""
+ # General data
+- data = {'title': r'class="video_title datawrap">(.*?)</',
++ data = {'title': r'\("video_title", "(.*?)"\)',
+ 'description': r'<div class="datawrap">(.*?)</div>',
+ 'owner': r'\("video_owner_name", "(.*?)"\)',
+- 'upload_date': r'data-date="(.*?)"',
+ 'thumbnail': r'\("thumb_url", "(?P<THUMB>.*?)"\)',
+ }
+ video_info = {}