File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ type Config = {
7373 page: Page ;
7474 pushData: (data : any ) => Promise <void >;
7575 }) => Promise <void >;
76+ /** Optional timeout for waiting for a selector to appear */
77+ waitForSelectorTimeout? : number ;
7678};
7779```
7880
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ type Config = {
1818 page : Page ;
1919 pushData : ( data : any ) => Promise < void > ;
2020 } ) => Promise < void > ;
21+ /** Optional timeout for waiting for a selector to appear */
22+ waitForSelectorTimeout ?: number ;
2123} ;
2224
2325export const config : Config = {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if (process.env.NO_CRAWL !== "true") {
3333 log . info ( `Crawling ${ request . loadedUrl } ...` ) ;
3434
3535 await page . waitForSelector ( config . selector , {
36- timeout : 1000 ,
36+ timeout : config . waitForSelectorTimeout ?? 1000 ,
3737 } ) ;
3838
3939 const html = await getPageHtml ( page ) ;
You can’t perform that action at this time.
0 commit comments