Fix downloading in non-interactive mode
This commit is contained in:
parent
e9bce420a0
commit
32ee771ee0
2 changed files with 3 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ class IndexPage(BasePage):
|
||||||
video.title = unicode(title.text.strip())
|
video.title = unicode(title.text.strip())
|
||||||
for p in div.xpath('.//p[@class="bientot"]'):
|
for p in div.xpath('.//p[@class="bientot"]'):
|
||||||
video.title += ' - %s' % p.text.split('|')[0].strip()
|
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()
|
duration = div.xpath('.//span[@class="type-duree"]')[0].text.split('|')[1].strip()
|
||||||
if duration[-1:] == "'":
|
if duration[-1:] == "'":
|
||||||
t = [0, int(duration[:-1])]
|
t = [0, int(duration[:-1])]
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,8 @@ class Leclercmobile(BaseBrowser):
|
||||||
|
|
||||||
def get_bill(self, id):
|
def get_bill(self, id):
|
||||||
assert isinstance(id, basestring)
|
assert isinstance(id, basestring)
|
||||||
|
if not self.is_on_page(HistoryPage):
|
||||||
|
self.location(self.conso)
|
||||||
parentid = id[0:10]
|
parentid = id[0:10]
|
||||||
l = self.page.date_bills(parentid)
|
l = self.page.date_bills(parentid)
|
||||||
for a in l:
|
for a in l:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue