[hybride] fix Date parsing
This commit is contained in:
parent
c3b5dbc316
commit
7773f227a5
1 changed files with 2 additions and 8 deletions
|
|
@ -30,20 +30,14 @@ from weboob.browser.filters.html import CleanHTML
|
|||
from weboob.browser.filters.html import Link
|
||||
|
||||
|
||||
def format_date(date):
|
||||
splitted_date = date.split(',')[1]
|
||||
if splitted_date:
|
||||
return date_util.parse_french_date(splitted_date)
|
||||
|
||||
|
||||
class Date(Filter):
|
||||
def filter(self, text):
|
||||
return format_date(text)
|
||||
return date_util.parse_french_date(text)
|
||||
|
||||
|
||||
class CombineDate(Filter):
|
||||
def filter(self, text):
|
||||
return datetime.combine(format_date(text), time.max)
|
||||
return datetime.combine(date_util.parse_french_date(text), time.max)
|
||||
|
||||
|
||||
class ProgramPage(HTMLPage):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue