I'm using the following API to fetch a list of the videos in a playlist:
https://www.youtube.com/feeds/videos.xml?playlist_id=
The problem is if the playlist has more than 15 videos, the response is only the first 15. I thought there is a paging algorithm, but there is no link rel="next"
in the response and appending ?page
to the end of the link returns 404.
Thanks
First, the YouTube Data API v2 call is already deprecated and encourage you to use the YouTube Data API (v3).
I found in this thread that https://www.youtube.com/feeds/videos.xml?playlist_id=xxxxx
is only limited to 15 videos or results.
The old API use max-results
and start-index
to get more results but it is not working anymore when I try.
If you want more results than 15, I suggest you to use the PlaylistItems: list
of the YouTube Data API (v3). It has a parameter maxResults
that you can set to maximum of 50. To get the another or next 50 results, you can use the parameter pageToken
for it.
Hope this information helps you.
来源:https://stackoverflow.com/questions/42258132/fetching-videos-list-from-a-youtube-playlist-through-rss-doesnt-return-more-tha