Lots of fixes, changes, and new goodies.

This commit is contained in:
Sean B. Palmer
2008-02-23 12:16:43 +00:00
parent 7931fab145
commit 2fb0058943
13 changed files with 94 additions and 40 deletions

View File

@@ -26,7 +26,7 @@ def json(text):
raise ValueError('Input must be serialised JSON.')
def location(name):
name = urllib.quote(name)
name = urllib.quote(name.encode('utf-8'))
uri = 'http://ws.geonames.org/searchJSON?q=%s&maxRows=1' % name
for i in xrange(10):
u = urllib.urlopen(uri)