Forwarded from Abdukarimov Asadulloh
Media is too big
VIEW IN TELEGRAM
Forwarded from Jonibek Yorqulov
Forwarded from Qudrat Negmatov
2023-10-16 20-11-55.zip
593.6 MB
Forwarded from Qudrat Negmatov
2023-10-18 20-14-27.zip
223.9 MB
Forwarded from Qudrat Negmatov
2023-10-18 21-07-33.zip
309.1 MB
import requests
location=input("Location: ")
url =f"https://forecast9.p.rapidapi.com/rapidapi/forecast/{location}/hourly/"
headers = {
"X-RapidAPI-Key": "b28d488546msh0f1b2b9a5278871p1c7fd2jsn3a6674899878",
"X-RapidAPI-Host": "forecast9.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
result=response.json().get('forecast').get('items')
for info in result:
date=info.get('date', '')
temp=info.get('temperature')['avg']
wind=f"{info.get('wind').get('avg')} {info.get('wind')['unit']}"
print(f"{date} Temp:{temp} gradus wind:{wind}")
location=input("Location: ")
url =f"https://forecast9.p.rapidapi.com/rapidapi/forecast/{location}/hourly/"
headers = {
"X-RapidAPI-Key": "b28d488546msh0f1b2b9a5278871p1c7fd2jsn3a6674899878",
"X-RapidAPI-Host": "forecast9.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
result=response.json().get('forecast').get('items')
for info in result:
date=info.get('date', '')
temp=info.get('temperature')['avg']
wind=f"{info.get('wind').get('avg')} {info.get('wind')['unit']}"
print(f"{date} Temp:{temp} gradus wind:{wind}")