Improve date handling
This commit is contained in:
parent
99e45fadec
commit
10001b0c28
1 changed files with 2 additions and 2 deletions
|
@ -39,10 +39,10 @@ while True:
|
|||
try:
|
||||
if "-" in text:
|
||||
loc = text.find("-")
|
||||
date = dateutil.parser.parse(text[:loc-1])
|
||||
date = dateutil.parser.parse(text[:loc-1],dayfirst=True,fuzzy=True)
|
||||
comment = HTMLParser.HTMLParser().unescape(text[loc+1:]).strip()
|
||||
else:
|
||||
date = dateutil.parser.parse(text)
|
||||
date = dateutil.parser.parse(text,dayfirst=True,fuzzy=True)
|
||||
comment = ""
|
||||
except ValueError:
|
||||
api.update_status("@%s Sorry, ich verstehe deinen Tweet nicht... :(" % sender, twid)
|
||||
|
|
Loading…
Reference in a new issue