Created
August 17, 2017 08:29
-
-
Save ettorerizza/e8081189a74d157a4c1f04ce81d0ed61 to your computer and use it in GitHub Desktop.
Jython : Use Google Books api with OpenRefine records
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment