projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa613ef
)
[youtube:tab] fix view_count extraction(closes #27051)
author
Remita Amine
<remitamine@gmail.com>
Tue, 17 Nov 2020 19:32:50 +0000
(20:32 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Tue, 17 Nov 2020 19:32:50 +0000
(20:32 +0100)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 9333e48e43950c9ec401b0954a42d06434bbf0f8..4089e2aba5b7db8ec152bcb25d37e23c6a284c57 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-2543,8
+2543,8
@@
class YoutubeTabIE(YoutubeBaseInfoExtractor):
renderer, lambda x: x['lengthText']['simpleText'], compat_str))
view_count_text = try_get(
renderer, lambda x: x['viewCountText']['simpleText'], compat_str) or ''
- view_count =
int_or_none
(self._search_regex(
- r'^(
\d
+)', re.sub(r'\s', '', view_count_text),
+ view_count =
str_to_int
(self._search_regex(
+ r'^(
[\d,]
+)', re.sub(r'\s', '', view_count_text),
'view count', default=None))
uploader = try_get(
renderer, lambda x: x['ownerText']['runs'][0]['text'], compat_str)