Merge pull request #32 from HashirZahir/fix/utils-json-crash

Fix JSON load error issue #25 and #31
This commit is contained in:
Taehoon Kim
2016-05-25 11:13:07 +09:00

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: