mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-10 14:59:29 +01:00
[youtube] Improve view count extraction
This commit is contained in:
parent
37357d21a9
commit
7b16239a49
@ -1978,6 +1978,8 @@ def feed_entry(name):
|
|||||||
view_count = extract_view_count(video_info)
|
view_count = extract_view_count(video_info)
|
||||||
if view_count is None and video_details:
|
if view_count is None and video_details:
|
||||||
view_count = int_or_none(video_details.get('viewCount'))
|
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:
|
if is_live is None:
|
||||||
is_live = bool_or_none(video_details.get('isLive'))
|
is_live = bool_or_none(video_details.get('isLive'))
|
||||||
|
Loading…
Reference in New Issue
Block a user