adding option to shares extraction
This commit is contained in:
parent
e23f867b39
commit
056baf9e9f
@ -494,8 +494,8 @@ class FacebookIE(InfoExtractor):
|
|||||||
|
|
||||||
other_posts_view_count = parse_count(self._extract_meta_count(['otherPostsViewCount'], webpage, tahoe_data, 'other_post_views'))
|
other_posts_view_count = parse_count(self._extract_meta_count(['otherPostsViewCount'], webpage, tahoe_data, 'other_post_views'))
|
||||||
likes_count = parse_count(self._extract_likes(webpage, tahoe_data))
|
likes_count = parse_count(self._extract_likes(webpage, tahoe_data))
|
||||||
shares_count = parse_count(self._extract_meta_count(['sharecount'], webpage, tahoe_data, 'shares'))
|
|
||||||
comment_count = parse_count(self._extract_meta_count(['commentCount'], webpage, tahoe_data, 'shares'))
|
comment_count = parse_count(self._extract_meta_count(['commentCount'], webpage, tahoe_data, 'shares'))
|
||||||
|
shares_count = parse_count(self._extract_shares(webpage, tahoe_data))
|
||||||
|
|
||||||
info_dict = {
|
info_dict = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -556,6 +556,15 @@ class FacebookIE(InfoExtractor):
|
|||||||
if values:
|
if values:
|
||||||
return values[-1]
|
return values[-1]
|
||||||
|
|
||||||
|
def _extract_shares(self, webpage, tahoe_data):
|
||||||
|
value = self._extract_meta_count(['sharecount'], webpage, tahoe_data, 'shares')
|
||||||
|
if value:
|
||||||
|
return value
|
||||||
|
a = r'(\d+\w) Views'
|
||||||
|
values = re.findall(r'"share_count"\s*:\s*{\s*"count"\s*:\s*(\d+)', tahoe_data.secondary)
|
||||||
|
if values:
|
||||||
|
return values[-1]
|
||||||
|
|
||||||
def _extract_views(self, webpage, tahoe_data):
|
def _extract_views(self, webpage, tahoe_data):
|
||||||
value = self._extract_meta_count(['postViewCount', 'viewCount'], webpage, tahoe_data, 'likes')
|
value = self._extract_meta_count(['postViewCount', 'viewCount'], webpage, tahoe_data, 'likes')
|
||||||
if value:
|
if value:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user