logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 284f8306dffb3dbeeca3f99ef4c32ed4fcd571c3
parent aa613ef7e1efe9f799a1209659f8d9d01e3de221
Author: Remita Amine <remitamine@gmail.com>
Date:   Tue, 17 Nov 2020 20:32:50 +0100

[youtube:tab] fix view_count extraction(closes #27051)

Diffstat:

Myoutube_dl/extractor/youtube.py4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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)