mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-15 22:05:39 +00:00
[youtube] Fix like and dislike count extraction (closes #25977)
This commit is contained in:
parent
e2096776b9
commit
46a265a2da
1 changed files with 2 additions and 2 deletions
|
@ -2196,8 +2196,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
|
|
||||||
def _extract_count(count_name):
|
def _extract_count(count_name):
|
||||||
return str_to_int(self._search_regex(
|
return str_to_int(self._search_regex(
|
||||||
r'-%s-button[^>]+><span[^>]+class="yt-uix-button-content"[^>]*>([\d,]+)</span>'
|
(r'-%s-button[^>]+><span[^>]+class="yt-uix-button-content"[^>]*>([\d,]+)</span>' % re.escape(count_name),
|
||||||
% re.escape(count_name),
|
r'["\']label["\']\s*:\s*["\']([\d,.]+)\s+%ss["\']' % re.escape(count_name)),
|
||||||
video_webpage, count_name, default=None))
|
video_webpage, count_name, default=None))
|
||||||
|
|
||||||
like_count = _extract_count('like')
|
like_count = _extract_count('like')
|
||||||
|
|
Loading…
Reference in a new issue