Recently Yahoo updated how you can access their weather API. Instead of the
previous free-for-all you now need to have a whitelisted app and authenticate
with OAuth1 when requesting data.
As per the warning in the documentation:
Important EOL Notice: As of Thursday, Jan. 3, 2019, the weather.yahooapis.com
and query.yahooapis.com for Yahoo Weather API will be retired.
To continue using our free Yahoo Weather APIs, use
Follow below instructions to get credentials and onboard to this free Yahoo
Weather API service.
Yahoo have been kind enough to provide a Python example
showing how to request this data however it’s aimed at Python 2.7
Below I provide an example for Python 3.6+ (might work on previous versions, I’ve not tested)
Functionality is provided via the function
get_yahoo_weather which takes the parameters: