1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchTerms": ["milk"],
10 "urls": [],
11 "maxProducts": 5,
12 "includeProductDetails": True,
13 "postcode": "",
14 "brands": [],
15 "allergens": [],
16 "lifestyle": [],
17 "healthStar": [],
18 "sortBy": "relevance",
19 "includeUnavailable": False,
20 "includeMarketplace": False,
21 "includeRatings": True,
22 "storeQuery": "",
23 "storeNo": "",
24 "includeNearbyStores": False,
25 "source": "online",
26 "states": [],
27 "maxProductsPerRegion": 1,
28 "includeStoreDirectory": False,
29 "categoryPaths": [],
30 "specials": [],
31}
32
33
34run = client.actor("datascraperes/woolworths-products-scraper").call(run_input=run_input)
35
36
37print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
38for item in client.dataset(run.default_dataset_id).iterate_items():
39 print(item)
40
41