diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-19 00:05:58 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-19 00:05:58 +0200 |
commit | dad722ac7255640e7e0541c4094a4d2e4de79cd3 (patch) | |
tree | 893a08e83fb9b465cd0ecf0b0315a5e820b06b06 /module/plugins/accounts | |
parent | [Hoster] Fix the http request issue (diff) | |
download | pyload-dad722ac7255640e7e0541c4094a4d2e4de79cd3.tar.xz |
Code cosmetics (2)
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/AlldebridCom.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/FileserveCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/HellshareCz.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/LetitbitNet.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/MegaRapidoNet.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/PremiumizeMe.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/RPNetBiz.py | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index cfa7840bc..9c27c18d0 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -24,7 +24,7 @@ class AlldebridCom(Account): html = self.load("http://www.alldebrid.com/account/") soup = BeautifulSoup.BeautifulSoup(html) - # Try to parse expiration date directly from the control panel page (better accuracy) + #: Try to parse expiration date directly from the control panel page (better accuracy) try: time_text = soup.find('div', attrs={'class': 'remaining_time_text'}).strong.string @@ -35,7 +35,7 @@ class AlldebridCom(Account): exp_time = time.time() + int(exp_data[0]) * 24 * 60 * 60 + int( exp_data[1]) * 60 * 60 + (int(exp_data[2]) - 1) * 60 - # Get expiration date from API + #: Get expiration date from API except Exception: data = self.get_account_data(user) html = self.load("https://www.alldebrid.com/api.php", diff --git a/module/plugins/accounts/FileserveCom.py b/module/plugins/accounts/FileserveCom.py index 90ddc5fd2..edbf4a1cf 100644 --- a/module/plugins/accounts/FileserveCom.py +++ b/module/plugins/accounts/FileserveCom.py @@ -42,7 +42,7 @@ class FileserveCom(Account): if not res['type']: self.wrong_password() - # login at fileserv html + #: Login at fileserv html self.load("http://www.fileserve.com/login.php", post={"loginUserName": user, "loginUserPassword": data['password'], diff --git a/module/plugins/accounts/HellshareCz.py b/module/plugins/accounts/HellshareCz.py index bd6f72972..9556f2bda 100644 --- a/module/plugins/accounts/HellshareCz.py +++ b/module/plugins/accounts/HellshareCz.py @@ -33,14 +33,14 @@ class HellshareCz(Account): premium = True try: if "." in credit: - # Time-based account + #: Time-based account vt = [int(x) for x in credit.split('.')[:2]] lt = time.localtime() year = lt.tm_year + int(vt[1] < lt.tm_mon or (vt[1] == lt.tm_mon and vt[0] < lt.tm_mday)) validuntil = time.mktime(time.strptime("%s%d 23:59:59" % (credit, year), "%d.%m.%Y %H:%M:%S")) trafficleft = -1 else: - # Traffic-based account + #: Traffic-based account trafficleft = self.parse_traffic(credit + "MB") validuntil = -1 except Exception, e: @@ -54,7 +54,7 @@ class HellshareCz(Account): def login(self, user, data, req): html = self.load('http://www.hellshare.com/') if req.lastEffectiveURL != 'http://www.hellshare.com/': - # Switch to English + #: Switch to English self.log_debug("Switch lang - URL: %s" % req.lastEffectiveURL) json = self.load("%s?do=locRouter-show" % req.lastEffectiveURL) diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 4702648a3..45295d379 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -16,10 +16,10 @@ class LetitbitNet(Account): def load_account_info(self, user, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.get_account_data(user)['password'] + # api_key = self.get_account_data(user)['password'] # json_data = [api_key, ['key/info']] - # api_rep = self.load("http://api.letitbit.net/json", - # post={'r': json_dumps(json_data)}) + # api_rep = self.load("http://api.letitbit.net/json", + # post={'r': json_dumps(json_data)}) # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # diff --git a/module/plugins/accounts/MegaRapidoNet.py b/module/plugins/accounts/MegaRapidoNet.py index 92e5242bb..c07f97842 100644 --- a/module/plugins/accounts/MegaRapidoNet.py +++ b/module/plugins/accounts/MegaRapidoNet.py @@ -29,7 +29,7 @@ class MegaRapidoNet(Account): validuntil = re.search(self.VALID_UNTIL_PATTERN, html) if validuntil: - # hier weitermachen!!! (müssen umbedingt die zeit richtig machen damit! (sollte aber möglich)) + #: Hier weitermachen!!! (müssen umbedingt die zeit richtig machen damit! (sollte aber möglich)) validuntil = time.time() + int(validuntil.group(1)) * 24 * 3600 + int(validuntil.group(2)) * 3600 + int(validuntil.group(3)) * 60 + int(validuntil.group(4)) trafficleft = -1 premium = True diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index a2a6c139c..869000f04 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -40,7 +40,7 @@ class PremiumizeMe(Account): def get_account_status(self, user, req): #: Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) - #: to retrieve account info and return the parsed json answer + #: To retrieve account info and return the parsed json answer answer = self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10 get={'method' : "accountstatus", 'params[login]': user, diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py index d103e918d..db5dbbb24 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -26,7 +26,7 @@ class RPNetBiz(Account): account_info = {"validuntil": None, "trafficleft": None, "premium": False} except KeyError: - # handle wrong password exception + #: Handle wrong password exception account_info = {"validuntil": None, "trafficleft": None, "premium": False} return account_info |