Tuesday, October 9, 2012

[YouTube-API] Deleted videos not listed via api

Hi,

I have an issue on retrieving a user's favorite playlist.
Scenario:
I open up some user's favorites directly on youtube (ie youtube.com/playlist?list=FL...). Now if that list has deleted (or private, excluded) videos, they also show up as regularly on the page.
But when I try to receive the list via the api (I do this: gdata.youtube.com/feeds/api/users/...../favorites?v=2&start-index=1&safeSearch=none&alt=json) those videos are not included in the response (json in my case). I use the safesearch=none param to 'force' include the by localization excluded videos (as those would also cause problems). There is also no hint included, that there are a missing videos at all. Now that causes me a problem when loading the next portion via start-index. When there are actually those said unavailable/deleted videos, the result is just a set of moved up available videos. Now when I try to load the next portion (example start-index=26), I get a list of duplicated videos from the previous (1-25) result. There are as much duplicates at the beginning as deleted videos were in the previous request. I think the api does not consider the deleted videos when using start-index. Is this a bug? There is also no new "corrected" index in the result I could use to load the next portion of the list, the only link inside the result is just the same as I would do, beginning at 26, but that is wrong. I did not get this bug on normal playlists (ie not favorites) I tested so far, so this might only be valid for favorites. For example, you can use the channel "HouseElectroBootleg" to reproduce this effect, just look at the original favorites:

http://www.youtube.com/playlist?list=FLUb8dHB7cvFY-Ez8SmRYWgA
and then via api 1-25 (missing deleted ones):
https://gdata.youtube.com/feeds/api/users/HouseElectroBootleg/favorites?start-index=1&safeSearch=none&alt=json&v=2
and now the buggy result (starting at index 26):
https://gdata.youtube.com/feeds/api/users/HouseElectroBootleg/favorites?start-index=26&safeSearch=none&alt=json&v=2

If this is not a bug, how can I get the correct index value or just the count of not working videos, so I could just add the number to the offset to correct it? 

Thank you and sorry for my bad English, I tried to describe my issue as good as possible. :)

--
Starting October 15, 2012, this group will stop accepting new posts. We recommend that developers start using Stack Overflow and the Issue Tracker for YouTube API support. More details about this change and relevant links can be found at http://apiblog.youtube.com/2012/09/the-youtube-api-on-stack-overflow.html
 
 

No comments:

Post a Comment