By gerardryan on
Is this something of interest to anyone? I have some php code I dug up that does a scrape of weather.com. I've sinced wrapped it as a simple drupal module that displays in a block, but I'm wondering if it's worth anything to anyone else... well?
Comments
drupal-devel
http://lists.drupal.org/archives/cgi-bin/namazu.cgi?query=weather&idxnam...
Cool.
Thanks, that's motivational :o)
I'll clean up what I got... but where do I post it? Meh, I suppose I can just make it available off one of my sites....
contributions
http://drupal.org/node/view/321
Module source
http://www.avi.org/weather.module
input/feedback?
Tested it out ...
I just installed and tested it out on my Drupal 4.2.0 system - works like a charm! Thanks!
BUG?
nice module,but output warnings:(in 4.3.2)
warning: fopen(/website/html/modules/ZGGG.xml): failed to open stream: Permission denied in website/html/modules/weather.module on line 275.
warning: fwrite(): supplied argument is not a valid stream resource in website/html/modules/weather.module on line 276.
warning: fclose(): supplied argument is not a valid stream resource in website/html/modules/weather.module on line 277.
Fixed in cvs
it's possible that you have to change permissions on your modules directory to allow for caching, but there have have been several improvements in the module in the most recent version. please let me know if you have further issues.
download current:
http://cvs.drupal.org/viewcvs/*checkout*/contributions/modules/weather/w...
weather cvs:
http://cvs.drupal.org/viewcvs/contributions/modules/weather/
thanks.
Done. I download the cvs ver
Done.
I download the cvs version, set it force no caching.It's woking now.
Thankyou.
thanks for your followup.
thanks for your followup.
I've been working on an RSS based solution...
Check out http://www.rssweather.com/
You can get your weather data as an RSS feed... Then, it's as simple as whipping up some code built with Magpie (http://magpierss.sourceforge.net/) and you're all set...
8)
Vapor8
Thanks!
I recently found out the hard way that Weather.com will eventually block updates to an IP that repeatedly scrapes... oh well... it was dirty anyway.
Now I'm using an XML feed from www.weatherroom.com -- which means a complete re-write of the module, but it's going quickly.
new version - no more scraping!
this version nibbles off an XML feed from weatherroom.com.
download current:
http://cvs.drupal.org/viewcvs/*checkout*/contributions/modules/weather/w...
weather cvs:
http://cvs.drupal.org/viewcvs/contributions/modules/weather/
new version uses a 60 minute auto-caching feature for the XML feed if it detects that php safe mode is off.
feedback is welcome and appreciated. thanks.
5 day forecasts on a page
weather module can now (optionally) fetch extended forecasts and display them to a page!
todo:
add image support
weather module now caches to db
http://drupal.org/drupal/4.3.0/modules/weather-4.3.0.tar.gz
This is a significant performance increase over the XML caching option.