diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-08 00:29:57 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 11:02:23 +0200 |
commit | 68d662e689cd42687341c550fb6ebb74e6968d21 (patch) | |
tree | 486cef41bd928b8db704894233b2cef94a6e346f /module/plugins/accounts/UploadheroCom.py | |
parent | save_join -> safe_join & save_path -> safe_filename (diff) | |
download | pyload-68d662e689cd42687341c550fb6ebb74e6968d21.tar.xz |
module -> pyload
Diffstat (limited to 'module/plugins/accounts/UploadheroCom.py')
-rw-r--r-- | module/plugins/accounts/UploadheroCom.py | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py deleted file mode 100644 index 20f209268..000000000 --- a/module/plugins/accounts/UploadheroCom.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- - -import re -import datetime -import time - -from module.plugins.Account import Account - - -class UploadheroCom(Account): - __name__ = "UploadheroCom" - __type__ = "account" - __version__ = "0.2" - - __description__ = """Uploadhero.co account plugin""" - __author_name__ = "mcmyst" - __author_mail__ = "mcmyst@hotmail.fr" - - - def loadAccountInfo(self, user, req): - premium_pattern = re.compile('Il vous reste <span class="bleu">([0-9]+)</span> jours premium.') - - data = self.getAccountData(user) - page = req.load("http://uploadhero.co/my-account") - - if premium_pattern.search(page): - end_date = datetime.date.today() + datetime.timedelta(days=int(premium_pattern.search(page).group(1))) - end_date = time.mktime(future.timetuple()) - account_info = {"validuntil": end_date, "trafficleft": -1, "premium": True} - else: - account_info = {"validuntil": -1, "trafficleft": -1, "premium": False} - - return account_info - - def login(self, user, data, req): - page = req.load("http://uploadhero.co/lib/connexion.php", - post={"pseudo_login": user, "password_login": data['password']}) - - if "mot de passe invalide" in page: - self.wrongPassword() |