It is currently March 29th, 2024, 3:39 pm

Yahoo.com - weather.com alternative

Weather skins
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Yahoo.com - weather.com alternative

Post by SilverAzide »

Hi ET!
I have created an alternative Weather Meter skin for my Gadgets that uses your Yahoo template and all seemed well. But I got a report from a user in France that it was not working, and he mentioned he is using the French version of the Yahoo News Weather site. I didn't even know there was one and didn't even see a way to get to it. He posted the URL he is using and, sure enough, the regexp is failing.

https://fr.news.yahoo.com/meteo/france/bourgogne/migennes-12728152

The only benefit (that I can see) of this site over the US one is the weather conditions text, wind direction (?), and moon phase name is in French. All the other numeric data seems pretty much the same. Is the template working for non-US URLs?
Gadgets Wiki GitHub More Gadgets...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ⭐ Yahoo.com - weather.com alternative

Post by eclectic-tech »

SilverAzide wrote: June 5th, 2020, 6:13 pm Hi ET!
I have created an alternative Weather Meter skin for my Gadgets that uses your Yahoo template and all seemed well. But I got a report from a user in France that it was not working, and he mentioned he is using the French version of the Yahoo News Weather site. I didn't even know there was one and didn't even see a way to get to it. He posted the URL he is using and, sure enough, the regexp is failing.

https://fr.news.yahoo.com/meteo/france/bourgogne/migennes-12728152

The only benefit (that I can see) of this site over the US one is the weather conditions text, wind direction (?), and moon phase name is in French. All the other numeric data seems pretty much the same. Is the template working for non-US URLs?
That's news to me too... I wasn't aware of how to get the page in other languages, so I will have to check that out. The template will probably not work for foreign languages as it is; I will look at that link and see what can be done.

Thanks for making me aware of this. :great:

ADDENDUM: The skin is designed to work with English language sites and Imperial values. All conversion to Metric values are done in the skin, and translations are done by editing the language variables in "YahooComLanguage.inc"

If you use a foreign language URL, the skin will not work. I do not intend to try to convert it for every possible language.

In regard to the referenced site for Migennis France, the user should use the English version URL:
https://www.yahoo.com/news/weather/france/migennes/migennes-611485
Then do the conversion to metric using the context menu and set the translations by editing YahooComLanguage.inc
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: ⭐ Yahoo.com - weather.com alternative

Post by SilverAzide »

