rate limit google requests
This commit is contained in:
parent
609ff07214
commit
216fd0c232
2 changed files with 34 additions and 1 deletions
|
|
@ -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)])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue