From c55393ce44de3a456f9c2233784f47cc5a0b90f8 Mon Sep 17 00:00:00 2001 From: Laura Date: Mon, 16 Nov 2020 02:30:08 +0100 Subject: [PATCH] [youtube] fix channel/search on videos with no views --- haruhi_dl/extractor/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haruhi_dl/extractor/youtube.py b/haruhi_dl/extractor/youtube.py index 4b3a71e4f..3052fb0ca 100644 --- a/haruhi_dl/extractor/youtube.py +++ b/haruhi_dl/extractor/youtube.py @@ -2267,7 +2267,7 @@ class YoutubeBaseListInfoExtractor(YoutubeBaseInfoExtractor): lambda x: parse_duration(x['thumbnailOverlays'][0]['thumbnailOverlayTimeStatusRenderer']['text']['simpleText']), ], expected_type=float), 'view_count': try_get(entry, [ - lambda x: int(x['viewCountText']['simpleText'][:-len(' views')].replace(",", "")), + lambda x: int_or_none(x['viewCountText']['simpleText'][:-len(' views')].replace(',', '').replace('No', '0')), ], expected_type=int), 'channel': try_get(entry, [ lambda x: x['shortBylineText']['runs'][0]['text'],