fix unicode problems (closes #624)
This commit is contained in:
parent
0f07006ea4
commit
5e949f6426
2 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ class MeteofranceBrowser(BaseBrowser):
|
|||
BaseBrowser.__init__(self, *args, **kwargs)
|
||||
|
||||
def iter_city_search(self, pattern):
|
||||
searchurl = self.CITY_SEARCH_URL.format(city_pattern=urllib.quote_plus(pattern))
|
||||
searchurl = self.CITY_SEARCH_URL.format(city_pattern=urllib.quote_plus(pattern.encode('utf-8')))
|
||||
self.location(searchurl)
|
||||
|
||||
if self.is_on_page(CityPage):
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class YahooBackend(BaseBackend, ICapWeather):
|
|||
|
||||
# so i use a basic but efficient parsing
|
||||
with self.browser:
|
||||
content = self.browser.readurl((self.SEARCH_URL % pattern).replace(' ','+'))
|
||||
content = self.browser.readurl((self.SEARCH_URL % pattern.encode('utf-8')).replace(' ','+'))
|
||||
|
||||
page=''
|
||||
for line in content.split('\n'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue