diff options
author | Remita Amine <remitamine@gmail.com> | 2020-11-17 20:32:50 +0100 |
---|---|---|
committer | Remita Amine <remitamine@gmail.com> | 2020-11-17 20:32:50 +0100 |
commit | 284f8306dffb3dbeeca3f99ef4c32ed4fcd571c3 (patch) | |
tree | a015cd431aacc1d451f7ae6c15aab47d2b48ec42 | |
parent | aa613ef7e1efe9f799a1209659f8d9d01e3de221 (diff) |
[youtube:tab] fix view_count extraction(closes #27051)
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files 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) |