Added a helper function strip_to_json
This commit is contained in:
@@ -14,8 +14,11 @@ USER_AGENTS = [
|
||||
def now():
|
||||
return int(time()*1000)
|
||||
|
||||
def strip_to_json(text):
|
||||
return re.sub(r"^[^{]*", '', text, 1);
|
||||
|
||||
def get_json(text):
|
||||
return json.loads(re.sub(r"^[^{]*", '', text, 1))
|
||||
return json.loads(strip_to_json(text))
|
||||
|
||||
def digit_to_char(digit):
|
||||
if digit < 10:
|
||||
|
Reference in New Issue
Block a user