1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "urls": [
11 "https://www.local.ch/de/s/restaurant/zurich",
12 "https://www.local.ch/de/s/pizza",
13 "https://www.local.ch/de/q/zuerich/restaurant",
14 "https://www.local.ch/de/q?what=restaurant&where=zuerich",
15 "https://www.local.ch/de/s/restaurant/zurich?page=2",
16 "https://www.local.ch/de/s/restaurant/zurich?sorting=rating",
17 "https://www.local.ch/de/d/zuerich/8004/restaurant/restaurant-milano-rPs42JlyMK6zuDlCzLm1MA",
18 "https://www.local.ch/de/d/rPs42JlyMK6zuDlCzLm1MA",
19 "https://www.local.ch/fr/s/restaurant/geneve",
20 "https://www.local.ch/en/q/zurich/restaurant",
21 "https://www.local.ch/de/s/restaurant/8001",
22 "https://www.local.ch/de/s/restaurant/zh",
23 "https://local.ch/de/s/restaurant/zurich",
24 "https://www.local.ch/de/entries/XlOM3DSqSoeHWjGtRZozEw/vcard",
25 ],
26 "maxPages": 0,
27 "maxListings": 20,
28 "proxy": {
29 "useApifyProxy": True,
30 "apifyProxyGroups": ["RESIDENTIAL"],
31 "apifyProxyCountry": "CH",
32 },
33 "incrementalMode": False,
34 "emitUnchanged": False,
35 "emitExpired": False,
36}
37
38
39run = client.actor("abotapi/local-ch-scraper").call(run_input=run_input)
40
41
42print(f"πΎ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
43for item in client.dataset(run.default_dataset_id).iterate_items():
44 print(item)
45
46