summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-02-01 14:44:20 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-02-01 14:44:20 +0100
commit6b3883c7bfbd87b50344155ddfce3bbd4a22d8ae (patch)
treeaaafb7fba775e4a8c9cb4212166067d5a1dfe681
parentcloses #201 (diff)
downloadpyload-6b3883c7bfbd87b50344155ddfce3bbd4a22d8ae.tar.xz
fixed #222
-rw-r--r--module/plugins/Account.py6
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py7
2 files changed, 11 insertions, 2 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py
index 30561f126..9c46f5398 100644
--- a/module/plugins/Account.py
+++ b/module/plugins/Account.py
@@ -58,7 +58,11 @@ class Account():
print_exc()
finally:
if req: req.close()
-
+
+ def relogin(self):
+ for user, data in self.accounts.iteritems():
+ self._login(user, data)
+
def setAccounts(self, accounts):
self.accounts = accounts
for user, data in self.accounts.iteritems():
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index f238c59bc..31cbc8285 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -120,7 +120,12 @@ class ShareonlineBiz(Hoster):
""" returns the absolute downloadable filepath
"""
if self.account:
- return re.search('loadfilelink\.decode\("(.*?)"\);', self.html, re.S).group(1)
+ try:
+ return re.search('loadfilelink\.decode\("(.*?)"\);', self.html, re.S).group(1)
+ except:
+ self.log.debug("Login issue, trying again")
+ self.account.relogin()
+ self.retry()
file_url_pattern = r'var\sdl="(.*?)"'
return b64decode(re.search(file_url_pattern, self.html).group(1))