import requests
from lxml import etree
from bs4 import BeautifulSoup
import time
import pandas as pd
import json
proxies = {
'https': 'http://127.0.0.1:10818',
'http': 'http://127.0.0.1:10818'
}
resp = requests.get("https://backend.tendermint.com/apps",proxies = proxies)
print(resp.status_code)
jdict = json.loads(resp.text)
total = []
for item in jdict["records"]:
print(item['fields']["name"])
name = item['fields']["name"]
total.append(item['fields']["name"])
RT,打印正常,
Comic Chain
Dulce + Allies
Pylons
...
Unification WRK Oracle
WenChang
Zenchain
但是最后居然来一个报错
line 19, in <module>
print(item['fields']["name"])
KeyError: 'name'
不是都全打出来了吗怎么还报错?什么鬼?