HumbleNewTabPage icon indicating copy to clipboard operation
HumbleNewTabPage copied to clipboard

Weather not working due to Yahoo API changes

Open jest opened this issue 6 years ago • 9 comments

According to https://developer.yahoo.com/weather/:

As of Thursday, Jan. 3, 2019, the weather.yahooapis.com and query.yahooapis.com for Yahoo Weather API will be retired.

My DNS no longer resolve query.yahooapis.com anymore. Probably change to API usage must be implemented (including OAuth authentication?)

jest avatar Jan 04 '19 10:01 jest

Same here on 3 PC's. It started some hours ago.

mike2nl avatar Jan 04 '19 14:01 mike2nl

@quodroc @jest Message on Yahoo site in red on top (https://developer.yahoo.com/weather/?guccounter=1):

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 https://weather-ydn-yql.media.yahoo.com/forecastrss. Contact [email protected] for credentials to onboard to this free Yahoo Weather API service.

must be changed here i think: Line 1304 in newtab.js var url = 'https://query.yahooapis.com/v1/public/yql?format=json&q=' + encodeURIComponent(query);

mike2nl avatar Jan 04 '19 14:01 mike2nl

It's not as simple as changing the URL. Even if I contact them for credentials, there are a few issues:

  • I need some way to look up the location id (woeid) from the city/country text the user types in (currently done using the now defunct YQL api)
  • OAuth authentication is a pain and requires a heavy javascript library
  • Even though the credentials are free, I would have no way of preventing anyone from stealing them and potentially getting my account banned
  • The forecastrss response is XML instead of JSON (not too big a deal)

I'm considering either removing the weather feature entirely (it's been nothing but trouble over the years, and not even very accurate), or switching to OpenWeatherMap which has a much nicer API.

ibillingsley avatar Jan 04 '19 20:01 ibillingsley

I'm considering either removing the weather feature entirely (it's been nothing but trouble over the years, and not even very accurate), or switching to OpenWeatherMap which has a much nicer API.

OWM also requires API key (https://openweathermap.org/faq#error401). I don't know how important it is to protect the key, but you can't do much as long as it is being visible in URL sent from the extension (e.g in "developer tools/network"). Yet, according to their FAQ:

For FOSS developers: we welcome free and open source software and are willing to help you. If you want to use OWM data in your free software application please register an API key and file a ticket describing your application and API key registered. OWM will review your request lift access limits for your key if used in open source application.

jest avatar Jan 04 '19 20:01 jest

OWM is available in JSON. Also, could you not have the user request their own API key? It's free and easy and would eliminate any limits on a single key. Also OWM can do locations in various forms including ZIP codes.

rpitera avatar Jan 22 '19 00:01 rpitera

Probably worth removing it until a decision is made, or at least putting some sort of notification to explain what is going on somewhere

atwright147 avatar Feb 06 '19 15:02 atwright147

Probably worth removing it until a decision is made, or at least putting some sort of notification to explain what is going on somewhere

I agree; there's a couple of components that could use some kind of a tag like that. USPS and FedEx sensors haven't worked in quite some time yet are still listed in the components section.

rpitera avatar Feb 06 '19 15:02 rpitera

@quodroc can we implement https://www.metaweather.com/api/ instead of Yahoo?

4doge avatar Feb 07 '19 16:02 4doge

I have disabled the weather feature for now. Will work on OpenWeatherMap support in the future. Metaweather looks interesting as well.

ibillingsley avatar Feb 10 '19 19:02 ibillingsley