We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29fc934 commit 4c892e6Copy full SHA for 4c892e6
config.ts
@@ -18,6 +18,8 @@ type Config = {
18
page: Page;
19
pushData: (data: any) => Promise<void>;
20
}) => Promise<void>;
21
+ /** Optional timeout for waiting for a selector to appear */
22
+ waitForSelectorTimeout?: number;
23
};
24
25
export const config: Config = {
src/main.ts
@@ -33,7 +33,7 @@ if (process.env.NO_CRAWL !== "true") {
33
log.info(`Crawling ${request.loadedUrl}...`);
34
35
await page.waitForSelector(config.selector, {
36
- timeout: 1000,
+ timeout: config.waitForSelectorTimeout ?? 1000,
37
});
38
39
const html = await getPageHtml(page);
0 commit comments