made it work
This commit is contained in:
parent
4a7ed4c738
commit
e1af380c26
|
@ -16,7 +16,7 @@ class output:
|
|||
pass
|
||||
|
||||
args = parser.parse_args(namespace=output)
|
||||
zip = output.url
|
||||
zip = output.ZIP
|
||||
|
||||
response = requests.get(url = "http://api.openweathermap.org/geo/1.0/zip?zip=" + zip + ",US&appid=470cdb622a085c754b7cad56ec455072")
|
||||
data = response.json()
|
||||
|
@ -27,7 +27,7 @@ lat = str(data['lat'])
|
|||
response2 = requests.get(url = "https://api.openweathermap.org/data/2.5/weather?lat=" + lat + "&lon=" + lon + "&appid=470cdb622a085c754b7cad56ec455072")
|
||||
data2 = response2.json()
|
||||
|
||||
current_temp = ktof(data2['main']['temp'])
|
||||
current_temp = str(ktof(data2['main']['temp']))
|
||||
max_temp = ktof(data2['main']['temp_max'])
|
||||
min_temp = ktof(data2['main']['temp_min'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue