Add a connection with musik.p0m.fr

Fix parse error when parsing dates in 42.xml
Increase stability with try/expect
This commit is contained in:
Némunaire 2012-04-09 14:11:03 +02:00
commit 448b455e77
6 changed files with 78 additions and 6 deletions

4
qd.py
View file

@ -32,8 +32,8 @@ def xmlparse(node):
manche.getAttribute("winner"),
int(manche.getAttribute("winner_score")),
manche.getAttribute("who"),
datetime.now ())
# time.strptime (manche.getAttribute("date")))
# datetime.now ())
datetime.fromtimestamp (time.mktime (time.strptime (manche.getAttribute("date")[:19], "%Y-%m-%d %H:%M:%S"))))
def load_module(datas_path):
"""Load this module"""