diff options
author | fragonib <devnull@localhost> | 2011-04-24 17:49:54 +0200 |
---|---|---|
committer | fragonib <devnull@localhost> | 2011-04-24 17:49:54 +0200 |
commit | a62149644fdac4a418c56f829482179817ae084a (patch) | |
tree | e155c47cffe209fac171f24b84b682522528e07f /module/plugins/hoster/BitshareCom.py | |
parent | UploadStation & BitshareCom: Improved debugging (diff) | |
download | pyload-a62149644fdac4a418c56f829482179817ae084a.tar.xz |
UploadStation & BitshareCom: Unicode issues
Diffstat (limited to 'module/plugins/hoster/BitshareCom.py')
-rw-r--r-- | module/plugins/hoster/BitshareCom.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 496071fa3..555565df2 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -1,16 +1,12 @@ # -*- coding: utf-8 -*- from __future__ import with_statement -import re -import unicodedata - -from os import remove - +from module.network.RequestFactory import getURL from module.plugins.Hoster import Hoster from module.plugins.ReCaptcha import ReCaptcha -from module.network.RequestFactory import getURL -from wx.lib.analogclock.helpers import Hand +import re +import unicodedata def unicode2str(unitext): return unicodedata.normalize('NFKD', unitext).encode('ascii', 'ignore') @@ -138,16 +134,15 @@ class BitshareCom(Hoster): dl = self.download(url) def handleErrors(self, response, separator): - self.log.debug("%s: Checking response [%s]" % (self.__name__, response)) + self.log.debug("%s: Checking response [%s]" % (self.__name__, unicode2str(response))) if "ERROR" in response: msg = response.split(separator)[-1] self.fail(msg) def handleCaptchaErrors(self, response): - self.log.debug("%s: Result of captcha resolving [%s]" % (self.__name__, response)) + self.log.debug("%s: Result of captcha resolving [%s]" % (self.__name__, unicode2str(response))) if "SUCCESS" in response: return True self.log.debug("%s: Wrong captcha" % (self.__name__)) - self.invalidCaptcha() - + self.invalidCaptcha()
\ No newline at end of file |