Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gdesklets, weather: Retrieval Failed
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Mr.Grim
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2003
Posts: 124

PostPosted: Thu Sep 30, 2004 12:55 am    Post subject: gdesklets, weather: Retrieval Failed Reply with quote

Hey, I'm trying to get gdesklets weather to work. It says retreivial faild and cant get it to grab my area. here is what i have in the config.

City: Granville
Country: United States
Update Time: 10
Measurement unit: Metric
Time Format: 12 hour
Direct URL: http://weather.yahoo.com/forecast/USOH0360.html

I probably just have the wrong url. Could anyone tell me whats going on?
Back to top
View user's profile Send private message
koroumel
Guru
Guru


Joined: 17 Jun 2004
Posts: 339
Location: Athens, Greece

PostPosted: Thu Sep 30, 2004 9:07 am    Post subject: Reply with quote

Your URL seems to be ok. Can you ping this address? Are you behind a firewall? I guess your network works ok... everybody knows when they don't have internet! :wink:
_________________
"Yep linux is an alternative. Windows on the other hand isn't even an option"
Registered Linux User No #242616
Back to top
View user's profile Send private message
alexod
n00b
n00b


Joined: 15 Mar 2003
Posts: 69

PostPosted: Sat Oct 02, 2004 9:35 am    Post subject: Reply with quote

yahoo changed their website layout, so the desklet-sensor can not parse the website correctly

try replace the regexes below
Code:
# regular expressions to parse the weather data

in __init__.py from the weather desklet with
Code:

    # regular expressions to parse the weather data
    RE_TEMPERATURE = re.compile("<b>(?P<temp>\d+)&deg;</b>")
    RE_TEMPERATURE_HI = re.compile("")
    RE_TEMPERATURE_LO = re.compile("")
    RE_TEMPERATURE_FEEL = re.compile("<b>Feels Like:</b></font></td>\n<td><font face=Arial size=2>\n(?P<temp_feel>\d+)")
    RE_PRESSURE = re.compile("<b>Barometer:</b></font></td>\n<td><font face=Arial size=2>\n(?P<pressure>[\d\.]+) \w+ \nand (?P<pressure_change>.+)\n")
    RE_DEWPOINT = re.compile("<b>Dewpoint:</b></font></td>\n<td><font face=Arial \nsize=2> (?P<dewpoint>\d+)")
    RE_WIND = re.compile("<b>Wind:</b></font></td>\n<td><font face=Arial size=2>\n(?P<wind>[\w\s]+)")
    RE_HUMIDITY = re.compile("<b>Humidity:</b></font></td>\n<td><font face=Arial size=2>\n(?P<humidity>\d+)\%")
    RE_SUNRISE = re.compile("<b>Sunrise:</b></font></td>\n<td><font face=Arial size=2>\n(?P<sunrise>.+)</font></td>")
    RE_SUNSET = re.compile("<b>Sunset:</b></font></td>\n<td><font face=Arial size=2>\n(?P<sunset>.+)</font></td>")
    RE_VISIBILITY = re.compile("<b>Visibility:</b></font></td>\n<td><font face=Arial size=2>\n(?P<visibility>\S+)")
    RE_SKY = re.compile("<br><font face=Arial size=2>(?P<sky>[^\<]+)\</font\>\</td\>")
    RE_ICON = re.compile("\<img src=\"http://us.i1.yimg.com/us.yimg.com/"
                         "i/us/we/52/(?P<icon>\d+).gif\"")
    RE_MATCHES = re.compile("Weather location matches:\</font\>\</td\>\n\s*\</tr\>\</table\>\n\s*\<font face=\"arial\" size=-1\>\n\s*\<ul\>\n\s*\<li\>\n\s*\<a href=\"(?P<matchurl>[^\"]+)\"\>")
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum