@app.route('/zoek1', methods=['GET', 'POST'])
def zoek1():
covers = {
"Open Library": "/static/img/nvt.png",
"Biblion": "/static/img/nvt.png",
"Placeholder": "/static/img/nvt.png"
}
if request.method == 'POST':
isbn = request.form.get('isbn')
response = requests.get(f"https://www.googleapis.com/books/v1/volumes?q=isbn:{isbn}")
boek = response.json().get('items', [])
openlibrary_cover = f"https://covers.openlibrary.org/b/isbn/{isbn}-L.jpg"
biblion_cover = f"https://cover.biblion.nl/coverlist.dll/?doctype=morebutton&bibliotheek=oba&style=0&isbn={isbn}"
covers = {
"Open Library": openlibrary_cover,
"Biblion": biblion_cover,
"Placeholder": "/static/img/nvt.png"
}