File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export async function createAndStartSearchCrawler(
7070 const crawler = new CheerioCrawler ( {
7171 ...( searchCrawlerOptions as CheerioCrawlerOptions ) ,
7272 requestQueue : await RequestQueue . open ( key , { storageClient : client } ) ,
73- requestHandler : async ( { request, $ : _$ } : CheerioCrawlingContext < SearchCrawlerUserData > ) => {
73+ requestHandler : async ( { request, $ : _$ , addRequests } : CheerioCrawlingContext < SearchCrawlerUserData > ) => {
7474 // NOTE: we need to cast this to fix `cheerio` type errors
7575 addTimeMeasureEvent ( request . userData ! , 'cheerio-request-handler-start' ) ;
7676 const $ = _$ as CheerioAPI ;
@@ -108,7 +108,7 @@ export async function createAndStartSearchCrawler(
108108 searchCrawlerOptions . proxyConfiguration ,
109109 nextOffset ,
110110 ) ;
111- await crawler . requestQueue ! . addRequest ( nextRequest ) ;
111+ await addRequests ( [ nextRequest ] ) ;
112112 } else {
113113 // We have enough results or reached max pages, proceed to content crawling
114114 const finalResults = deduplicated . slice ( 0 , request . userData . maxResults ) ;
You can’t perform that action at this time.
0 commit comments