From: Sergey M․ Date: Mon, 15 Jun 2020 19:38:45 +0000 (+0700) Subject: [youtube] Improve view count extraction X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=7b16239a490a0d8784375895b620598bfccf0ede;p=youtube-dl.git [youtube] Improve view count extraction --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index dcd2d966b..aaa4023b4 100644 --- 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'))