projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e209677
)
[youtube] Fix like and dislike count extraction (closes #25977)
author
Sergey M․
<dstftw@gmail.com>
Sat, 21 Nov 2020 13:49:56 +0000
(20:49 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 21 Nov 2020 13:49:56 +0000
(20:49 +0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 484f79765cf1b4a14947d69c1138a767ffc22de6..fb4c31326863bbbf72457d328990b614774e2ce8 100644
(file)
--- 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')