Add periods to accepted view count, get str_to_int to handle them for us

This commit is contained in:
Paper 2022-05-20 04:27:57 -04:00 committed by GitHub
parent ef49e32c36
commit f9eef66c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,10 +126,10 @@ class VidLiiIE(InfoExtractor):
default=None) or self._search_regex( default=None) or self._search_regex(
r'duration\s*:\s*(\d+)', webpage, 'duration', fatal=False)) r'duration\s*:\s*(\d+)', webpage, 'duration', fatal=False))
view_count = int_or_none(self._search_regex( view_count = str_to_int(self._html_search_regex(
(r'<strong>([\d,]+)</strong> views', (r'<strong>([\d,.]+)</strong> views',
r'Views\s*:\s*<strong>([\d,]+)</strong>'), r'Views\s*:\s*<strong>([\d,.]+)</strong>'),
webpage, 'view count', fatal=False).replace(",", "")) webpage, 'view count', fatal=False))
comment_count = int_or_none(self._search_regex( comment_count = int_or_none(self._search_regex(
(r'<span[^>]+id=["\']cmt_num[^>]+>(\d+)', (r'<span[^>]+id=["\']cmt_num[^>]+>(\d+)',