Python3--监控疫情
import requests import json from pyecharts.charts import Map, Geo from pyecharts import options as opts from pyecharts.globals import GeoType, RenderType url = 'https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5' datas = json.loads(requests.get(url=url).json()['data']) china = datas['areaTree'][0]['children'] data = [] for i in range(len(china)): data.append([china[i]['name'], china[i]['total']['confirm']]) confirm = datas['chinaTotal']['confirm'] suspect = datas['chinaTotal']['suspect'] dead = datas['chinaTotal']['dead'] heal = datas['chinaTotal']['heal'] lastUpdateTime = datas[