Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "region_metadata": [ {..many dictionaries here..
- ],
- "items": [
- {
- "timestamp": "2017-09-24T14:00:00+08:00",
- "update_timestamp": "2017-09-24T14:06:18+08:00",
- "readings": {
- "pm25_one_hourly": {
- "west": 19,
- "east": 18,
- "central": 17,
- "south": 13,
- "north": 23
- }
- }
- }
- ],
- "api_info": {
- "status": "healthy"
- }
- }
- resp = requests.get(url, headers=h)
- binary = resp.content
- output = json.loads(binary)
- for key, value in output.items():
- if key == "items":
- print (value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement