diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-03 19:58:02 +0200 |
commit | 43e6a6376625ac73067403ddae3b45a80618d6c8 (patch) | |
tree | ceb458c3da1f19e0a91731bc254ee3a158682d0b /pyload/plugins/accounts/FilejungleCom.py | |
parent | [ConfigParser] Remove IGNORE feature (diff) | |
download | pyload-43e6a6376625ac73067403ddae3b45a80618d6c8.tar.xz |
Rename accounts directory to account
Diffstat (limited to 'pyload/plugins/accounts/FilejungleCom.py')
-rw-r--r-- | pyload/plugins/accounts/FilejungleCom.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/pyload/plugins/accounts/FilejungleCom.py b/pyload/plugins/accounts/FilejungleCom.py deleted file mode 100644 index 596e928ed..000000000 --- a/pyload/plugins/accounts/FilejungleCom.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pyload.plugins.base.Account import Account - - -class FilejungleCom(Account): - __name__ = "FilejungleCom" - __type__ = "account" - __version__ = "0.11" - - __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">' - - - def loadAccountInfo(self, user, req): - html = req.load(self.URL + "dashboard.php") - m = re.search(self.TRAFFIC_LEFT_PATTERN, html) - if m: - premium = True - validuntil = mktime(strptime(m.group(1), "%d %b %Y")) - else: - 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, - "loginUserPassword": data['password'], - "loginFormSubmit": "Login", - "recaptcha_challenge_field": "", - "recaptcha_response_field": "", - "recaptcha_shortencode_field": ""}) - - if re.search(self.LOGIN_FAILED_PATTERN, html): - self.wrongPassword() |