Fix #2128 (Google Books Fetch Metadata Fails With Apostrophe In Title)

This commit is contained in:
Kovid Goyal 2009-03-25 10:12:21 -07:00
parent c22ad7f26e
commit 3a1909ba2f

View File

@ -64,6 +64,8 @@ class Query(object):
if publisher is not None: if publisher is not None:
q += build_term('publisher', publisher.split()) q += build_term('publisher', publisher.split())
if isinstance(q, unicode):
q = q.encode('utf-8')
self.url = self.BASE_URL+urlencode({ self.url = self.BASE_URL+urlencode({
'q':q, 'q':q,
'max-results':max_results, 'max-results':max_results,