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/UploadheroCom.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/UploadheroCom.py')
-rw-r--r-- | module/plugins/accounts/UploadheroCom.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/module/plugins/accounts/UploadheroCom.py b/module/plugins/accounts/UploadheroCom.py index 18ed69ae6..0e64a3ff5 100644 --- a/module/plugins/accounts/UploadheroCom.py +++ b/module/plugins/accounts/UploadheroCom.py @@ -1,8 +1,12 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import re +import datetime +import time + from module.plugins.Account import Account -import re,datetime,time + class UploadheroCom(Account): __name__ = "UploadheroCom" @@ -12,7 +16,6 @@ class UploadheroCom(Account): __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.') @@ -20,16 +23,17 @@ class UploadheroCom(Account): page = req.load("http://uploadhero.com/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} + 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} + account_info = {"validuntil": -1, "trafficleft": -1, "premium": False} return account_info def login(self, user, data, req): - page = req.load("http://uploadhero.com/lib/connexion.php", post={"pseudo_login": user, "password_login": data["password"]}) + page = req.load("http://uploadhero.com/lib/connexion.php", + post={"pseudo_login": user, "password_login": data["password"]}) if "mot de passe invalide" in page: - self.wrongPassword()
\ No newline at end of file + self.wrongPassword() |