It is currently March 29th, 2024, 1:02 pm

Yahoo Weather

Tips and Tricks from the Rainmeter Community
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Yahoo Weather

Post by jsmorley »

Weather.com

It looks like Weather.com may have finally (after warning that they would do so for years) killed the XML weather feed that was based on a URL like:

[Variables]
LocationCode=USOK0369
UnitOfMeasure=f
DaysForecast=3

URL=http://xml.weather.com/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=#DaysForecast#

That no longer works as of this writing. However, it appears that an alternative URL, like:

URL=http://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=#DaysForecast#

Will work, and seems to return the same data as the old xml.weather.com URL. So in theory, you should be able to just change the URL in your skin(s) and get things working again.

However

I would not particularly count on this lasting forever though. Weather.com really has no further interest in providing "free" feeds of their data, but would like everyone to "subscribe" to an API-based solution that they can monetize. There are rumors that even the alternative URL might be shutdown or restricted. Might have a limit on the number of times it can be accessed in a day, or restricted to some locations based on IP but not others, or who knows what. It might not be a terrible idea to at least start thinking about alternatives, like Yahoo Weather or Weather Underground or various other weather sources.

Yahoo Weather Feed

Code: Select all

[Variables]
; Weather variables
;http://weather.yahooapis.com/forecastrss?w=2378074&u=f
; You MUST set the Location variable to the Yahoo WOEID code for your location.
; Go to: http://woeid.rosselliot.co.nz/
; Enter your city, state, region, country as needed to get your WOEID.
; Change the Location variable below.
Location=23418210
; Unit is "f" for Fahrenheit temperature and other "imperial" measures, "c" for Celsius temperature and "metric" measures.
; This is case-sensitive. Lower case only.
Unit=f

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser.dll
URL=http://weather.yahooapis.com/forecastrss?w=#Location#&u=#Unit#
RegExp=(?siU)<title>.*- (.*)</title>.*<link>(.*)/\*(.*)</link>.*<description>(.*)</description>.*<language>(.*)</language>.*<lastBuildDate>(.*)</lastBuildDate>.*<yweather:location city="(.*)".*region="(.*)".*country="(.*)".*<yweather:units temperature="(.*)".*distance="(.*)".* pressure="(.*)".*speed="(.*)".*<yweather:wind chill="(.*)".*direction="(.*)".*speed="(.*)".*<yweather:atmosphere humidity="(.*)".* visibility="(.*)".*pressure="(.*)".* rising="(.*)".*<yweather:astronomy sunrise="(.*)".*sunset="(.*)".*<title>(.*)</title>.*<width>(.*)</width>.*<height>(.*)</height>.*<link>(.*)</link>.*<url>(.*)</url>.*<title>(.*)</title>.*<geo:lat>(.*)</geo:lat>.*<geo:long>(.*)</geo:long>.*<link>(.*)/\*(.*)</link>.*<pubDate>(.*)</pubDate>.*<yweather:condition  text="(.*)".*code="(.*)".*temp="(.*)".*date="(.*)".*<img src="(.*)".*Current Conditions:</b><br />\s(.*)<BR />.*Forecast:</b><BR />\s(.*)<br />.*\s(.*)<br />.*<a href="(.*)/\*(.*)">.*provided by <a href="(.*)" >(.*)</a>.*<yweather:forecast day="(.*)".*date="(.*)".*low="(.*)".*high="(.*)".*text="(.*)".*code="(.*)".*<yweather:forecast day="(.*)".*date="(.*)".*low="(.*)".*high="(.*)".*text="(.*)".*code="(.*)".*
That RegExp will return virtually every piece of useful information from the feed for the current conditions, today's forecast, and tomorrow's forecast.

Here are the icons I use. You don't need to use the same ones, but be sure the numbers of the icons you use visually matches what these represent.

YahooWeather.zip

Code: Select all

