@@ -96,7 +96,9 @@ export async function scrapeURLWithFireEngineChromeCDP(meta: Meta): Promise<Engi
9696 let response = await performFireEngineScrape (
9797 meta . logger . child ( { method : "scrapeURLWithFireEngineChromeCDP/callFireEngine" , request } ) ,
9898 request ,
99- defaultTimeout + totalWait ,
99+ meta . options . timeout !== undefined
100+ ? defaultTimeout + totalWait
101+ : Infinity , // TODO: better timeout handling
100102 ) ;
101103
102104 specialtyScrapeCheck ( meta . logger . child ( { method : "scrapeURLWithFireEngineChromeCDP/specialtyScrapeCheck" } ) , response . responseHeaders ) ;
@@ -148,7 +150,9 @@ export async function scrapeURLWithFireEnginePlaywright(meta: Meta): Promise<Eng
148150 let response = await performFireEngineScrape (
149151 meta . logger . child ( { method : "scrapeURLWithFireEngineChromeCDP/callFireEngine" , request } ) ,
150152 request ,
151- defaultTimeout + meta . options . waitFor
153+ meta . options . timeout !== undefined
154+ ? defaultTimeout + meta . options . waitFor
155+ : Infinity , // TODO: better timeout handling
152156 ) ;
153157
154158 specialtyScrapeCheck ( meta . logger . child ( { method : "scrapeURLWithFireEnginePlaywright/specialtyScrapeCheck" } ) , response . responseHeaders ) ;
@@ -182,13 +186,16 @@ export async function scrapeURLWithFireEngineTLSClient(meta: Meta): Promise<Engi
182186 atsv : meta . internalOptions . atsv ,
183187 geolocation : meta . options . geolocation ,
184188 disableJsDom : meta . internalOptions . v0DisableJsDom ,
185-
189+
186190 timeout : meta . options . timeout === undefined ? 300000 : undefined , // TODO: better timeout logic
187191 } ;
188192
189193 let response = await performFireEngineScrape (
190194 meta . logger . child ( { method : "scrapeURLWithFireEngineChromeCDP/callFireEngine" , request } ) ,
191195 request ,
196+ meta . options . timeout !== undefined
197+ ? defaultTimeout
198+ : Infinity , // TODO: better timeout handling
192199 ) ;
193200
194201 specialtyScrapeCheck ( meta . logger . child ( { method : "scrapeURLWithFireEngineTLSClient/specialtyScrapeCheck" } ) , response . responseHeaders ) ;
0 commit comments