logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 7b16239a490a0d8784375895b620598bfccf0ede
parent 37357d21a97dc7a4ab6fa75b862f303c7eb36eb8
Author: Sergey M․ <dstftw@gmail.com>
Date:   Tue, 16 Jun 2020 02:38:45 +0700

[youtube] Improve view count extraction

Diffstat:

Myoutube_dl/extractor/youtube.py2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git 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'))