From: Remita Amine Date: Tue, 17 Nov 2020 19:32:50 +0000 (+0100) Subject: [youtube:tab] fix view_count extraction(closes #27051) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=284f8306dffb3dbeeca3f99ef4c32ed4fcd571c3;p=youtube-dl [youtube:tab] fix view_count extraction(closes #27051) --- 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)