i edited stuff in 426 w/ the fix & noticed it was still giving no report. so i changed the few entries, listed a couple posts ago, in v *425 & everything started working againgravdigr wrote:i now get "no report" for the temp..i've used your fix on the tcl but it returns an error..if there's any way you could send me the editted weather426.tcl i'd appreciate it..the error is
<GreenWood> [10:54] Tcl error [pub_wz]: can't read "fwhat(2)": no such element in array
wunderground must've changed their website once again..
my shell is running freebsd
thnx again
Code: Select all
..... {regexp {Temperature: (.*?)°F / (.*?)°C} .......
Code: Select all
regexp {<div class=\"b\">(.*?)</div>(.*?)</td>} $cast match fwhen($f) fwhat($f)
# regsub -all {<([^<])*>} $fwhat($f) {} fwhat($f)
# regsub -all {[[:cntrl:]]} $fwhat($f) {} fwhat($f)
# regsub { » ZIP Code Detail} $fwhat($f) {} fwhat($f)
# set fcast($f) "\002$fwhen($f):\002 $fwhat($f)"
Code: Select all
League City, Texas -- 3:50 PM CST Updated: 3:19 PM CST on February 01, 2011
Conditions: 42.5?F / 5.8?C | Mostly Cloudy Humidity: 66% Windchill: 42?F / 6?C
Sunrise: 7:09 AM CST Sunset: 5:58 PM CST
damn. yep...sure doesbluzman wrote:Looks like it is broken again. Typing .wz does nothing now.
Code: Select all
[06:38] Tcl error [pub_wz]: can't read "localdate": no such variable
aww! very nice. thx for the heads up on that one.hm2k wrote:You may find this useful: http://www.hm2k.com/posts/weather-tcl
It's less likely to fail as it uses Google's API rather than trying to parse a website that is subject to change.
The following should be working: http://irradiated.org/~stock/weather426.tclbluzman wrote:Could someone post or upload a -fixed working- copy of weather426.tcl please? I tried the fix from above. It did not work.
Thanks in advance.