1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[youtube] Improve view count extraction

This commit is contained in:
Sergey M․ 2020-06-16 02:38:45 +07:00
parent 37357d21a9
commit 7b16239a49
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -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'))