-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathforeach_url_scraper.json
More file actions
81 lines (81 loc) · 2.08 KB
/
foreach_url_scraper.json
File metadata and controls
81 lines (81 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
"id": "foreach-url-scraper",
"name": "ForEach URL Scraper",
"description": "Demonstrates forEach loop: iterates over a list of URLs, navigates to each, and extracts the page title",
"nodes": [
{
"id": "1",
"type": "automationStep",
"data": {
"step": {
"id": "1",
"type": "setVariable",
"description": "Set list of URLs to scrape",
"variableName": "urls",
"value": "[\"https://example.com\", \"https://httpbin.org\", \"https://jsonplaceholder.typicode.com\"]"
}
},
"position": { "x": 250, "y": 50 }
},
{
"id": "2",
"type": "forEach",
"data": {
"step": {
"id": "2",
"type": "forEach",
"description": "Loop through each URL",
"arrayVariable": "urls",
"itemVariable": "currentUrl",
"indexVariable": "loopIndex"
}
},
"position": { "x": 250, "y": 170 }
},
{
"id": "3",
"type": "automationStep",
"data": {
"step": {
"id": "3",
"type": "navigate",
"description": "Navigate to current URL",
"value": "{{currentUrl}}"
}
},
"position": { "x": 250, "y": 290 }
},
{
"id": "4",
"type": "automationStep",
"data": {
"step": {
"id": "4",
"type": "extract",
"description": "Extract page title",
"selector": "title",
"storeKey": "pageTitle"
}
},
"position": { "x": 250, "y": 410 }
},
{
"id": "5",
"type": "automationStep",
"data": {
"step": {
"id": "5",
"type": "screenshot",
"description": "Take final screenshot"
}
},
"position": { "x": 500, "y": 170 }
}
],
"edges": [
{ "id": "e1-2", "source": "1", "target": "2" },
{ "id": "e2-3", "source": "2", "target": "3", "sourceHandle": "loop" },
{ "id": "e3-4", "source": "3", "target": "4" },
{ "id": "e2-5", "source": "2", "target": "5", "sourceHandle": "done" }
]
}