mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 22:57:16 +08:00
fix unicode characters (#354)
* fix unicode characters * fix unicode characters Co-authored-by: bhodaya <bhodaya@videocites.com>
This commit is contained in:
parent
ea1996d492
commit
f90e0c8de1
@ -28,11 +28,13 @@ class facebookMetaData(unittest.TestCase):
|
||||
|
||||
def test_meta_data(self):
|
||||
params = {}
|
||||
url = "https://www.facebook.com/parapsychological.centr/videos/177407933624543/"
|
||||
url = "https://www.facebook.com/watch?v=925616657920281"
|
||||
ydl = youtube_dl.YoutubeDL(params)
|
||||
info = ydl.extract_info(url, download=False)
|
||||
self.assertGreater(info.get('comment_count'), 0)
|
||||
self.assertTrue(info.get('uploader_handle'), 0)
|
||||
self.assertGreater(len(info.get('title')), 0)
|
||||
|
||||
|
||||
def test_metadata_fetch_with_log_in(self):
|
||||
url = "https://www.facebook.com/oristandup/videos/675360549895283"
|
||||
|
@ -693,6 +693,9 @@ class FacebookIE(InfoExtractor):
|
||||
video_title = self._og_search_title(webpage, default=None)
|
||||
if not self._valid_video_title(video_title):
|
||||
video_title = self._resolve_description(webpage, tahoe_data)
|
||||
if not self._valid_video_title(video_title):
|
||||
video_title = self._html_search_regex(r'"videoTitle":"(.+?")', tahoe_data.secondary, 'title from secondary', default=None)
|
||||
video_title = video_title.decode('unicode_escape')
|
||||
if not self._valid_video_title(video_title):
|
||||
values = re.findall(r'videoTitle"\s*:\s*"(.*?)"', tahoe_data.secondary)
|
||||
if values:
|
||||
|
Loading…
x
Reference in New Issue
Block a user