Return data from html/js to python
>>> import json >>> weird_json = ‘{“x”: 1, “x”: 2, “x”: 3}’ >>> x = json.loads(weird_json) >>> x {u’x’: 3} >>> y = json.loads(‘[“foo”, {“bar”:[“baz”, null, 1.0, 2]}]’) >>> y [u’foo’, {u’bar’: [u’baz’, None, 1.0, 2]}] You can take the HTML data, and convert it into a dictionary, enabling you to do: print x[‘x’] This … Read more