[leboncoin] fix bug while parsing date
This commit is contained in:
parent
24b1e91fb3
commit
e66a46766b
1 changed files with 2 additions and 2 deletions
|
|
@ -93,8 +93,8 @@ class HousingListPage(HTMLPage):
|
|||
|
||||
def obj_date(self):
|
||||
_date = CleanText('./div[@class="lbc"]/div[@class="date"]',
|
||||
replace=[('Aujourd\'hui', str(date.today().day)),
|
||||
('Hier', str((date.today() - timedelta(1)).day))])(self)
|
||||
replace=[('Aujourd\'hui', str(date.today())),
|
||||
('Hier', str((date.today() - timedelta(1))))])(self)
|
||||
for fr, en in DATE_TRANSLATE_FR:
|
||||
_date = fr.sub(en, _date)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue