ettorerizza
8/17/2017 - 8:29 AM

Jython : Use Google Books api with OpenRefine records

Jython : Use Google Books api with OpenRefine records

import urllib
data = set(row['record']['cells']['extract_persons']['value'])
liste = []
for el in data:
    liste.append('"%s"' %el)
terms = "+".join(liste)

if len(terms) > 1:
    return "https://www.googleapis.com/books/v1/volumes?q=" + urllib.quote(terms.encode('utf8')) + "&key="