Skip to content

Commit 287d37e

Browse files
feat: add navigationTimeoutSecs to input
1 parent 59fcd22 commit 287d37e

File tree

7 files changed

+12
-0
lines changed

7 files changed

+12
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.

checker-cheerio/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Actor.main(async () => {
2929
proxyConfiguration,
3030
urlsToCheck,
3131
repeatChecksOnProvidedUrls,
32+
navigationTimeoutSecs,
3233
} = input;
3334

3435
const proxy = await Actor.createProxyConfiguration({
@@ -67,6 +68,7 @@ Actor.main(async () => {
6768

6869
const crawler = new CheerioCrawler({
6970
maxRequestRetries: 0,
71+
navigationTimeoutSecs,
7072
maxRequestsPerCrawl: maxNumberOfPagesCheckedPerDomain,
7173
maxConcurrency: maxConcurrentPagesCheckedPerDomain,
7274
requestQueue,

checker-cheerio/src/typedefs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface ActorInputData {
5959
maxConcurrentPagesCheckedPerDomain: number;
6060
maxConcurrentDomainsChecked: number;
6161
retireBrowserInstanceAfterRequestCount: number;
62+
navigationTimeoutSecs: number;
6263

6364
// Pass only to puppeteer
6465
'puppeteer.headfull'?: boolean;

starter/.DS_Store

6 KB
Binary file not shown.

starter/INPUT_SCHEMA.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@
116116
"editor": "number",
117117
"minimum": 1
118118
},
119+
"navigationTimeoutSecs": {
120+
"title": "Navigation timeout (seconds)",
121+
"type": "integer",
122+
"description": "Specifies the maximum time in seconds the request will wait for the page to load. If the page is not loaded within this time, the browser will throw an error and the page will be marked as failed.",
123+
"default": 60,
124+
"minimum": 1
125+
},
119126
"puppeteer.headfull": {
120127
"title": "Headfull browser (XVFB)",
121128
"type": "boolean",

starter/src/configs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function* createActorRunConfigForCrawler({ input, urlData, checkerId, playwright
6464
maxConcurrentPagesCheckedPerDomain: input.maxConcurrentPagesCheckedPerDomain,
6565
maxConcurrentDomainsChecked: input.maxConcurrentDomainsChecked,
6666
retireBrowserInstanceAfterRequestCount: input.retireBrowserInstanceAfterRequestCount,
67+
navigationTimeoutSecs: input.navigationTimeoutSecs,
6768
},
6869
params: {
6970
memory: checkerId === ACTOR_CHEERIO_CHECKER_NAME ? 4096 : 8192,

starter/src/typedefs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface ActorInputData {
4747
maxConcurrentPagesCheckedPerDomain: number;
4848
maxConcurrentDomainsChecked: number;
4949
retireBrowserInstanceAfterRequestCount: number;
50+
navigationTimeoutSecs: number;
5051

5152
// Pass only to puppeteer
5253
'puppeteer.headfull'?: boolean;

0 commit comments

Comments
 (0)