1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "mode": "search",
10 "searchTerms": ["lego"],
11 "categoryId": "",
12 "sellerId": "",
13 "urls": [
14 "https://www.miravia.es/p/i1374428537687072.html",
15 "https://www.miravia.es/c/all/?q=lego",
16 "https://www.miravia.es/c/juegos-de-construccion-19131/?q=lego",
17 "https://www.miravia.es/kw/lego.html",
18 "https://www.miravia.es/shop/lego-official/",
19 ],
20 "fetchDetails": False,
21 "fetchReviews": False,
22 "maxReviews": 20,
23 "maxItems": 20,
24 "proxy": {
25 "useApifyProxy": True,
26 "apifyProxyGroups": ["RESIDENTIAL"],
27 },
28 "incrementalMode": False,
29 "emitUnchanged": False,
30 "emitExpired": False,
31 "ignoreFieldsForChanges": [],
32}
33
34
35run = client.actor("abotapi/miravia-es-scraper").call(run_input=run_input)
36
37
38print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
39for item in client.dataset(run.default_dataset_id).iterate_items():
40 print(item)
41
42