Youtube Data API v3 pageToken for arbitrary page

后端 未结 3 1883
情深已故
情深已故 2020-12-17 02:31

Another question on SO revealed that pageTokens are identical for different searches, provided that the page number and maxResults settings are the same.

Version 2

3条回答
  •  有刺的猬
    2020-12-17 03:18

    Using ^ Quihico's files as a reference point, I had a little fun writing an enhancement to the previous poster's pageToken generator, in JS. If my assumption is correct about how the 4000s place encoding varies past N >= 98304, it should be able to construct a pageToken for a page starting with Nth item, provided N in [0, 4194304). It's only tested up to N = 99999, so YMMV.

    Link here: https://github.com/aricearice/youtube-page-token/blob/master/index.js

提交回复
热议问题