[fix] url encoding

This commit is contained in:
asciimoo 2013-10-25 11:20:46 +02:00
parent ea475ee709
commit f4fdb1e756

View file

@ -9,7 +9,7 @@ url = 'https://ajax.googleapis.com/'
search_url = url + 'ajax/services/search/images?v=1.0&start=0&rsz=large&safe=off&filter=off&{query}' search_url = url + 'ajax/services/search/images?v=1.0&start=0&rsz=large&safe=off&filter=off&{query}'
def request(query, params): def request(query, params):
params['url'] = search_url + urlencode({'q': query}) params['url'] = search_url.format(query=urlencode({'q': query}))
return params return params
def response(resp): def response(resp):