summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-18 08:53:40 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-18 08:53:40 +0200
commitd86120df4f413c309ec87a3bc1ae7bd63d399e7b (patch)
treebf4189576dd1f63301499637502f83901d965bea /module/plugins/internal
parent[SimpleHoster] Fix https://github.com/pyload/pyload/issues/1421 (diff)
downloadpyload-d86120df4f413c309ec87a3bc1ae7bd63d399e7b.tar.xz
[XFSAccount] Fix https://github.com/pyload/pyload/issues/1420
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/SimpleHoster.py10
-rw-r--r--module/plugins/internal/XFSAccount.py11
2 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index fddd6b677..9303bcf2e 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -74,7 +74,7 @@ def parseHtmlForm(attr_str, html, input_names={}):
if name:
value = parseHtmlTagAttrValue("value", inputtag.group(1))
if not value:
- inputs[name] = inputtag.group(3) or ''
+ inputs[name] = inputtag.group(3) or ""
else:
inputs[name] = value
@@ -583,8 +583,8 @@ class SimpleHoster(Hoster):
except Exception:
errmsg = m.group(0).strip()
- self.logWarning(re.sub(r'<.*?>', " ", errmsg))
- self.info['error'] = errmsg
+ self.info['error'] = re.sub(r'<.*?>', " ", errmsg)
+ self.logWarning(self.info['error'])
if re.search('da(il)?y|today', errmsg, re.I):
wait_time = secondsToMidnight(gmt=2)
@@ -606,8 +606,8 @@ class SimpleHoster(Hoster):
except Exception:
errmsg = m.group(0).strip()
- self.logWarning(re.sub(r'<.*?>', " ", errmsg))
- self.info['error'] = errmsg
+ self.info['error'] = re.sub(r'<.*?>', " ", errmsg)
+ self.logWarning(self.info['error'])
if re.search('limit|wait', errmsg, re.I):
if re.search("da(il)?y|today", errmsg):
diff --git a/module/plugins/internal/XFSAccount.py b/module/plugins/internal/XFSAccount.py
index 41e1bde4d..e619cb038 100644
--- a/module/plugins/internal/XFSAccount.py
+++ b/module/plugins/internal/XFSAccount.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies
class XFSAccount(Account):
__name__ = "XFSAccount"
__type__ = "account"
- __version__ = "0.36"
+ __version__ = "0.37"
__description__ = """XFileSharing account plugin"""
__license__ = "GPLv3"
@@ -170,9 +170,12 @@ class XFSAccount(Account):
inputs.update({'login' : user,
'password': data['password']})
- if not action:
- action = self.HOSTER_URL
- html = req.load(action, post=inputs, decode=True)
+ if action:
+ url = urlparse.urljoin("http://", action)
+ else:
+ url = self.HOSTER_URL
+
+ html = req.load(url, post=inputs, decode=True)
if re.search(self.LOGIN_FAIL_PATTERN, html):
self.wrongPassword()