Merge lp:~max-rabkin/ibid/gdefine-unicode into lp:~ibid-core/ibid/old-trunk-1.6

Proposed by Max Rabkin
Status: Merged
Approved by: Stefano Rivera
Approved revision: 910
Merged at revision: 932
Proposed branch: lp:~max-rabkin/ibid/gdefine-unicode
Merge into: lp:~ibid-core/ibid/old-trunk-1.6
Diff against target: 13 lines (+2/-1)
1 file modified
ibid/plugins/google.py (+2/-1)
To merge this branch: bzr merge lp:~max-rabkin/ibid/gdefine-unicode
Reviewer Review Type Date Requested Status
Keegan Carruthers-Smith Approve
Jonathan Hitchcock Approve
Stefano Rivera Approve
Michael Gorven Approve
Review via email: mp+24551@code.launchpad.net

Commit message

Encode Google scrape queries in UTF-8.

To post a comment you must log in.
Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve

review: Approve
lp:~max-rabkin/ibid/gdefine-unicode updated
910. By Max Rabkin

Break long line

Revision history for this message
Stefano Rivera (stefanor) :
review: Approve
Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve
Revision history for this message
Keegan Carruthers-Smith (keegan-csmith) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/google.py'
2--- ibid/plugins/google.py 2010-03-27 15:50:58 +0000
3+++ ibid/plugins/google.py 2010-05-01 15:32:39 +0000
4@@ -98,7 +98,8 @@
5 url = self.google_scrape_url
6 if country:
7 url += "&cr=country%s" % country.upper()
8- f = urlopen(Request(url % quote(query), headers={'user-agent': self.user_agent}))
9+ f = urlopen(Request(url % quote(query.encode('utf-8')),
10+ headers={'user-agent': self.user_agent}))
11 soup = BeautifulSoup(f.read())
12 f.close()
13 return soup

Subscribers

People subscribed via source and target branches