eclectic-tech wrote: June 6th, 2020, 2:58 am That's news to me too... I wasn't aware of how to get the page in other languages, so I will have to check that out. The template will probably not work for foreign languages as it is; I will look at that link and see what can be done.
It looks like Yahoo has tinkered with their JSON data too. This template is now broken as well... :(
https://forum.rainmeter.net/viewtopic.php?f=4&t=35445

EDIT: OK, missing data is now back and the template is working again. False alarm?
Last edited by SilverAzide on June 8th, 2020, 9:37 pm, edited 1 time in total.
Gadgets Wiki GitHub More Gadgets...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ⭐ Yahoo.com - weather.com alternative

Post by eclectic-tech »

SilverAzide wrote: June 8th, 2020, 11:26 am It looks like Yahoo has tinkered with their JSON data too. This template is now broken as well... :(
https://forum.rainmeter.net/viewtopic.php?f=4&t=35445

EDIT: OK, missing data is now back and the template is working again. False alarm?
Yes, mine quit working earlier today, but now it seems Yahoo made a correction... so everything is working again (FOR NOW!).
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ⭐ Yahoo.com - weather.com alternative

Post by mak_kawa »

Hi eclectic-tech and all

I have made RegExp to capture hourly forecast from the JSON part of the Yahoo weather feed. Possibly they are not included in eclectic-tech's code, am I right? If this is somewhere already, ignore this post, sorry.

Code: Select all

[Variables]

ForecastHourHead=(?siU).*"forecasts":{"hourly".*
ForecastHourSkip="barometricPressure".*
ForecastHourRepeat="barometricPressure":(.*),"conditionCode":(.*),.*"conditionDescription":"(.*)",.*"temperature":{"now":(.*),.*"timestamp":"(.*):00\.000Z.*"precipitationProbability":(.*),.*"windDirectionCode":"(.*)","windSpeed":(.*),.*
ForecastHourRepeatConditional=(?(?=.*"barometricPressure").*"barometricPressure":(.*),"conditionCode":(.*),.*"conditionDescription":"(.*)",.*"temperature":{"now":(.*),.*"timestamp":"(.*):00\.000Z.*"precipitationProbability":(.*),.*"windDirectionCode":"(.*)","windSpeed":(.*),).*

- RegExp for 1st 8 captures
Forecast24HourRegExp1=#ForecastHourHead##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat#

- RegExp for 2nd 8 captures
Forecast24HourRegExp2=#ForecastHourHead##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat##ForecastHourRepeat#

- RegExp for 3rd 8 conditional captures
Forecast24HourRegExp3rd=#ForecastHourHead##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourSkip##ForecastHourRepeatConditional##ForecastHourRepeatConditional##ForecastHourRepeatConditional##ForecastHourRepeatConditional##ForecastHourRepeatConditional##ForecastHourRepeatConditional##ForecastHourRepeatConditional##ForecastHourRepeatConditional#
Captured items are eight as... barometer, weather icon code, weather description, temperature, time stamp, precipitation probability, wind direction and speed.

The hourly forecasts are of next 24 hours, but I omitted last 25th data with no reason... even number is rather comfortable for me. :-)

By the reason I don't know, sometimes there are only 22 hours forecasts in the JSON data. So, I use "conditional capture" in the 3rd capture.
And needless to say, due to the "99 captures limit" of the WebParser measure, captures are divided to three measures (8x8x3) with a margin.

This capture does work well for me, but some mistakes might be in the above RegExps. If so, sorry.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ⭐ Yahoo.com - weather.com alternative

Post by mak_kawa »

BTW, Yahoo barometer reports the values about 15 hPa lower than those of other weather sites as Weather.com, OpenWeatherMap, AccuWeather and Weatherbit, at least for my location.
For example, currently Yahoo's value is 984.8 hPa, but Weather.com , AccuWeather and OpenWeatherMap as 1000.5 or so, Weatherbit as 996.8. How about your location?

Elevation of my location is about 55 m, so I think "sea-level correction" (ca. 12 hPa/100m) does not matter in this case, but I am not sure.

I now arbitrarily add extra 15 hPa to Yahoo's value in my skin with no logical ground. :-)

Ps.: I noticed that the Yahoo weather mobile site reports almost the same hPa as other sites, extra -15 hPa not present. Possibly this issue is on the site for desktop device (=PC)...?!
Last edited by mak_kawa on June 15th, 2020, 8:59 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ⭐ Yahoo.com - weather.com alternative

Post by eclectic-tech »

Thanks for the additions mak_kawa! :rosegift:

I intentionally did not parse the hourly :uhuh:, but some users may want to include your version.

Interesting difference concerning the pressure... I haven't compared readings, but will look into options to get these values to match the other sites; your "fix" will work fine for now. Good catch! :thumbup:
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: ⭐ Yahoo.com - weather.com alternative

Post by mak_kawa »

Hi eclectic-tech

Honestly, I am not confident whether such hourly forecasts are reliable or not, especially for the country other than US, but just fun. :-)

BTW, from my experience, the hourly forecasts of the Weather.com rather reflect actual conditions for my location (somewhere in East Asia), so usable in a sense... but Yahoo is...?!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ⭐ Yahoo.com - weather.com alternative

Post by eclectic-tech »

mak_kawa wrote: June 15th, 2020, 10:18 pm Hi eclectic-tech

Honestly, I am not confident whether such hourly forecasts are reliable or not, especially for the country other than US, but just fun. :-)

BTW, from my experience, the hourly forecasts of the Weather.com rather reflect actual conditions for my location (somewhere in East Asia), so usable in a sense... but Yahoo is...?!
I agree "Yahoo is...?!"

I created this as an alternative weather source while TWC was going through "convulsions"...
It does not compare favorably with skins based on weather.com:
it updates once an hour, it is not always 100% accurate, it gives you weather, but not the finer details available elsewhere. :uhuh:
gator
Posts: 14
Joined: May 29th, 2020, 3:35 pm

Re: Yahoo.com - weather.com alternative

Post by gator »

I enjoy having this skin as a backup in the event the Weather.com skin stops working, but this skin stopped working for me yesterday.