1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 06:37:17 +08:00

Merge pull request #299 from vshiran/extract-additional-metadata

Added regex options for view count and uploader id (in _extract_from_url method)
This commit is contained in:
hashark 2020-04-23 09:24:21 +03:00 committed by GitHub
commit 843731a507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -463,10 +463,10 @@ class FacebookIE(InfoExtractor):
uploader_id = self._search_regex(
r'ownerid:"([\d]+)', webpage,
'uploader_id', default=None) or self._search_regex(
r'[\'\"]ownerid[\'\"]\s*:\s*[\'\"](\d+)[\'\"]', tahoe_data.secondary,
r'[\'\"]ownerid[\'\"]\s*:\s*[\'\"](\d+)[\'\"]',tahoe_data.secondary,
'uploader_id', default=None) or \
self._search_regex(r'\\\"page_id\\\"\s*:\s*\\\"(\d+)\\\"', tahoe_data.secondary, 'uploader_id', fatal=False)
self._search_regex(r'\\\"page_id\\\"\s*:\s*\\\"(\d+)\\\"', tahoe_data.secondary, 'uploader_id', fatal=False) or \
self._search_regex(r'content_owner_id_new\\":\\"(\d+)\\"', tahoe_data.secondary, 'uploader_id', fatal=False)
thumbnail = self._html_search_meta(['og:image', 'twitter:image'], webpage)
if is_live:
@ -579,6 +579,10 @@ class FacebookIE(InfoExtractor):
if values:
return values[-1]
values = re.findall(r'seen_by_count":\"(\d+)\"', tahoe_data.secondary)
if values:
return values[-1]
def _real_extract(self, url):
video_id = self._match_id(url)