diff --git a/test/ci/test_facebook.py b/test/ci/test_facebook.py index a6750ce43..f2454fc79 100644 --- a/test/ci/test_facebook.py +++ b/test/ci/test_facebook.py @@ -35,6 +35,13 @@ class facebookMetaData(unittest.TestCase): self.assertTrue(info.get('uploader_handle'), 0) self.assertGreater(len(info.get('title')), 0) + def test_new_ui(self): + params = {} + url = "https://www.facebook.com/115232383642471/videos/444314619837387" + ydl = youtube_dl.YoutubeDL(params) + info = ydl.extract_info(url, download=False) + self.assertGreater(len(info.get('title')), 0) + def test_metadata_fetch_with_log_in(self): url = "https://www.facebook.com/oristandup/videos/675360549895283" diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index 07cc349a2..ae9bdc28b 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -781,6 +781,7 @@ class FacebookIE(InfoExtractor): def _resolve_new_ui_title(self, webpage, tahoe_data, video_id): video_title = self._search_regex(r'"headline":"(.+?")', webpage, 'title', fatal=False) + video_title = video_title.decode('unicode_escape') if not video_title: video_title = self._search_regex(r'"pageTitle">(.+?)<', webpage, 'title', fatal=False) if not video_title: