It is currently October 27th, 2020, 3:17 am

Rain.ini no longer working - no Precip in Yahoo response

Help with creating, editing & fixing problems with skins
tommasz
Posts: 7
Joined: January 14th, 2010, 2:40 pm

Rain.ini no longer working - no Precip in Yahoo response

Post by tommasz »

I noticed recently that Rain.ini no longer displays the chance of precipitation although MoxaWeather.ini works fine. I grabbed the response from the Yahoo weather server and there's no Precipitation value included. Is there a different URL other than http://weather.yahooapis.com/forecastrss?p=#WeatherCode# that has this?
jdisk
Posts: 2
Joined: January 19th, 2010, 9:28 pm

Re: Rain.ini no longer working - no Precip in Yahoo response

Post by jdisk »

You might want to try and change the following entries in the rain.ini file

Code: Select all

;; Original: 
;Url=http://www.weather.com/outlook/travel/businesstraveler/local/#WeatherCode#
;RegExp="(?siU)Precip:.*align=\"left\">(.*)%"
;; new: works as of jan 19, 2010
Url=http://xhtml.weather.com/xhtml/hbhf/#WeatherCode#
RegExp="Precip:[\n\s]*([0-9]*.*)%"
No guarantees, but it works for me (and for now).
tommasz
Posts: 7
Joined: January 14th, 2010, 2:40 pm

Re: Rain.ini no longer working - no Precip in Yahoo response

Post by tommasz »

That works for me, too! Thanks. I guess there's always some risk in scraping a website versus a real API.
User avatar
sadMicrowave
Posts: 2
Joined: March 30th, 2010, 12:36 pm

Re: Rain.ini no longer working - no Precip in Yahoo response

Post by sadMicrowave »

This fix works great! Thanks!
martyrfc
Posts: 5
Joined: April 1st, 2010, 11:41 am

Re: Rain.ini no longer working - no Precip in Yahoo response

Post by martyrfc »

i done this and it worked last night, woke up this morning and it doesnt, same with the weather in tranquil, got me puzzled
ticotexas
Posts: 1
Joined: July 27th, 2010, 1:16 am

Re: Rain.ini no longer working - no Precip in Yahoo response

Post by ticotexas »

instead of rainfall probability in percentage, how would you write a regexp to extract the rainfall in inches?

for instance, Past 24-hr: Precip: 0.## in (est.) on this url
http://www.weather.com/weather/today/Spicewood+TX+USTX1288

i'm a newbie and can't seem to figure it out. thanks
User avatar
Chewtoy
Moderator
Posts: 1010
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Rain.ini no longer working - no Precip in Yahoo response

Post by Chewtoy »

ticotexas wrote:instead of rainfall probability in percentage, how would you write a regexp to extract the rainfall in inches?

for instance, Past 24-hr: Precip: 0.## in (est.) on this url
http://www.weather.com/weather/today/Spicewood+TX+USTX1288

i'm a newbie and can't seem to figure it out. thanks
If you can find anywhere where they would post that information, it might be parsed.
But as far as I can see, they don't.
I don't think, therefore I'm not.