From ba3b2c535f653f42e6c4d2d86ea172673d46f105 Mon Sep 17 00:00:00 2001 From: Avi Peretz Date: Mon, 14 Jan 2019 16:51:44 +0200 Subject: [PATCH] read viewcount properly. --- youtube_dl/extractor/facebook.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index d70837402..f7b65a2ae 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -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,