Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3708

Has youtube statistics become limited to four items {'viewCount', 'likeCount', 'favoriteCount', and 'commentCount'}?

$
0
0

I have written a python code which returns snippet, content details and statistics for a given youtube video ID. I have tried the code for tens of video URLs and without an exception I get information for only four items under statistics namely {'viewCount', 'likeCount', 'favoriteCount', and 'commentCount'}. I cannot for example retrieve information for {'viewerPercentage', 'estimatedMinutesWatched', 'averageViewDuration', 'averageViewPercentage'}. The code is written in python :

request =youtube.videos().list(part="snippet,contentDetails,statistics",id=video_id)data = request.execute()for video in data['items']:    snippet = video["snippet"] # get infos from the snippet    channel_title = snippet["channelTitle"] # get stats infos    title = video['snippet']['title']    published = video['snippet']['publishedAt']    description = video['snippet']['description']    view_count = video['statistics'].get('viewCount', 0)    viewer_percentage =     video['statistics'].get('viewerPercentage', 0)    estimated_min_watched =     video['statistics'].get('estimatedMinutesWatched', 0)    avg_view_duration =     video['statistics'].get('averageViewDuration', 0)    avg_view_percentage =     video['statistics'].get('averageViewPercentage', 0)

Has YouTube disabled access to such metrics? Has the the video owner disabled access? Any thoughts are appreciated.


Viewing all articles
Browse latest Browse all 3708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>