Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook IE broke again #375

Closed
csabahenk opened this issue Jul 9, 2012 · 3 comments
Closed

Facebook IE broke again #375

csabahenk opened this issue Jul 9, 2012 · 3 comments
Assignees
Labels

Comments

@csabahenk
Copy link

@csabahenk csabahenk commented Jul 9, 2012

The issue reported in #198 occurs again.

$ youtube-dl https://www.facebook.com/video/video.php?v=207446242657384
[facebook] 207446242657384: Downloading video webpage
[facebook] 207446242657384: Extracting video information
ERROR: unable to extract uploader nickname

Can be seen with d4e16d3.

@cellux
Copy link

@cellux cellux commented Oct 2, 2012

With the following patch, I managed to download the video I wanted from FB:

diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index 8d428b2..61f81c3 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1843,10 +1843,10 @@ class FacebookIE(InfoExtractor):
        def _parse_page(self, video_webpage):
                """Extract video information from page"""
                # General data
-               data = {'title': r'\("video_title", "(.*?)"\)',
-                       'description': r'<div class="datawrap">(.*?)</div>',
-                       'owner': r'\("video_owner_name", "(.*?)"\)',
-                       'thumbnail':  r'\("thumb_url", "(?P<THUMB>.*?)"\)',
+               data = {'title': r'\["video_title",\s*"(.*?)"\]',
+                       'description': r'\["video_title",\s*"(.*?)"\]',
+                       'owner': r'\["video_owner_name",\s*"(.*?)"\]',
+                       'thumbnail':  r'\["thumb_url",\s*"(?P<THUMB>.*?)"\]',
                        }
                video_info = {}
                for piece in data.keys():
@@ -1857,7 +1857,7 @@ class FacebookIE(InfoExtractor):
                # Video urls
                video_urls = {}
                for fmt in self._available_formats:
-                       mobj = re.search(r'\("%s_src\", "(.+?)"\)' % fmt, video_webpage)
+                       mobj = re.search(r'\["%s_src\",\s*"(.+?)"\]' % fmt, video_webpage)
                        if mobj is not None:
                                # URL is in a Javascript segment inside an escaped Unicode format within
                                # the generally utf-8 page

Don't forget to make youtube-dl after applying the patch.

@ghost ghost assigned phihag Jan 25, 2013
@phihag
Copy link
Contributor

@phihag phihag commented Jan 25, 2013

I'll have a look at it. Another demo URL: https://www.facebook.com/photo.php?v=120708114770723

@phihag phihag closed this in b954070 Jan 25, 2013
@phihag
Copy link
Contributor

@phihag phihag commented Jan 25, 2013

Should be fixed now. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.