I am fetching the youtube viewcount from the Youtube XML data obtained from the url : https://gdata.youtube.com/feeds/api/videos/VIDEOID?v=2
But I observed 2 things about the viewcount attribute in the xml data:
-
The viewcount attribute is not created as soon as the video is uploaded. It takes 1 to 2 days for the viewcount attribute to appear in the XML.
-
Once the viewcount attribute appears,if I view a video several times(say 4), and check the viewcount, it is 4 in Youtube site(mobile version and desktop version) but less than 4(say 1) in the XML data
This is creating a problem for me coz I have to display the viewcount(which is same as in Youtube site) in my application. Is there any other way of fetching the Youtube video viewcount which is the latest?
Please suggest.
It is noted in the API documentation that there might be a delay in the statistics data under Expected latency for data updates http://code.google.com/apis/youtube/2.0/reference.html#Overview: