1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://www.python.org/",
13 "https://www.python.org/about/",
14 "https://www.python.org/static/img/python-logo.png"
15 ],
16 "requiredEncodings": [
17 "br",
18 "gzip"
19 ],
20 "minImmutableMaxAgeSeconds": 31536000,
21 "canonicalHost": "",
22 "trailingSlashForm": "as-given",
23 "checkHttpToHttps": true,
24 "hashedAssetPattern": "[._-][A-Za-z0-9]{8,}\\.(?:js|mjs|cjs|css|map|woff2?|ttf|otf|eot|png|jpe?g|gif|svg|webp|avif|ico)$",
25 "trackBaseline": true,
26 "baselineKey": "",
27 "timeoutSeconds": 15,
28 "maxConcurrency": 5,
29 "maxRequests": 1300,
30 "maxRedirects": 3
31};
32
33
34const run = await client.actor("kingii98/cdn-cache-and-compression-delivery-contract-gate").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44