0	tornado
1	tropical storm
2	hurricane
3	severe thunderstorms
4	thunderstorms
5	mixed rain and snow
6	mixed rain and sleet
7	mixed snow and sleet
8	freezing drizzle
9	drizzle
10	freezing rain
11	showers
12	showers
13	snow flurries
14	light snow showers
15	blowing snow
16	snow
17	hail
18	sleet
19	dust
20	foggy
21	haze
22	smoky
23	blustery
24	windy
25	cold
26	cloudy
27	mostly cloudy (night)
28	mostly cloudy (day)
29	partly cloudy (night)
30	partly cloudy (day)
31	clear (night)
32	sunny
33	fair (night)
34	fair (day)
35	mixed rain and hail
36	hot
37	isolated thunderstorms
38	scattered thunderstorms
39	scattered thunderstorms
40	scattered showers
41	heavy snow
42	scattered snow showers
43	heavy snow
44	partly cloudy
45	thundershowers
46	snow showers
47	isolated thundershowers
Vauxyte
Posts: 4
Joined: August 1st, 2015, 12:56 am

Re: Yahoo Weather

Post by Vauxyte »

Well see how it goes. :)
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Yahoo Weather

Post by jsmorley »

Tiffany
Posts: 7
Joined: November 17th, 2015, 2:12 pm

Re: Yahoo Weather

Post by Tiffany »

Could you show me the code I need to update this?:

Code: Select all

;[Variables]
Location=USOK0369
Metric=f
Font=Century Gothic
FontColor=255, 255, 255, 255
FontInactive=255, 255, 255, 200
UpdateFreq=1800
YGap=55

;===============================================================

;[GATHER WEATHER INFO FROM RSS]=================================

[Current]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*"

