diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-23 20:22:42 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-23 20:22:42 +0200 |
commit | f5535809bebc6cc343475704832c8fd8674d2d06 (patch) | |
tree | c59bc1e6d71c04f5545ea262056c0c5be1bd8910 /module/plugins/accounts/FilejungleCom.py | |
parent | Fixed PEP 8 violations in Hosters (diff) | |
download | pyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz |
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/FilejungleCom.py')
-rw-r--r-- | module/plugins/accounts/FilejungleCom.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/module/plugins/accounts/FilejungleCom.py b/module/plugins/accounts/FilejungleCom.py index 8ac25c201..2f2a6012d 100644 --- a/module/plugins/accounts/FilejungleCom.py +++ b/module/plugins/accounts/FilejungleCom.py @@ -17,10 +17,12 @@ @author: zoidberg """ -from module.plugins.Account import Account import re from time import mktime, strptime +from module.plugins.Account import Account + + class FilejungleCom(Account): __name__ = "FilejungleCom" __version__ = "0.11" @@ -28,9 +30,9 @@ class FilejungleCom(Account): __description__ = """filejungle.com account plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - + login_timeout = 60 - + URL = "http://filejungle.com/" TRAFFIC_LEFT_PATTERN = r'"/extend_premium\.php">Until (\d+ [A-Za-z]+ \d+)<br' LOGIN_FAILED_PATTERN = r'<span htmlfor="loginUser(Name|Password)" generated="true" class="fail_info">' @@ -42,19 +44,19 @@ class FilejungleCom(Account): premium = True validuntil = mktime(strptime(found.group(1), "%d %b %Y")) else: - premium = False + premium = False validuntil = -1 return {"premium": premium, "trafficleft": -1, "validuntil": validuntil} def login(self, user, data, req): html = req.load(self.URL + "login.php", post={ - "loginUserName": user, + "loginUserName": user, "loginUserPassword": data["password"], "loginFormSubmit": "Login", - "recaptcha_challenge_field": "", - "recaptcha_response_field": "", + "recaptcha_challenge_field": "", + "recaptcha_response_field": "", "recaptcha_shortencode_field": ""}) - + if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrongPassword()
\ No newline at end of file + self.wrongPassword() |