From 0067bbe7a7c7211b3addf120f48ddda611da127e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= Date: Thu, 20 Oct 2011 20:26:42 -0200 Subject: [PATCH 1/3] FacebookIE: Not all videos are available in all formats. --- youtube-dl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube-dl b/youtube-dl index 3a37fae2e..4449e7301 100755 --- a/youtube-dl +++ b/youtube-dl @@ -2712,8 +2712,9 @@ class FacebookIE(InfoExtractor): _VALID_URL = r'^(?:https?://)?(?:\w+\.)?facebook\.com/video/video\.php\?(?:.*?)v=(?P\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', } From 99e207bab0f6e3c2e70fc5e4ba2154ca536de0eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= Date: Thu, 20 Oct 2011 20:27:48 -0200 Subject: [PATCH 2/3] FacebookIE: Fix extraction of title as Facebook has changed stuff. --- youtube-dl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube-dl b/youtube-dl index 4449e7301..579a33d0c 100755 --- a/youtube-dl +++ b/youtube-dl @@ -2742,7 +2742,7 @@ class FacebookIE(InfoExtractor): def _parse_page(self, video_webpage): """Extract video information from page""" # General data - data = {'title': r'class="video_title datawrap">(.*?)(.*?)', 'owner': r'\("video_owner_name", "(.*?)"\)', 'upload_date': r'data-date="(.*?)"', From 053419cd245e4af1330bf970a0b919c71cdb3a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= Date: Thu, 20 Oct 2011 20:28:29 -0200 Subject: [PATCH 3/3] FacebookIE: The date doesn't seem to be available anymore. The current regular expression is likely to match a lot of stuff, as each comment that a video has has one of those and it is not clear which one is the date of the video *upload* itself. --- youtube-dl | 1 - 1 file changed, 1 deletion(-) diff --git a/youtube-dl b/youtube-dl index 579a33d0c..4c931b401 100755 --- a/youtube-dl +++ b/youtube-dl @@ -2745,7 +2745,6 @@ class FacebookIE(InfoExtractor): data = {'title': r'\("video_title", "(.*?)"\)', 'description': r'
(.*?)
', 'owner': r'\("video_owner_name", "(.*?)"\)', - 'upload_date': r'data-date="(.*?)"', 'thumbnail': r'\("thumb_url", "(?P.*?)"\)', } video_info = {}