1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://nova.gr/statheri-tilefonia/programmata/stathero-internet",
14 "method": "GET",
15 "userData": {
16 "taskType": "static"
17 }
18 },
19 {
20 "url": "https://nova.gr/sindiastika-programmata/eon-syndyastika-programmata-me-statherh",
21 "method": "GET",
22 "userData": {
23 "taskType": "eon"
24 }
25 },
26 {
27 "url": "https://nova.gr/kiniti-tilefonia/simvolaia-kinitis/programmata-kinitis",
28 "method": "GET",
29 "userData": {
30 "taskType": "mobile"
31 }
32 },
33 {
34 "url": "https://www.f2g.gr/gr/f2g/#/",
35 "method": "GET",
36 "userData": {
37 "taskType": "f2g"
38 }
39 }
40 ]
41};
42
43
44const run = await client.actor("mpelas/my-actor-playwright-crawlee-template-4-nova-ok").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54