def select_from_unpaywall(conn, cur, doi):
    """ Queries the sqlite3 table unpaywall on doi, returns the pdf_url (can be None)"""
    # cur = conn.cursor()
    query = """
    SELECT pdf_url 
    FROM unpaywall WHERE doi = '{}' 
    """.format(doi)
    cur.execute(query)
    # Only get one row (there will only be 1 row in the result). 1 field only present.
    return cur.fetchone()