0

Weather RSS with temperature only

Hi

According weather documentation in http://developer.yahoo.com/weather/, using a link like http://weather.yahooapis.com/forecastrss?p=94089&u=c, we should get an RSS response with lots of data like: humidity, wind direction and speed, etc. But XML file returned is very short of data, only temperature.

Should I try a different link to get all the information that comes in this documentation?

Regards

by
2 Replies
  • Hi Quim,

    That link does seem to bring back more extensive details about the weather in the actual feed. Visually what you see is just an HTML representation of the weather, but if you look at the source of the feed you'll see all of the data. When doing this, I see the following data:

    CODE
    <title>Yahoo! Weather - Sunnyvale, CA</title>
    <link>http://us.rd.yahoo.com/dailynews/rss/weather/Sunnyvale__CA/*http://weather.yahoo.com/forecast/USCA1116_c.html</link>
    <description>Yahoo! Weather for Sunnyvale, CA</description>
    <language>en-us</language>
    <lastBuildDate>Tue, 08 Sep 2009 9:56 am PDT</lastBuildDate>
    <ttl>60</ttl>
    <yweather:location city="Sunnyvale" region="CA" country="US"/>

    <yweather:units temperature="C" distance="km" pressure="mb" speed="kph"/>
    <yweather:wind chill="18" direction="350" speed="4.83" />
    <yweather:atmosphere humidity="61" visibility="16.09" pressure="1012.2" rising="0" />
    <yweather:astronomy sunrise="6:44 am" sunset="7:26 pm"/>
    <image>
    <title>Yahoo! Weather</title>
    <width>142</width>
    <height>18</height>
    <link>http://weather.yahoo.com</link>
    <url>http://l.yimg.com/a/i/us/nws/th/main_142b.gif</url>
    </image>
    <item>

    <title>Conditions for Sunnyvale, CA at 9:56 am PDT</title>
    <geo:lat>37.39</geo:lat>
    <geo:long>-122.03</geo:long>
    <link>http://us.rd.yahoo.com/dailynews/rss/weather/Sunnyvale__CA/*http://weather.yahoo.com/forecast/USCA1116_c.html</link>
    <pubDate>Tue, 08 Sep 2009 9:56 am PDT</pubDate>
    <yweather:condition text="Fair" code="34" temp="18" date="Tue, 08 Sep 2009 9:56 am PDT" />
    <description><![CDATA[
    <img src="http://l.yimg.com/a/i/us/we/52/34.gif"/><br />
    <b>Current Conditions:</b><br />
    Fair, 18 C<BR />
    <BR /><b>Forecast:</b><BR />
    Tue - Mostly Sunny. High: 27 Low: 15<br />
    Wed - Sunny. High: 27 Low: 17<br />
    <br />
    <a href="http://us.rd.yahoo.com/dailynews/rss/weather/Sunnyvale__CA/*http://weather.yahoo.com/forecast/USCA1116_c.html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
    (provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>
    ]]></description>
    <yweather:forecast day="Tue" date="8 Sep 2009" low="15" high="27" text="Mostly Sunny" code="34" />
    <yweather:forecast day="Wed" date="9 Sep 2009" low="17" high="27" text="Sunny" code="32" />
    <guid isPermaLink="false">USCA1116_2009_09_08_9_56_PDT</guid>
    </item>

    </channel>
    </rss>


    Jonathan LeBlanc
    Technology Evangelist
    Yahoo! Developer Network
    Twitter: jcleblanc
    0
  • What's the request string to get hourly and extended forecast? This returns only 2 days of forecast with no hourly info.

    Thanks.
    0
This forum is locked.

Recent Posts

in YDN Documentation