1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [{ "url": "https://www.decathlon.com/sitemap.xml" }],
10 "maxRequestsPerCrawl": 10,
11 "proxyConfig": { "useApifyProxy": True },
12 "extendOutputFunction": """async ({ data, item, product, images, fns, name, request, variants, context, customData, input, Apify }) => {
13 return item;
14}""",
15 "extendScraperFunction": """async ({ fns, customData, Apify, label }) => {
16
17}""",
18 "customData": {},
19 "maxConcurrency": 10,
20 "maxRequestRetries": 3,
21 "updatedSince": "",
22 "batchSize": 10,
23 "flushIntervalMs": 300,
24 "perHostConcurrency": 2,
25 "bufferSize": 100,
26 "storefrontApiVersion": "2024-07",
27 "storefrontShopDomain": "",
28 "storefrontAccessToken": "",
29}
30
31
32run = client.actor("runexes/actor-shopify-scraper").call(run_input=run_input)
33
34
35print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
36for item in client.dataset(run["defaultDatasetId"]).iterate_items():
37 print(item)
38
39