Reputation: 51
I'm working with this list videos example for GAE and if you try to run it on that page you can see that there's no next_page_token
I've even tried to self.response.out.write(next_page_token)
and got None
.
For example purposes I've submitted Channel name
to be Google
(which surely has more than 50 videos). I only get 50, no token that I can see, no pagination indication or anything like that.
What am I missing here?
Please advise, Thanks a lot
Upvotes: 0
Views: 74
Reputation: 6893
Here is the first request pre-filled for you. Click execute at the bottom:
Following that result and hitting the next api in the code,
Clicking execute on that shows that nextPageToken set. Either the code example from Google has a bug in it, or it is a copy paste error somewhere.
EDIT: There is a bug in the code sample provided.
playlistitems_response looks similar to this:
{
"kind": "youtube#playlistItemListResponse",
"etag": "\"eYE31WLho912TfxEBDDRSwEQ5Ms/vUtg-sAFafmsExy-5XOvaMIfVN0\"",
"nextPageToken": "CDQQAA",
"prevPageToken": "CDIQAQ",
"pageInfo": {
"totalResults": 1634,
"resultsPerPage": 2
},
"items": [{...}]
}
The nextPageToken
is being extracted like playlistitems_response.get('tokenPagination', {}).get('nextPageToken')
when it
should read playlistitems_response.get('nextPageToken')
.
Upvotes: 1