mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-15 10:53:08 +08:00
fix unicode characters (#357)
Co-authored-by: bhodaya <bhodaya@videocites.com>
This commit is contained in:
parent
001c25e1a5
commit
2229c2b3e7
@ -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"
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user