`next` pagination using js-sdk
Using version
1.2.2
, does the js-sdk have a built-in method to follow the next
url?
I call asyncCrawlUrl()
and then checkCrawlStatus()
every 5 seconds until the job status is complete. However, I'm not sure how to get the next page of results from the next
property.
More detailed examples of how to use asyncCrawlUrl
, checkCrawlStatus
, and the next
url would be appreciated!
7 Replies
Hi there @Kaleb, this is a bug, working on this today. Will let you know when it's done.
Hi @Kaleb, we added a
getAllData
parameter to checkCrawlStatus
. Please update to 1.3.0
and set the parameter to true
. Thank you for your patience!hey @mogery thank you, we will give it a shot. I appreciate the update!
Hey @mogery, we're using the new v1.3 SDK and
getAllData
flag.
If the response exceeds 10mb do will we still need to handle pagination by fetching the next
url?
I want to make sure we handle that case if possible.Nope
getAllData
will fire off requests until next
doesn't exist anymore, i.e. all data has been retrievedah, I see! thanks so much, that really simplifies our script.
Yup! Should've been there from the start, sorry about that 😅
Well I can't complain because this is still 10x easier than puppeteer 😁
Love to hear, nice name btw 🙂