title: Extract data from JSON API using Python
body: <p>I go through this part:</p>
  
  <p>How do I extract the data from that URL? I only want to print out the <code>"networkdiff": 58954.60268219</code>.</p>
  
  <pre><code>from urllib import urlopen
  
  url = urlopen('http://21.luckyminers.com/index.php?page=api&amp;action=getpoolstatus&amp;api_key=8dba7050f9fea1e6a554bbcf4c3de5096795b253b45525c53562b72938771c41').read()
  
  print url
  </code></pre>
  
  <p>This is what the API display as a result from print url command:</p>
  
  <pre><code>{
      "getpoolstatus": {
          "version": "1.0.0",
          "runtime": 16.618967056274,
          "data": {
              "pool_name": "21 Coin Pool @ Luckyminers.com",
              "hashrate": 485426748,
              "efficiency": 98.1,
              "workers": 14,
              "currentnetworkblock": 12025,
              "nextnetworkblock": 12026,
              "lastblock": 12023,
              "networkdiff": 58954.60268219,
              "esttime": 521.61956775542,
              "estshares": 241478052.58625,
              "timesincelast": 427,
              "nethashrate": 485426748
          }
      }
  }
  </code></pre>