utf-8 encode google query
This commit is contained in:
parent
8e6de2b1b2
commit
e67a92c16c
1 changed files with 2 additions and 1 deletions
|
@ -136,8 +136,9 @@ class MovieId(models.Model):
|
||||||
if self.archiveorg_id:
|
if self.archiveorg_id:
|
||||||
links.append({'source': 'Internet Archive',
|
links.append({'source': 'Internet Archive',
|
||||||
'url': ox.web.archive.getUrl(self.archiveorg_id)})
|
'url': ox.web.archive.getUrl(self.archiveorg_id)})
|
||||||
|
qs = u'"%s (%s)"'%(self.title, self.year)
|
||||||
links.append({'source': 'Google',
|
links.append({'source': 'Google',
|
||||||
'url': 'http://google.com/search?q=%s' % quote('"%s (%s)"'%(self.title, self.year))})
|
'url': 'http://google.com/search?q=%s' % quote(qs.encode('utf-8'))})
|
||||||
return links
|
return links
|
||||||
|
|
||||||
def json(self):
|
def json(self):
|
||||||
|
|
Loading…
Reference in a new issue