From 32ee771ee01abc6dec182dccd38bc86b16a1aec4 Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 21 Nov 2013 09:45:12 +0100 Subject: [PATCH] Fix downloading in non-interactive mode --- modules/francetelevisions/pages.py | 2 +- modules/leclercmobile/browser.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/francetelevisions/pages.py b/modules/francetelevisions/pages.py index 3d6b74f9..03813d96 100644 --- a/modules/francetelevisions/pages.py +++ b/modules/francetelevisions/pages.py @@ -46,7 +46,7 @@ class IndexPage(BasePage): video.title = unicode(title.text.strip()) for p in div.xpath('.//p[@class="bientot"]'): video.title += ' - %s' % p.text.split('|')[0].strip() - video.date = parse_dt(div.find('span').attrib['data-date']) + video.date = None #parse_dt(div.find('span').attrib['data-date']) duration = div.xpath('.//span[@class="type-duree"]')[0].text.split('|')[1].strip() if duration[-1:] == "'": t = [0, int(duration[:-1])] diff --git a/modules/leclercmobile/browser.py b/modules/leclercmobile/browser.py index 9fc22d8c..0db18b76 100644 --- a/modules/leclercmobile/browser.py +++ b/modules/leclercmobile/browser.py @@ -127,6 +127,8 @@ class Leclercmobile(BaseBrowser): def get_bill(self, id): assert isinstance(id, basestring) + if not self.is_on_page(HistoryPage): + self.location(self.conso) parentid = id[0:10] l = self.page.date_bills(parentid) for a in l: