1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "searchTerms": ["towel"],
11 "urls": [
12 "https://www.kmart.com.au/toys/",
13 "https://www.kmart.com.au/womens/",
14 "https://www.kmart.com.au/toys/?page=2",
15 "https://www.kmart.com.au/catalogue/",
16 "https://www.kmart.com.au/clearance/",
17 "https://www.kmart.com.au/brand/target/",
18 "https://www.kmart.com.au/search/?searchTerm=towel",
19 "https://www.kmart.com.au/product/madison-bath-towel-ocean-42442370/",
20 "https://www.kmart.com.au/category/home-and-living/home-decor/",
21 "https://www.kmart.com.au/category/online-exclusives/",
22 ],
23 "basketItems": [{
24 "url": "https://www.kmart.com.au/product/madison-bath-towel-ocean-42442370/",
25 "quantity": 2,
26 }],
27 "proxy": { "useApifyProxy": True },
28 "incrementalMode": False,
29 "emitUnchanged": False,
30 "emitExpired": False,
31 "changeScope": "all",
32 "compactUpdates": False,
33 "expireAfterMissedScans": 1,
34 "ignoreFieldsForChanges": [],
35}
36
37
38run = client.actor("abotapi/kmart-au-scraper-lite").call(run_input=run_input)
39
40
41print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
42for item in client.dataset(run.default_dataset_id).iterate_items():
43 print(item)
44
45