1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "zipcode": "80335",
10 "keywords": [
11 "tasche",
12 "handcreme",
13 "haarspray",
14 ],
15 "maxItems": 20,
16 "endPage": 1,
17 "startUrls": [
18 "https://www.dm.de/balea-gesichtshaarentferner-p4067796182026.html",
19 "https://www.dm.de/pflege-und-parfum",
20 "https://www.dm.de/pflege-und-parfum?allCategories.id0=020000&pageSize0=10&sort0=editorial_relevance¤tPage0=2",
21 "https://www.dm.de/search?query=tasche&searchProviderType=dm-products",
22 "https://www.dm.de/search?query=tasche&searchProviderType=dm-products¤tPage=1&loadPrev=false",
23 ],
24 "customMapFunction": "(object) => { return {...object} }",
25 "proxy": { "useApifyProxy": True },
26}
27
28
29run = client.actor("epctex/dm-scraper").call(run_input=run_input)
30
31
32print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
33for item in client.dataset(run["defaultDatasetId"]).iterate_items():
34 print(item)
35
36