From ce6ef5f75e39978f3101cbb7ec2c958f806bd072 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 27 Jan 2014 15:30:52 +0100 Subject: [PATCH] Fix: There are not always ten days of forecast closes #1343 --- modules/weather/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/weather/pages.py b/modules/weather/pages.py index 58971922..b083bfdc 100644 --- a/modules/weather/pages.py +++ b/modules/weather/pages.py @@ -53,7 +53,7 @@ class ForecastPage(BasePage): def iter_forecast(self): divs = self.document.findall('//div[@class="wx-daypart"]') - for day in range (0, 10): + for day in range (0, len(divs)): div = divs[day].find('div[@class="wx-conditions"]') text = unicode(div.find('p[@class="wx-phrase"]').text_content().strip()) try: