Fix JSON load error issue #25 and #31

This commit is contained in:
Hashir
2016-03-01 13:14:12 +08:00
parent 168f7c397b
commit b427151b77

View File

@@ -15,7 +15,7 @@ def now():
return int(time()*1000)
def get_json(text):
return json.loads(re.sub(r"for.*(.*;.*;.*).*;", '', text.encode('utf-8').decode("unicode-escape"), 1))
return json.loads(re.sub(r"^[^{]*", '', text, 1))
def digit_to_char(digit):
if digit < 10: