Youtube api, deleted videos not included in user's favorite playlist, issue with duplicates

614 views Asked by At

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 (ie 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 unavailable/deleted videos, the result is just a list 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 of the list 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.

I don't get this bug on normal playlists 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 to the original favorites:

youtube.com/playlist?list=FLUb8dHB7cvFY-Ez8SmRYWgA

and then via api 1-25 (missing deleted ones):

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):

gdata.youtube.com/feeds/api/users/HouseElectroBootleg/favorites?start-index=26&safeSearch=none&alt=json&v=2

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.

0

There are 0 answers