[facebook] Fix login detection (#2505)
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 4 Mar 2014 02:39:04 +0000 (03:39 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 4 Mar 2014 02:39:04 +0000 (03:39 +0100)
youtube_dl/extractor/facebook.py

index 1f58d2e624044340356f13f5cc50ff15211597ee..8147800d2548efa76bf114768b867be9de6b2489 100644 (file)
@@ -54,7 +54,9 @@ class FacebookIE(InfoExtractor):
         self.report_login()
         login_page = self._download_webpage(login_page_req, None, note=False,
             errnote='Unable to download login page')
-        lsd = self._search_regex(r'"lsd":"(\w*?)"', login_page, 'lsd')
+        lsd = self._search_regex(
+            r'<input type="hidden" name="lsd" value="([^""]*)"',
+            login_page, 'lsd')
         lgnrnd = self._search_regex(r'name="lgnrnd" value="([^"]*?)"', login_page, 'lgnrnd')
 
         login_form = {