Skip to content

fix pageToken handling#19

Open
drassi wants to merge 1 commit intowonga00:masterfrom
drassi:pagetoken
Open

fix pageToken handling#19
drassi wants to merge 1 commit intowonga00:masterfrom
drassi:pagetoken

Conversation

@drassi
Copy link

@drassi drassi commented Jun 15, 2023

Encountered a small bug in page token handling when looking at the crawler a few days ago. For paged queries, 'nextPageToken' is sent as a param to search API, but actually 'pageToken' is the correct input param name (even though nextPageToken/prevPageToken are what's returned). Ref https://developers.google.com/youtube/v3/docs/search/list#pageToken

I found this was causing paging to not work correctly - the first queries were being duplicated without proceeding onto the next page. This was mainly triggered with query efficiency modifications I had to make because my API limits were very low, but I believe it could be triggered under certain conditions with existing query planning if many videos under min duration are returned.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant