use old google api

This commit is contained in:
j 2016-02-03 01:00:40 +05:30
commit 404842f849
4 changed files with 119 additions and 20 deletions

View file

@ -31,9 +31,9 @@ providers = [
('abebooks', 'isbn')
]
def find(query):
#results = google.find(query)
results = duckduckgo.find(query)
def find(title=None, author=None):
results = google.find(title=title, author=author)
#results = duckduckgo.find(query)
'''
results = openlibrary.find(query)
for r in results:
@ -55,7 +55,7 @@ def lookup(key, value):
return {}
if key == 'isbn':
try:
data = google.info(key, value)
data = google.info(value)
except:
logger.debug('google.info failed %s=%s', key, value, exc_info=True)
data = {}