diff options
author | 2014-12-13 15:56:57 +0100 | |
---|---|---|
committer | 2014-12-13 15:56:57 +0100 | |
commit | acc46fc3497a66a427b795b4a22c6e71d69185a1 (patch) | |
tree | 2d315b838a76435fc456b972c99c28d1732b2f70 /pyload/plugins/account/FilejungleCom.py | |
parent | Code fixes (diff) | |
download | pyload-acc46fc3497a66a427b795b4a22c6e71d69185a1.tar.xz |
Update
Diffstat (limited to 'pyload/plugins/account/FilejungleCom.py')
-rw-r--r-- | pyload/plugins/account/FilejungleCom.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/pyload/plugins/account/FilejungleCom.py b/pyload/plugins/account/FilejungleCom.py deleted file mode 100644 index d3dbcd603..000000000 --- a/pyload/plugins/account/FilejungleCom.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -from time import mktime, strptime - -from pyload.plugins.Account import Account - - -class FilejungleCom(Account): - __name = "FilejungleCom" - __type = "account" - __version = "0.11" - - __description = """Filejungle.com account plugin""" - __license = "GPLv3" - __authors = [("zoidberg", "zoidberg@mujmail.cz")] - - - login_timeout = 60 - - URL = "http://filejungle.com/" - TRAFFIC_LEFT_PATTERN = r'"/extend_premium\.php">Until (\d+ \w+ \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() |