[Today]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[Tomorrow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[DayAfter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
Here's the full XML if that wasn't enough...

Code: Select all

;[BEGIN CONFIG FILE]==============================

[Rainmeter]
Author=Jeffrey Morley, modified by Shiva

;==============================================================
;Please replace your location code for Weather.com below
;Set "Metric=" to m for metric measures or f for non-metric
;==============================================================

;Metadata added by RainBrowser
;http://rainmeter.net/RainCMS/?q=Rainmeter101_AnatomyOfASkin

[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

;[Variables]
Location=USOK0369
Metric=f
Font=Century Gothic
FontColor=255, 255, 255, 255
FontInactive=255, 255, 255, 200
UpdateFreq=1800
YGap=55

;===============================================================

;[GATHER WEATHER INFO FROM RSS]=================================

[Current]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*"

[Today]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[Tomorrow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[DayAfter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
Url=http://xml.weather.com/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

;[Current]=========================================

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=17

[MeasureWeatherDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=19
Substitute=" And ":" and ","Lgt.":"Light ","Snow/":"Snow & "

[MeasureWeatherIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=20

[MeasureWeatherRealFeel]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Current]
StringIndex=18

;[TODAY]=====================================


[MeasureWeatherDesc1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=9
Substitute=" And ":" and "

[MeasureWeatherDay1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=2

[MeasureWeatherTemp1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=4

[MeasureWeatherIcon1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=8
Substitute="":"666"

[CheckNATemp]
Measure=Calc
Formula=[MeasureWeatherIcon1]
IfBelowValue=665
IfBelowAction=!execute [!RainmeterHideMeter MeterNightTemp1][!RainmeterHideMeter MeterNightDay1][!RainmeterHideMeter MeterNightDesc1][!RainmeterHideMeter MeterNightIcon1][!RainmeterShowMeter MeterTemp1][!RainmeterShowMeter MeterDay1][!RainmeterShowMeter MeterDesc1][!RainmeterShowMeter MeterIcon1]
IfEqualValue=666
IfEqualAction=!execute [!RainmeterHideMeter MeterTemp1][!RainmeterHideMeter MeterDay1][!RainmeterHideMeter MeterDesc1][!RainmeterHideMeter MeterIcon1][!RainmeterShowMeter MeterNightTemp1][!RainmeterShowMeter MeterNightDay1][!RainmeterShowMeter MeterNightDesc1][!RainmeterShowMeter MeterNightIcon1]
DynamicVariables=1

;[TONIGHT]=====================================


[MeasureWeatherNightDesc]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=18
Substitute=" And ":" and "

[MeasureWeatherNightTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=5

[MeasureWeatherNightIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Today]
StringIndex=17

;[TOMORROW]=====================================

[MeasureWeatherDesc2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=8
Substitute=" And ":" and "

[MeasureWeatherDay2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=1

[MeasureWeatherTemp2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=3

[MeasureWeatherIcon2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Tomorrow]
StringIndex=7

;[DayAfter]=====================================

[MeasureWeatherDesc3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=8
Substitute=" And ":" and "

[MeasureWeatherDay3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=1

[MeasureWeatherTemp3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=3

;D+3, weather icon, id=38
[MeasureWeatherIcon3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[DayAfter]
StringIndex=7

;[DISPLAY CURRENT]=================================

[MeterTemp]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=500
Y=5
FontColor=#FontColor#
StringStyle=NORMAL
FontSize=36
StringAlign=RIGHT
StringEffect=Shadow
FontFace=#Font#
Antialias=1
Postfix="°"

[MeterDesc]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=-103r
Y=5r
FontColor=#FontColor#
FontSize=18
StringAlign=RIGHT
StringStyle=NORMAL
StringEffect=Shadow
FontFace=#Font#
Antialias=1

[MeterRealFeel]
MeasureName=MeasureWeatherRealFeel
Meter=STRING
X=r
Y=29r
FontColor=#FontColor#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
StringEffect=Shadow
FontFace=#Font#
Antialias=1
Text="Feels like %1°"

[MeterIconNA]
ImageName=na.png
Meter=IMAGE
H=30
W=30
X=105r
Y=-9r
Hidden=1

[MeterIcon]
MeasureName=MeasureWeatherIcon
Meter=IMAGE
H=70
W=70
X=r
Y=-27r
Hidden=0

;[DISPLAY TODAY]=============================

[MeterTemp1]
MeasureName=MeasureWeatherTemp1
Meter=STRING
X=-4r
Y=70r
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=30
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow
Hidden=0

[MeterDay1]
;MeasureName=MeasureWeatherDay1
Meter=STRING
X=-86r
Y=5r
FontColor=#FontInactive#
FontSize=14
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Text="Today"
Antialias=1
StringEffect=Shadow
Hidden=0

[MeterDesc1]
MeasureName=MeasureWeatherDesc1
Meter=STRING
X=r
Y=20r
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow
Hidden=0

[MeterIcon1]
MeasureName=MeasureWeatherIcon1
Meter=IMAGE
H=50
W=50
X=100r
Y=-25r
Hidden=0

[MeterReset]
Meter=STRING
X=-10r
Y=r

[MeterNightTemp1]
MeasureName=MeasureWeatherNightTemp
Meter=STRING
X=-4r
Y=r
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=30
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow
Hidden=1

[MeterNightDay1]
;MeasureName=MeasureWeatherDay1
Meter=STRING
X=-86r
Y=5r
FontColor=#FontInactive#
FontSize=14
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Text="Tonight"
Antialias=1
StringEffect=Shadow
Hidden=1

[MeterNightDesc1]
MeasureName=MeasureWeatherNightDesc
Meter=STRING
X=r
Y=20r
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow
Hidden=1

[MeterNightIcon1]
MeasureName=MeasureWeatherNightIcon
Meter=IMAGE
H=50
W=50
X=100r
Y=-25r
Hidden=1

;[DISPLAY TOMORROW]=============================

[MeterTemp2]
MeasureName=MeasureWeatherTemp2
Meter=STRING
X=-14r
Y=#YGap#r
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=30
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow

[MeterDay2]
;MeasureName=MeasureWeatherDay2
Meter=STRING
X=-86r
Y=5r
FontColor=#FontInactive#
FontSize=14
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Text="Tomorrow"
Antialias=1
StringEffect=Shadow

[MeterDesc2]
MeasureName=MeasureWeatherDesc2
Meter=STRING
X=r
Y=20r
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow

[MeterIcon2]
MeasureName=MeasureWeatherIcon2
Meter=IMAGE
H=50
W=50
X=100r
Y=-25r

;[DISPLAY DAY AFTER]=============================

[MeterTemp3]
MeasureName=MeasureWeatherTemp3
Meter=STRING
X=-14r
Y=#YGap#r
FontColor=#FontInactive#
StringStyle=NORMAL
FontSize=30
StringAlign=RIGHT
FontFace=#Font#
Antialias=1
Postfix="°"
StringEffect=Shadow

[MeterDay3]
MeasureName=MeasureWeatherDay3
Meter=STRING
X=-86r
Y=5r
FontColor=#FontInactive#
FontSize=14
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow

[MeterDesc3]
MeasureName=MeasureWeatherDesc3
Meter=STRING
X=r
Y=20r
FontColor=#FontInactive#
FontSize=10
StringAlign=RIGHT
StringStyle=NORMAL
FontFace=#Font#
Antialias=1
StringEffect=Shadow

[MeterIcon3]
MeasureName=MeasureWeatherIcon3
Meter=IMAGE
H=50
W=50
X=100r
Y=-25r
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Yahoo Weather

Post by jsmorley »

Tiffany wrote:Could you show me the code I need to update this?:
Not sure I see any need to update this to Yahoo Weather unless you really want to. Just use the correct URL for Weather.com.

http://xml.weather.com is dead... long live http://wxdata.weather.com/wxdata

Code: Select all

[Variables]
Location=USOK0369
Metric=f
Font=Century Gothic
FontColor=255, 255, 255, 255
FontInactive=255, 255, 255, 200
UpdateFreq=1800
YGap=55

;===============================================================

;[GATHER WEATHER INFO FROM RSS]=================================

[Current]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
URL=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Metric#&dayf=0
RegExp="(?siU).*<locale>(.*)</locale>.*<ut>(.*)</ut>.*<ud>(.*)</ud>.*<us>(.*)</us>.*<up>(.*)</up>.*<ur>(.*)</ur>.*<loc id="(.*)">.*<dnam>(.*)</dnam>.*<tm>(.*)</tm>.*<lat>(.*)</lat>.*<lon>(.*)</lon>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<zone>(.*)</zone>.*<cc>.*<lsup>(.*)</lsup>.*<obst>(.*)</obst>.*<tmp>(.*)</tmp>.*<flik>(.*)</flik>.*<t>(.*)</t>.*<icon>(.*)</icon>.*<bar>.*<r>(.*)</r>.*<d>(.*)</d>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<vis>(.*)</vis>.*<uv>.*<i>(.*)</i>.*<t>(.*)</t>.*<dewp>(.*)</dewp>.*<moon>.*<icon>(.*)</icon>.*<t>(.*)</t>.*"

[Today]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
URL=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Metric#&dayf=1
RegExp="(?siU)<dayf>.*<lsup>(.*)</lsup>.*<day d="0" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[Tomorrow]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
URL=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Metric#&dayf=2
RegExp="(?siU)<day d="1" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"

[DayAfter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=#UpdateFreq#
URL=http://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Metric#&dayf=3
RegExp="(?siU)<day d="2" t="(.*)" dt="(.*)".*<hi>(.*)</hi>.*<low>(.*)</low>.*<sunr>(.*)</sunr>.*<suns>(.*)</suns>.*<part p="d">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*<part p="n">.*<icon>(.*)</icon>.*<t>(.*)</t>.*<wind>.*<s>(.*)</s>.*<gust>(.*)</gust>.*<d>(.*)</d>.*<t>(.*)</t>.*<bt>(.*)</bt>.*<ppcp>(.*)</ppcp>.*<hmid>(.*)</hmid>.*"
1.jpg
You do not have the required permissions to view the files attached to this post.
Tiffany
Posts: 7
Joined: November 17th, 2015, 2:12 pm

Re: Yahoo Weather

Post by Tiffany »

Thank you!!