mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-08-15 07:04:14 +09:00
Add periods to accepted view count, get str_to_int to handle them for us
This commit is contained in:
parent
ef49e32c36
commit
f9eef66c32
@ -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+)',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user