Monday, January 23, 2006

Getting weather from weather.com as a news feed

  1. Go to weather.com, search for your city from the Local Weather search pane, then select your city from list of matches. You will see the following page (this is an example for Washington, DC):



    And the URL of this page will be something like that:
    http://www.weather.com/weather/local/USDC0001?from=search_city (text marked with red will differ for you location).
  2. Create a new feed on Feed43 web site.
  3. In Address field set the following URL: http://www.weather.com/weather/local/USDC0001?from=search_city.
  4. Press [Reload] button.
  5. Set the following Item Search Pattern:
    Right Now for{*}On The Spot Weather{*}<TD VALIGN="TOP" colspan="2">{%}<TD COLSPAN="2" ALIGN="LEFT">
  6. Press [Extract] button to see it works (one text snippet will be extracted).
  7. Set 'Local Weather Forecast for Washington, DC - weather.com' as a Feed Title.
  8. Set 'Local Weather Forecast for Washington, DC - weather.com' as a Feed Description.
  9. Set 'Local Weather Forecast for Washington, DC - weather.com' as Item Title Template.
  10. Set {%1}</td></tr></table> as Item Content Template.
  11. Press [Preview] button to see your feed.
  12. Rename feed to something like 'weather-com-washington-dc'.
  13. Don't forget to password-protect your feed so no one could alter it.
  14. Now you can point your aggregator to http://feed43.com/weather-com-washington-dc.xml and see the the feed with single item that will look like that:


No comments: