Beforehand it didn't access the ['json'] parameter of the response so it always caught a KeyError, now it access that parameter to get the JSON data from the response of the request and returns the result.
I also improved the weather API URL to get the weather data of the moment the command was typed instead of forecast, so it can give real time information about the weather in Celsius and Fahrenheit with humidity. The message is usually 2 lines long.
Beforehand it didn't access the ['json'] parameter of the response so it always caught a KeyError, now it access that parameter to get the JSON data from the response of the request and returns the result. I also improved the weather API URL to get the weather data of the moment the command was typed instead of forecast, so it can give real time information about the weather in Celsius and Fahrenheit with humidity. The message is usually 2 lines long.