<p>我正在尝试将数据从网站加载到json文件中</p>
<blockquote>
<blockquote>
<blockquote>
<p>when i try this code, nothing is wrong:</p>
</blockquote>
</blockquote>
</blockquote>
<pre><code>import requests
import json
url="https://leoclub-ssmc.blogspot.com/?m=1"
r=requests.get(url)
print(r.text)
</code></pre>
<blockquote>
<blockquote>
<blockquote>
<p>this code above show the web's full page with html code without error.</p>
<p>but when i try to load all the code into a json file then it shows some error message</p>
</blockquote>
</blockquote>
</blockquote>
<pre><code>import requests
import json
url="https://leoclub-ssmc.blogspot.com/?m=1"
r=requests.get(url)
print(r.json)
</code></pre>
<p>上述代码显示:
响应[200]的绑定方法Response.json
[程序完成]</p>
<blockquote>
<blockquote>
<blockquote>
<p>moving on::</p>
</blockquote>
</blockquote>
</blockquote>
<pre><code>import requests
import json
url="https://leoclub-ssmc.blogspot.com/?m=1"
r=requests.get(url).json()
print(r)
</code></pre>
<p>★★现在显示此错误消息:“raise JSONDecodeError(“预期值”,s,err.value)从None开始
json.decoder.JSONDecodeError:应为值:第1行第1列(字符0)”
[程序完成]</p>
<p>我只想在json文件中加载数据,然后在我的应用程序中具体显示它们</p>