Closed blcc closed 7 years ago
I think life will be easier if change util.py:
def getjson(text): return json.loads(re.sub(r"for.(.;.;._).*;", '', text.encode('utf-8').decode("unicode-escape"), 1)) to
def get_json(text): return json.loads(re.sub(r"^[^{]*", '', text, 1))
When fbchat start listen() and a like notification has push in, fbchat would receive a very long json string. It told you are "liked". However there are some problems in the json string, and cause json.load() error. It contains double quote in json value in 2 element. One is the "__html", which contains html code. Another one is the "tracking" element, which contains another json code.
I have no idea how to fix it.
Regards