python

__init__.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
@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"
        }
Zoek functie

1
2
3
        cursor = conn.cursor()
        cursor.execute("SELECT * FROM beheerder WHERE gebruikersnaam = ? AND wachtwoord = ?", gebruikersnaam, wachtwoord)
        login = cursor.fetchone()