rate limit google requests

This commit is contained in:
j 2016-01-23 18:06:40 +05:30
commit 216fd0c232
2 changed files with 34 additions and 1 deletions

View file

@ -59,7 +59,11 @@ def lookup(key, value):
return oml.metaremote.lookup(key, value)
'''
if key == 'isbn':
data = google.info(key, value)
try:
data = google.info(key, value)
except:
logger.debug('google.info failed %s=%s', key, value, exc_info=True)
data = {}
else:
data = {key: [value]}
ids = set([(key, value)])