1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-09 22:27:45 +08:00

fix uploader handle fb

This commit is contained in:
bhodaya 2020-08-16 16:49:51 +03:00
parent 4e8e881cd8
commit 832b943193
2 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ class facebookMetaData(unittest.TestCase):
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)
def test_metadata_fetch_with_log_in(self):
url = "https://www.facebook.com/oristandup/videos/675360549895283"

View File

@ -561,7 +561,7 @@ class FacebookIE(InfoExtractor):
uploader_handle = self._search_regex(r'"video_path":"\\\/([^\/]+)\\\/', tahoe_data.primary, 'uploader_handle',
fatal=False)
if uploader_handle == uploader_id:
uploader_handle = self._search_regex(r'href=\\"https:\\\/\\\/www.facebook.com\\\/(.+?)\\\/\\', tahoe_data.secondary,
uploader_handle = self._search_regex(r'href=\\"https:\\\/\\\/www.facebook.com\\\/(.+?)\\\/', tahoe_data.secondary,
'uploader_handle',
fatal=False)