python: Google Street View url request cannot load as json()
<p>I want to use python to grab Google Street View image. 
For example:</p>

<pre><code>'url=https://maps.googleapis.com/maps/api/streetview?location=48.15763817939112,11.533002555370581&amp;size=512x512&amp;key=
</code></pre>

<p>I run the following code:</p>

<pre><code>import requests
result = requests.get(url)
result.json()
</code></pre>

<p>But it comes out an error:</p>

<pre><code>Traceback (most recent call last):

  File "&lt;ipython-input-69-180c2a4b335d&gt;", line 1, in &lt;module&gt;
    result.json()

  File "/home/kang/.local/lib/python3.4/site-packages/requests/models.py", line 826, in json
    return complexjson.loads(self.text, **kwargs)

  File "/home/kang/.local/lib/python3.4/site-packages/simplejson/__init__.py", line 516, in loads
    return _default_decoder.decode(s)

  File "/home/kang/.local/lib/python3.4/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)

  File "/home/kang/.local/lib/python3.4/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())

JSONDecodeError: Expecting value
</code></pre>

<p>The response of this url is:</p>

<p><a href="http://i.stack.imgur.com/i9uKk.jpg" rel="nofollow"><img src="http://i.stack.imgur.com/i9uKk.jpg" alt="enter image description here"></a> </p>

<p>How to fix that?
Thank you very much.</p>

<p>There is no JSON in the response that is coming back to you, which is why it is giving the error. </p>

python json api google-maps-api-3 google-street-view