diff options
author | Sergey M․ <dstftw@gmail.com> | 2020-11-21 20:49:56 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2020-11-21 20:49:56 +0700 |
commit | 46a265a2da26c663463244ecf9a4a699c2cd6efc (patch) | |
tree | d5a5c6cb7da6344b25a2d5a34711af535e4a15e7 /youtube_dl | |
parent | e2096776b99e4b5b67aacd1bcc7807a3d3757236 (diff) | |
download | youtube-dl-46a265a2da26c663463244ecf9a4a699c2cd6efc.tar.xz |
[youtube] Fix like and dislike count extraction (closes #25977)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 484f79765..fb4c31326 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -2196,8 +2196,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor): def _extract_count(count_name): return str_to_int(self._search_regex( - r'-%s-button[^>]+><span[^>]+class="yt-uix-button-content"[^>]*>([\d,]+)</span>' - % re.escape(count_name), + (r'-%s-button[^>]+><span[^>]+class="yt-uix-button-content"[^>]*>([\d,]+)</span>' % re.escape(count_name), + r'["\']label["\']\s*:\s*["\']([\d,.]+)\s+%ss["\']' % re.escape(count_name)), video_webpage, count_name, default=None)) like_count = _extract_count('like') |