1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "search": "cucumber",
10 "startUrls": [
11 "https://www.allrecipes.com/cook/onewholesomemeal",
12 "https://www.allrecipes.com/cook/foodwisheswithchefjohn/collection/bookmarks_5e9f2dfb-c75b-8640-f3ff-7897a9ed3897",
13 "https://www.allrecipes.com/search/results/?search=cucumber",
14 "https://www.allrecipes.com/gallery/butter-rich-recipes/",
15 "https://www.allrecipes.com/author/melanie-fincher/",
16 "https://www.allrecipes.com/article/how-to-clean-air-fryer/",
17 "https://www.allrecipes.com/recipe/261911/chef-johns-croissants/",
18 ],
19 "maxItems": 20,
20 "endPage": 1,
21 "extendOutputFunction": "($) => { return {} }",
22 "customMapFunction": "(object) => { return {...object} }",
23 "proxy": { "useApifyProxy": True },
24}
25
26
27run = client.actor("epctex/allrecipes-advanced-scraper").call(run_input=run_input)
28
29
30print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
31for item in client.dataset(run["defaultDatasetId"]).iterate_items():
32 print(item)
33
34