diff options
-rw-r--r-- | module/lib/captchatrader.py | 6 | ||||
-rw-r--r-- | module/plugins/Account.py | 9 | ||||
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/module/lib/captchatrader.py b/module/lib/captchatrader.py index 179612faa..50a2acbea 100644 --- a/module/lib/captchatrader.py +++ b/module/lib/captchatrader.py @@ -17,7 +17,11 @@ @author: mkaay """ -from simplejson import loads +try: + from json import loads +except ImportError: + from simplejson import loads + from urllib2 import build_opener from MultipartPostHandler import MultipartPostHandler diff --git a/module/plugins/Account.py b/module/plugins/Account.py index 9c46f5398..6eda09077 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -59,9 +59,12 @@ class Account(): finally: if req: req.close() - def relogin(self): - for user, data in self.accounts.iteritems(): - self._login(user, data) + def relogin(self, user): + req = self.getAccountRequest(user) + if req: + req.cj.clear() + req.close() + self._login(user, self.accounts[user]) def setAccounts(self, accounts): self.accounts = accounts diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index 31cbc8285..8ed9cdce8 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -124,7 +124,7 @@ class ShareonlineBiz(Hoster): return re.search('loadfilelink\.decode\("(.*?)"\);', self.html, re.S).group(1) except: self.log.debug("Login issue, trying again") - self.account.relogin() + self.account.relogin(self.user) self.retry() file_url_pattern = r'var\sdl="(.*?)"' return b64decode(re.search(file_url_pattern, self.html).group(1)) |