1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "startUrls": [
10 { "url": "https://weather.com/weather/today/l/5aea1d50a6d6b9e99cf89ba79f463d67dcf21ea5061990aae1ffc1c7fa8911a9" },
11 { "url": "https://weather.com/weather/today/l/ada030b2de8db495da2d93d5a2ecf30de1ce8b54cb09725d19c803543685646d" },
12 ],
13 "locations": [
14 "Montgomery, Alabama",
15 "Juneau, Alaska",
16 ],
17 "locationIds": [
18 "e60256f3426acd3c1b3380921210fcffeab628a120c41d1de03b59a0f0dd32ad",
19 "bf217d537cc1c8074ec195ce07fb74de3c1593caa6033b7c3be4645ccc5b01de",
20 ],
21 "timeFrame": "today",
22 "units": "imperial",
23 "maxItems": 10,
24 "proxyConfiguration": { "useApifyProxy": True },
25 "extendOutputFunction": "($) => { return {} }",
26 "customMapFunction": "(object) => { return {...object} }",
27}
28
29
30run = client.actor("epctex/weather-scraper").call(run_input=run_input)
31
32
33print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
34for item in client.dataset(run["defaultDatasetId"]).iterate_items():
35 print(item)
36
37