[facebook] Fix login (Fixes #3667)
authorPhilipp Hagemeister <phihag@phihag.de>
Wed, 3 Sep 2014 07:49:05 +0000 (09:49 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Wed, 3 Sep 2014 07:50:10 +0000 (09:50 +0200)
youtube_dl/extractor/facebook.py

index 574a8639021698d8b47fcb14b11d65c3a8818414..afb34ce511f1bf2f526a03acc9083df2eba2a77c 100644 (file)
@@ -79,7 +79,8 @@ class FacebookIE(InfoExtractor):
 
             check_form = {
                 'fb_dtsg': self._search_regex(r'name="fb_dtsg" value="(.+?)"', login_results, 'fb_dtsg'),
-                'h': self._search_regex(r'name="h" value="(\w*?)"', login_results, 'h'),
+                'h': self._search_regex(
+                    r'name="h"\s+(?:\w+="[^"]+"\s+)*?value="([^"]+)"', login_results, 'h'),
                 'name_action_selected': 'dont_save',
             }
             check_req = compat_urllib_request.Request(self._CHECKPOINT_URL, urlencode_postdata(check_form))