The weather stuff can be tricky. I ended up writing a new Applescript for it, just to try to get a better understanding of it. You really shouldn't need Lynx to get the existing Yahoo Weather info to work though...
I re-wrote my scripts to gather info from the Yahoo Weather API. The advantages are a much simpler parsing routine and a well documented code table for weather conditions. This let me use the Flat Weather icon set to show my weather, rather than pull down the current weather PNG from Yahoo.
Here is the code:
Code:
--Date: 7/20/2010 Email:shomann@gmail.com
--Personal or non-commerical use only.
--Yahoo! Weather API used.
--Enter the location of the weather icon FOLDER on your harddrive as URL:
set iconfolder to "file://localhost/Volumes/media/_users/..."
--Enter the WOEID for your location here
--For more information on the WOEID system go here: http://developer.yahoo.com/geo/geoplanet/guide/concepts.html
--To find your WOEID, try here: http://sigizmund.info/woeidinfo/?woeid=texas
set theLoc to "2400767"
--Set unitlogic to true if you are using metric
set unitlogic to "false"
set shell1 to "curl \"http://weather.yahooapis.com/forecastrss?w="
if unitlogic = "false" then
set shell2 to "\""
else
set shell2 to "&u=c\""
end if
set web_content to do shell script (shell1 & theLoc & shell2) as string
set AppleScript's text item delimiters to "\""
--Location
set w_city to text item 14 of web_content
set w_state to text item 16 of web_content
--Units
set w_tempunits to text item 20 of web_content
set w_disunits to text item 22 of web_content
set w_prsunits to text item 24 of web_content
set w_speedunits to text item 26 of web_content
--Begin Current Conditions
--Wind
set w_cur_chill to text item 28 of web_content
set w_winddir to text item 30 of web_content
set w_windspd to text item 32 of web_content
--Atmosphere
set w_humid to text item 34 of web_content
set w_vis to text item 36 of web_content
set w_prs to text item 38 of web_content
set w_prslogic to text item 40 of web_content
--Astronomy
set w_sunrise to text item 42 of web_content
set w_sunset to text item 44 of web_content
-- Condition
set w_curcond_text to text item 46 of web_content
set w_curcond_code to text item 48 of web_content
set w_curcond_temp to text item 50 of web_content
set w_updated to text item 52 of web_content
--Forecast
set w_fore0day to text item 60 of web_content
set w_fore0low to text item 64 of web_content
set w_fore0high to text item 66 of web_content
set w_fore0text to text item 68 of web_content
set w_fore0code to text item 70 of web_content
set w_fore1day to text item 72 of web_content
set w_fore1low to text item 76 of web_content
set w_fore1high to text item 78 of web_content
set w_fore1text to text item 80 of web_content
set w_fore1code to text item 82 of web_content
--Prs logic
if w_prslogic is "1" then
set w_prssymbol to "▲"
else
set w_prssymbol to "▼"
end if
tell application "GeekTool"
set command of shell geeklet "w_loc" to "echo '" & w_city & ", " & w_state & "'"
set command of shell geeklet "w_foreday" to "echo '" & w_fore1day & "'"
set command of shell geeklet "w_temps0" to "echo '" & w_curcond_temp & w_tempunits & "'"
set command of shell geeklet "w_temps1" to "echo '" & w_fore0high & "-" & w_fore0low & w_tempunits & "'"
set command of shell geeklet "w_temps2" to "echo '" & w_fore1high & w_tempunits & "\n" & w_fore1low & w_tempunits & "'"
set image url of image geeklet "w_icon0" to iconfolder & w_curcond_code & ".png"
set image url of image geeklet "w_icon1" to iconfolder & w_fore1code & ".png"
set command of shell geeklet "w_updated" to "echo '" & w_updated & "'"
end tell
return "H: " & w_humid & "% | V: " & w_vis & w_disunits & " | W: " & w_winddir & "° at " & w_windspd & w_speedunits & " | P: " & w_prs & w_prsunits & w_prssymbol & " ◉ " & w_sunrise & " - " & w_sunset
To break it down, I first have the script gather info from Yahoo Weather APIs. Then I assemble the output for the details of the current conditions, including humidity, visibility, wind, pressure, and sunrise/set. At the end of the script, I tell Applescript to reset the icons and temperature fields inside GeekTool.
I can break it down further, but if you want to use this as is, create two image geeklets named w_icon0 (for current conditions) and w_icon1 for tomorrow's conditions. Then create 3 shell geeklets named w_temps0 (current temp) and w_temps1(today's high low) and w_temps2 (tomorrow's temps).
You will need to modify the script to point to your weather icons folder. Search for Flat Weather icons on deviantArt for the icons I used...
Let me know what you think!