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