From a86f71b90b0eb8be87a1b4c99af971ed5c551dc3 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Fri, 23 Jan 2015 16:49:36 +0100 Subject: [PATCH] fix encoding of urls --- modules/okc/browser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/okc/browser.py b/modules/okc/browser.py index d8285938..73fe460a 100644 --- a/modules/okc/browser.py +++ b/modules/okc/browser.py @@ -193,13 +193,13 @@ class OkCBrowser(Browser): @check_login def get_profile(self, id): - self.location(self.absurl('/profile/%s' % id)) + self.location(self.absurl('/profile/%s' % urllib.quote(id.encode('utf-8')))) profile = self.page.get_profile() return profile @check_login def get_photos(self, id): - self.location(self.absurl('/profile/%s/photos' % id)) + self.location(self.absurl('/profile/%s/photos' % urllib.quote(id.encode('utf-8')))) return self.page.get_photos() #def _get_chat_infos(self): @@ -248,7 +248,7 @@ class OkCBrowser(Browser): @check_login def visit_profile(self, id): - self.location(self.absurl('/profile/%s' % id)) + self.location(self.absurl('/profile/%s' % urllib.quote(id.encode('utf-8')))) stalk, u, tuid = self.page.get_visit_button_params() if stalk and u and tuid: # Premium users, need to click on "visit button" to let the other person know his profile was visited