It is currently November 30th, 2020, 11:01 pm

Yahoo.com - weather.com alternative

Our most popular Tips and Tricks from the Rainmeter Team and others
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4192
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: ⭐ Yahoo.com - weather.com alternative

Post by eclectic-tech »

Raidian wrote: June 4th, 2020, 5:43 pm Is there anyway to get this borderless? Thanks!
Set 'StrokeWidth' in [MeterAllBackground] to zero.

Code: Select all

[MeterAllBackground]
Meter=Shape
Shape=Rectangle 0.5,0.5,169,334,12 | Fill Color #BackgroundColor# | StrokeWidth 0 | Stroke Color #FrameColor#
X=0
W=170
H=335
Refresh the skin.
User avatar
SilverAzide
Posts: 1017
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: 4192
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
Posts: 1017
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...
dvo
Posts: 1036
Joined: February 7th, 2016, 6:08 am

Re: ⭐ Yahoo.com - weather.com alternative

Post by dvo »

same here today seems to be broken... other days work still strange date januari 1 1601 simulair as weather.com had with me ...
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4192
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: 905
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: 905
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: 4192
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: 905
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...?!