From 284f8306dffb3dbeeca3f99ef4c32ed4fcd571c3 Mon Sep 17 00:00:00 2001 From: Remita Amine Date: Tue, 17 Nov 2020 20:32:50 +0100 Subject: [PATCH] [youtube:tab] fix view_count extraction(closes #27051) --- youtube_dl/extractor/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 9333e48e4..4089e2aba 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2543,8 +2543,8 @@ class YoutubeTabIE(YoutubeBaseInfoExtractor): renderer, lambda x: x['lengthText']['simpleText'], compat_str)) view_count_text = try_get( renderer, lambda x: x['viewCountText']['simpleText'], compat_str) or '' - view_count = int_or_none(self._search_regex( - r'^(\d+)', re.sub(r'\s', '', view_count_text), + view_count = str_to_int(self._search_regex( + r'^([\d,]+)', re.sub(r'\s', '', view_count_text), 'view count', default=None)) uploader = try_get( renderer, lambda x: x['ownerText']['runs'][0]['text'], compat_str) -- 2.22.2