1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "start_urls": [{ "url": "https://www.pistonheads.com/buy/search?distance=20&make-id=2247&mileage=15000&mileage=30000&offset=32&price=9000&price=10000&transmission=MAN&year=2021&year=2025" }] }
9
10
11run = client.actor("fayoussef/pistonheads").call(run_input=run_input)
12
13
14print("πΎ Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
15for item in client.dataset(run["defaultDatasetId"]).iterate_items():
16 print(item)
17
18