1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [{ "url": "https://www.hostelworld.com/hostels/europe/england/london/" }],
10 "propertyType": "hostel",
11 "currency": "GBP",
12 "language": "en",
13 "maxListings": 200,
14 "maxCitiesPerCountry": 25,
15 "maxReviewsPerProperty": 10,
16 "includeDetails": True,
17 "includeReviews": True,
18 "concurrency": 8,
19 "maxExpansionCountries": 10,
20 "maxCountryProbes": 20,
21 "maxRequestsPerCrawl": 0,
22 "proxy": { "useApifyProxy": False },
23}
24
25
26run = client.actor("ahmed_jasarevic/hostelworld-scraper").call(run_input=run_input)
27
28
29print(f"πΎ Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
30for item in client.dataset(run.default_dataset_id).iterate_items():
31 print(item)
32
33