projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37357d2
)
[youtube] Improve view count extraction
author
Sergey M․
<dstftw@gmail.com>
Mon, 15 Jun 2020 19:38:45 +0000
(
02:38
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 15 Jun 2020 19:38:45 +0000
(
02:38
+0700)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index dcd2d966b3efcabf8caf42fe0f4ebb32fccbb51e..aaa4023b478e561027c98aa90d295971507ca385 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-1978,6
+1978,8
@@
class YoutubeIE(YoutubeBaseInfoExtractor):
view_count = extract_view_count(video_info)
if view_count is None and video_details:
view_count = int_or_none(video_details.get('viewCount'))
+ if view_count is None and microformat:
+ view_count = int_or_none(microformat.get('viewCount'))
if is_live is None:
is_live = bool_or_none(video_details.get('isLive'))