title: How to convert raw javascript object to a dictionary?
body: <p>When screen-scraping some website, I extract data from <code>&lt;script&gt;</code> tags.<br />
  The data I get is not in standard <code>JSON</code> format. I cannot use <code>json.loads()</code>.</p>
  <pre><code># from
  js_obj = '{x:1, y:2, z:3}'
  
  # to
  py_obj = {'x':1, 'y':2, 'z':3}
  </code></pre>
  <p>Currently, I use <code>regex</code> to transform the raw data to <code>JSON</code> format.<br />
  But I feel pretty bad when I encounter complicated data structure.</p>
  <p>Do you have some better solutions?</p>