1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "searchTerms": ["milk"],
11 "market": "AE",
12 "language": "en",
13 "sortBy": "relevance",
14 "inStockOnly": False,
15 "urls": [
16 "https://gcc.luluhypermarket.com/en-ae/",
17 "https://gcc.luluhypermarket.com/en-ae/grocery/",
18 "https://gcc.luluhypermarket.com/en-ae/grocery-food-cupboard-canned-foods/",
19 "https://gcc.luluhypermarket.com/en-ae/grocery-food-cupboard-canned-foods/?page=2",
20 "https://gcc.luluhypermarket.com/en-ae/list/?search_text=milk",
21 "https://gcc.luluhypermarket.com/list/?search_text=milk&format=json",
22 "https://gcc.luluhypermarket.com/list/?category_ids=5019&format=json",
23 "https://gcc.luluhypermarket.com/en-ae/kdd-tomato-paste-135-g/p/138450-ea/",
24 "https://gcc.luluhypermarket.com/kdd-tomato-paste-135-g/p/138450-ea/?format=json",
25 "https://gcc.luluhypermarket.com/en-sa/grocery/",
26 "https://gcc.luluhypermarket.com/en-ae/c/Bulk-Savings/",
27 "https://gcc.luluhypermarket.com/en-ae/grocery-food-cupboard-breakfast-spreads/?sorter=-discount_ratio",
28 "https://gcc.luluhypermarket.com/en-ae/list/?attributes_brand=LuLu%20PL",
29 "https://gcc.luluhypermarket.com/ar-ae/grocery/",
30 ],
31 "fetchDetails": True,
32 "includeFacets": True,
33 "maxItems": 20,
34 "proxy": { "useApifyProxy": True },
35 "incrementalMode": False,
36 "compactUpdates": False,
37 "emitUnchanged": False,
38 "emitExpired": False,
39 "ignoreFieldsForChanges": [],
40 "notifyOnlyChanges": False,
41}
42
43
44run = client.actor("abotapi/luluhypermarket-scraper").call(run_input=run_input)
45
46
47print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
48for item in client.dataset(run.default_dataset_id).iterate_items():
49 print(item)
50
51