[facebook] Add another regex for handleServerJS
authorRemita Amine <remitamine@gmail.com>
Fri, 11 Dec 2020 20:50:40 +0000 (21:50 +0100)
committerRemita Amine <remitamine@gmail.com>
Fri, 11 Dec 2020 20:50:40 +0000 (21:50 +0100)
youtube_dl/extractor/facebook.py

index bc4844adcf9d53a567c9e92eb2ed5b4aa7baadac..cc45aacc0b99b22e0a8a0133103e0b7e84837239 100644 (file)
@@ -365,8 +365,8 @@ class FacebookIE(InfoExtractor):
             return video_data
 
         server_js_data = self._parse_json(self._search_regex(
-            r'handleServerJS\(({.+})(?:\);|,")', webpage,
-            'server js data', default='{}'), video_id, fatal=False)
+            [r'handleServerJS\(({.+})(?:\);|,")', r'\bs\.handle\(({.+?})\);'],
+            webpage, 'server js data', default='{}'), video_id, fatal=False)
 
         if server_js_data:
             video_data = extract_video_data(server_js_data.get('instances', []))