1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "queries": ["laptop"],
11 "urls": [
12 "https://www.officeworks.com.au/shop/officeworks/search?q=laptop",
13 "https://www.officeworks.com.au/shop/officeworks/search?q=laptop&page=2",
14 "https://www.officeworks.com.au/shop/officeworks/c/office-supplies/pens/ballpoint-pens",
15 "https://www.officeworks.com.au/shop/officeworks/c/office-supplies/pens/ballpoint-pens?page=2",
16 "https://www.officeworks.com.au/shop/officeworks/c/art-supplies",
17 "https://www.officeworks.com.au/shop/officeworks/p/mac-mini-m6-12-core-cpu-12-core-gpu-16-256gb-immm6162",
18 "https://www.officeworks.com.au/shop/officeworks/search?q=IMMM6162",
19 "https://www.officeworks.com.au/shop/officeworks/c/deals",
20 "https://www.officeworks.com.au/shop/officeworks/c/clearance",
21 "https://www.officeworks.com.au/shop/officeworks/p/JBCNCPA480",
22 ],
23 "proxy": { "useApifyProxy": True },
24 "ignoreFieldsForChanges": [],
25}
26
27
28run = client.actor("abotapi/officeworks-scraper").call(run_input=run_input)
29
30
31print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35