1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "searchTerms": ["cashmere jumper"],
10 "urls": [
11 "https://www.marksandspencer.com/pure-cashmere-crew-neck-jumper/p/clp61223565",
12 "https://www.marksandspencer.com/pure-cashmere-crew-neck-jumper/p/clp61223565?color=NAVY",
13 "https://www.marksandspencer.com/search?searchTerm=cashmere+jumper",
14 "https://www.marksandspencer.com/search?searchTerm=cashmere+jumper&page=2",
15 "https://www.marksandspencer.com/search?searchTerm=cashmere+jumper&sort=PRICE_LOW_TO_HIGH",
16 "https://www.marksandspencer.com/search?searchTerm=jumper&department=Womens",
17 "https://www.marksandspencer.com/l/women/knitwear",
18 "https://www.marksandspencer.com/l/women/knitwear/jumpers",
19 "https://www.marksandspencer.com/l/women/knitwear?page=2",
20 "https://www.marksandspencer.com/l/women/knitwear?department=Womens&sort=NEW",
21 "https://www.marksandspencer.com/l/brands/jaeger/womens",
22 "https://marksandspencer.com/l/women/knitwear",
23 ],
24 "proxy": { "useApifyProxy": True },
25}
26
27
28run = client.actor("abotapi/marksandspencer-scraper").call(run_input=run_input)
29
30
31print(f"๐พ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
32for item in client.dataset(run.default_dataset_id).iterate_items():
33 print(item)
34
35