diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index a85005caa..8aaf2a9a5 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -362,6 +362,15 @@ class FacebookIE(InfoExtractor): video_data = extract_from_jsmods_instances(server_js_data) tahoe_data = FacebookTahoeData(self, webpage, video_id) + if not video_data: + tahoe_js_data = self._parse_json( + self._search_regex( + r'for\s+\(\s*;\s*;\s*\)\s*;(.+)', tahoe_data.primary, + 'tahoe js data', default='{}'), + video_id, fatal=False) + + video_data = extract_from_jsmods_instances(tahoe_js_data) + if not video_data: if not fatal_if_no_video: return webpage, False @@ -372,15 +381,6 @@ class FacebookIE(InfoExtractor): expected=True) elif '>You must log in to continue' in webpage: self.raise_login_required() - # Video info not in first request, do a secondary request using - # tahoe player specific URL - tahoe_js_data = self._parse_json( - self._search_regex( - r'for\s+\(\s*;\s*;\s*\)\s*;(.+)', tahoe_data.primary, - 'tahoe js data', default='{}'), - video_id, fatal=False) - - video_data = extract_from_jsmods_instances(tahoe_js_data) if not video_data : if self._search_regex(r'newsFeedStream.*?

(.*?)<\/span><\/h1>', webpage, "video_title") is not None: