1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "queries": ["laptop"],
11 "sort": "Relevance",
12 "urls": [
13 "https://takealot.com/deals?filter=DealType:Bundle%20Deals",
14 "https://www.takealot.com/all?search=laptop&filter=InStockRegion:jhb",
15 "https://www.takealot.com/all?search=laptop&sort=Price%20Ascending&filter=Brand:Apple&filter=Price:15000-*",
16 "https://m.takealot.com/all?filter=Type:12&sort=Price%20Ascending&page=2",
17 "https://www.takealot.com/apple-macbook-neo-13/PLID101174849",
18 "https://www.takealot.com/PLID92550055",
19 ],
20 "fetchDetails": True,
21 "fetchReviews": False,
22 "maxReviewsPerProduct": 20,
23 "maxItems": 20,
24 "maxPages": 0,
25 "proxyConfiguration": { "useApifyProxy": True },
26 "incrementalMode": False,
27 "emitUnchanged": False,
28 "emitExpired": False,
29 "changeScope": "all",
30 "compactUpdates": False,
31 "expireAfterMissedScans": 1,
32 "ignoreFieldsForChanges": [],
33 "maxNotifyListings": 50,
34}
35
36
37run = client.actor("abotapi/takealot-com-scraper").call(run_input=run_input)
38
39
40print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
41for item in client.dataset(run.default_dataset_id).iterate_items():
42 print(item)
43
44