read viewcount properly.

This commit is contained in:
Avi Peretz 2019-01-14 16:51:44 +02:00
parent 5916a2fc38
commit ba3b2c535f

View File

@ -458,8 +458,11 @@ class FacebookIE(InfoExtractor):
thumbnail = self._og_search_thumbnail(webpage)
view_count = parse_count(self._search_regex(
r'\bviewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
default=None))
r'\bpostViewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
default=None) or self._search_regex(
r'\"postViewCount\"\s*:\s*(\d+)', tahoe_secondary_data, 'view count',
default=None)
)
info_dict = {
'id': video_id,