Open ilyazub opened 3 years ago
Python wrapper for SerpApi has search.pagination(): serpapi/google-search-results-python#19.
search.pagination()
pages = search.pagination(0, 20) urls = [] for result in pages: urls.append(result['serpapi_pagination']['next'])
In JavaScript, such a paginator can be done using the async generator function.
const paginator = search.pagination({ start: 0, end: 20 }); const organicResults = []; for await (const page of paginator) { // page contains a single paginated output. organicResults.push(...page.organic_results); }
Reference implementation from aws-sdk-js-v3.
aws-sdk-js-v3
Related to #6.
/cc @hartator @jvmvik
Python wrapper for SerpApi has
search.pagination()
: serpapi/google-search-results-python#19.In JavaScript, such a paginator can be done using the async generator function.
Reference implementation from
aws-sdk-js-v3
.Related to #6.
/cc @hartator @jvmvik