Commit 75f50652 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

add surface field and ignore extra fields

parent 188b28e2
......@@ -15,7 +15,7 @@ reScore = re.compile('(\d)/(\d)')
reGame = re.compile('\s*([0-9.]+)\s+([0-9a-fA-F]+)\s+"(.*?)"'
'\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+"(.*?)"\s+"(.*?)"'
'\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s*',re.MULTILINE)
'\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+"(.*?)"\s+([0-9a-fA-F]+)\s+(.*?)',re.MULTILINE)
reSummary = re.compile('^\s*(.*)\*\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+'
'([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+([0-9a-fA-F]+)\s+MG\-on.*$',re.MULTILINE)
......@@ -66,7 +66,8 @@ def parse_server_poll(data):
'other_elo': int(a[9], 16),
'give_up_rate': int(a[10], 16),
'reputation': (lambda x: x if x < (1<<63) else (x-(1<<64)))(int(a[11],16)),
'creation_time': int(a[12], 16),
'surface': a[12],
'creation_time': int(a[13], 16),
} for a in m],
'summary': summary}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment