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:
commit
843731a507
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user