title: How to read JSON from URL in Python?
body: <p>I am trying to use Python to get a JSON file from the Web. If I open the URL in my browser (Mozilla or Chromium) I do see the JSON. But when I do the following with the Python:</p>
  
  <pre><code>response = urllib2.urlopen(url)
  data = json.loads(response.read())
  </code></pre>
  
  <p>I get an error message that tells me the following (after translation in English): Errno 10060, a connection troughs an error, since the server after a certain time period did not react, or the connection was erroneous, or the host did not react.</p>
  
  <p><strong>ADDED</strong></p>
  
  <p>It looks like there are many people who faced the described problem. There are also some answers to the similar (or the same) question. For example <a href="https://stackoverflow.com/questions/5620263/using-an-http-proxy-python">here</a> we can see the following solution:</p>
  
  <pre><code>import requests
  
  r = requests.get("http://www.google.com", proxies={"http": "http://61.233.25.166:80"})
  print(r.text)
  </code></pre>
  
  <p>It is already a step forward for me (I think that it is very likely that the proxy is the reason of the problem). However, I still did not get it done since I do not know URL of my proxy and I probably will need user name and password. Howe can I find them? How did it happen that my browsers have them I do not?</p>
  
  <p><strong>ADDED 2</strong></p>
  
  <p>I think I am now one step further. I have used this site to find out what my proxy is: <a href="http://www.whatismyproxy.com/" rel="nofollow noreferrer">http://www.whatismyproxy.com/</a></p>
  
  <p>Then I have used the following code:</p>
  
  <pre><code>proxies = {'http':'my_proxy.blabla.com/'}
  r = requests.get(url, proxies = proxies)
  print r
  </code></pre>
  
  <p>As a result I get </p>
  
  <pre><code>&lt;Response [404]&gt;
  </code></pre>
  
  <p>Looks not so good, but at least I think that my proxy is correct, because when I randomly change the address of the proxy I get another error:</p>
  
  <pre><code>Cannot connect to proxy
  </code></pre>
  
  <p>So, I can connect to proxy but something is not found.</p>