diff options
author | lazlev <lazlev@yopmail.com> | 2015-08-09 00:50:54 +0200 |
---|---|---|
committer | lazlev <lazlev@yopmail.com> | 2015-08-09 00:50:54 +0200 |
commit | b0ef3f1673e1930916604bb1264ca3a38414bc8d (patch) | |
tree | c97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/accounts/FilejungleCom.py | |
parent | [XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff) | |
parent | Fix https://github.com/pyload/pyload/issues/1707 (diff) | |
download | pyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz |
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/accounts/FilejungleCom.py')
-rw-r--r-- | module/plugins/accounts/FilejungleCom.py | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index b92a371a5..fb251ac5f 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -2,14 +2,16 @@ import re import time +import urlparse -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class FilejungleCom(Account): __name__ = "FilejungleCom" __type__ = "account" - __version__ = "0.12" + __version__ = "0.14" + __status__ = "testing" __description__ = """Filejungle.com account plugin""" __license__ = "GPLv3" @@ -23,8 +25,8 @@ class FilejungleCom(Account): LOGIN_FAILED_PATTERN = r'<span htmlfor="loginUser(Name|Password)" generated="true" class="fail_info">' - def loadAccountInfo(self, user, req): - html = req.load(self.URL + "dashboard.php") + def parse_info(self, user, password, data, req): + html = self.load(self.URL + "dashboard.php") m = re.search(self.TRAFFIC_LEFT_PATTERN, html) if m: premium = True @@ -33,18 +35,17 @@ class FilejungleCom(Account): premium = False validuntil = -1 - return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} + return {'premium': premium, 'trafficleft': -1, 'validuntil': validuntil} - def login(self, user, data, req): - html = req.load(self.URL + "login.php", - post={"loginUserName": user, - "loginUserPassword": data['password'], - "loginFormSubmit": "Login", - "recaptcha_challenge_field": "", - "recaptcha_response_field": "", - "recaptcha_shortencode_field": ""}, - decode=True) + def login(self, user, password, data, req): + html = self.load(urlparse.urljoin(self.URL, "login.php"), + post={'loginUserName' : user, + 'loginUserPassword' : password, + 'loginFormSubmit' : "Login", + 'recaptcha_challenge_field' : "", + 'recaptcha_response_field' : "", + 'recaptcha_shortencode_field': ""}) if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrongPassword() + self.login_fail() |