From 86b5dd10786f7bf20e1763a0cfb7eafe6ac15e3f Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 10 May 2012 13:35:25 +0200 Subject: [PATCH] Fix current (site changed) --- modules/weather/pages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/weather/pages.py b/modules/weather/pages.py index 1af1a9c7..102cf2e9 100644 --- a/modules/weather/pages.py +++ b/modules/weather/pages.py @@ -43,8 +43,8 @@ class WeatherPage(BasePage): def get_current(self): date = datetime.datetime.now() - text = unicode(self.document.findall('//table[@class="twc-forecast-table twc-second"]//tr')[2].find('td').text_content().strip()) - temp = float(self.document.find('//*[@class="twc-col-1 twc-forecast-temperature"]').text_content().strip().split(u'°')[0]) + text = unicode(self.document.findall('//p[@class="wx-narrative"]')[0].text_content().strip()) + temp = float(self.document.find('//p[@class="wx-temp"]').text_content().strip().split(u'°')[0]) return Current(date, temp, text, u'F') class ForecastPage(BasePage):