Skip to content

Instantly share code, notes, and snippets.

@mbabaian
mbabaian / practice.py
Created January 30, 2018 19:41
The python program only publishes the first item in the query. I'd like to iterate through all items and publish them to HTML but can't figure out how.
# Practicing call to DPLA and getting data from it, then displaying results via html
import webbrowser
from operator import itemgetter
import requests
f=open('result.html', 'w')
# Make an api call and store the response.
url = "https://api.dp.la/v2/items?q=penguins&api_key=aefc7b2874411888e4e06b515935c19c"