Skip to content

Commit 7e94bec

Browse files
fix: run properly if proxy groups are empty array
1 parent 438895f commit 7e94bec

File tree

9 files changed

+20
-11
lines changed

9 files changed

+20
-11
lines changed

.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2+
"actorSpecification": 1,
23
"name": "checker-cheerio",
34
"version": "0.0",
4-
"buildTag": "latest",
5-
"env": null
5+
"buildTag": "latest"
66
}

checker-cheerio/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ node_modules
77
apify_storage
88
storage
99
storage
10-
storage
10+
storage
11+
# Added by Apify CLI
12+
.venv

starter/.DS_Store

0 Bytes
Binary file not shown.

starter/.actor/actor.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"actorSpecification": 1,
3+
"name": "starter",
4+
"version": "0.0",
5+
"buildTag": "latest"
6+
}

starter/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules
22
apify_storage
33
dist
44

5-
storage
5+
storage
6+
# Added by Apify CLI
7+
.venv

starter/apify.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

starter/src/configs.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ export function convertInputToActorConfigs(input: ActorInputData): PreparedActor
4747
}
4848

4949
function* createActorRunConfigForCrawler({ input, urlData, checkerId, playwrightBrowser, memory }: CreateActorRunConfig) {
50-
for (const group of input.proxyConfiguration.apifyProxyGroups ?? ['auto']) {
50+
const proxyGroups = input.proxyConfiguration.apifyProxyGroups?.length > 0
51+
? input.proxyConfiguration.apifyProxyGroups
52+
: ['auto'];
53+
for (const group of proxyGroups) {
5154
const { url } = urlData;
5255
const config: PreparedActorConfig = {
5356
actorId: checkerId,

starter/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Actor.main(async () => {
4949
userData: { actorInput },
5050
}));
5151

52+
53+
5254
const requestList = await RequestList.open(null, sources);
5355

5456
const runner = new BasicCrawler({

0 commit comments

Comments
 (0)