Authored by ohnonot
This commit is contained in:
pukkandan 2021-01-11 02:10:51 +05:30
parent f446cc6667
commit 7267acd1ed

View File

@ -3624,8 +3624,8 @@ def _entries(self, query, n):
description = try_get(video, lambda x: x['descriptionSnippet']['runs'][0]['text'], compat_str) description = try_get(video, lambda x: x['descriptionSnippet']['runs'][0]['text'], compat_str)
duration = parse_duration(try_get(video, lambda x: x['lengthText']['simpleText'], compat_str)) duration = parse_duration(try_get(video, lambda x: x['lengthText']['simpleText'], compat_str))
view_count_text = try_get(video, lambda x: x['viewCountText']['simpleText'], compat_str) or '' view_count_text = try_get(video, lambda x: x['viewCountText']['simpleText'], compat_str) or ''
view_count = int_or_none(self._search_regex( view_count = str_to_int(self._search_regex(
r'^(\d+)', re.sub(r'\s', '', view_count_text), r'^([\d,]+)', re.sub(r'\s', '', view_count_text),
'view count', default=None)) 'view count', default=None))
uploader = try_get(video, lambda x: x['ownerText']['runs'][0]['text'], compat_str) uploader = try_get(video, lambda x: x['ownerText']['runs'][0]['text'], compat_str)
total += 1 total += 1