1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "urls": ["https://www.michaels.com/search?q=4+x+6&sortBy=Price%3A+High+to+Low&minRating=4&pmin=20&pmax=50&ways=Sale"],
10 "ignore_url_failures": True,
11 "on_sale": False,
12 "max_items_per_url": 20,
13 "proxy": {
14 "useApifyProxy": True,
15 "apifyProxyGroups": ["RESIDENTIAL"],
16 "apifyProxyCountry": "US",
17 },
18 "include_raw_data": False,
19}
20
21
22run = client.actor("stealth_mode/michaels-product-search-scraper").call(run_input=run_input)
23
24
25print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
26for item in client.dataset(run.default_dataset_id).iterate_items():
27 print(item)
28
29