fix google all of a sudden throwing ip geolocation errors

pull/1/head
eric 2012-07-31 16:06:11 -04:00
parent e76f30ed28
commit 1c4c0b0958
1 changed files with 1 additions and 0 deletions

View File

@ -525,6 +525,7 @@ def _get_json(url, params={}, type='gb'):
'X-Forwarded-For': '69.174.114.214'}
if type == 'gb':
params['key'] = settings.GOOGLE_BOOKS_API_KEY
params['country'] = 'us'
response = requests.get(url, params=params, headers=headers)
if response.status_code == 200:
return json.loads(response.content)