diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-17 18:59:20 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-24 22:42:40 +0200 |
commit | 20b6a2ec022202b0efb6cb69415239fb8f4d1445 (patch) | |
tree | fdbb3ad42854144b1cace0221145a472b36ef84d /module/plugins/accounts | |
parent | Spare code cosmetics (diff) | |
download | pyload-20b6a2ec022202b0efb6cb69415239fb8f4d1445.tar.xz |
Spare code cosmetics (2)
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/FastshareCz.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/FilecloudIo.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/FilerNet.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/FourSharedCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/FreeWayMe.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/LetitbitNet.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/MegaDebridEu.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/MyfastfileCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/NoPremiumPl.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/OverLoadMe.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/PremiumizeMe.py | 12 | ||||
-rw-r--r-- | module/plugins/accounts/RPNetBiz.py | 10 | ||||
-rw-r--r-- | module/plugins/accounts/RapideoPl.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/SmoozedCom.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 2 |
15 files changed, 27 insertions, 27 deletions
diff --git a/module/plugins/accounts/FastshareCz.py b/module/plugins/accounts/FastshareCz.py index d1d79f7b1..54253041c 100644 --- a/module/plugins/accounts/FastshareCz.py +++ b/module/plugins/accounts/FastshareCz.py @@ -40,7 +40,7 @@ class FastshareCz(Account): def login(self, user, data, req): req.cj.setCookie("fastshare.cz", "lang", "en") - self.load('http://www.fastshare.cz/login', req=req) # Do not remove or it will not login + self.load('http://www.fastshare.cz/login', req=req) #: Do not remove or it will not login html = self.load("https://www.fastshare.cz/sql.php", post={'login': user, 'heslo': data['password']}, req=req) diff --git a/module/plugins/accounts/FilecloudIo.py b/module/plugins/accounts/FilecloudIo.py index 300159acf..4d69a2ae2 100644 --- a/module/plugins/accounts/FilecloudIo.py +++ b/module/plugins/accounts/FilecloudIo.py @@ -16,7 +16,7 @@ class FilecloudIo(Account): def loadAccountInfo(self, user, req): - # It looks like the first API request always fails, so we retry 5 times, it should work on the second try + #: It looks like the first API request always fails, so we retry 5 times, it should work on the second try for _i in xrange(5): rep = self.load("https://secure.filecloud.io/api-fetch_apikey.api", post={"username": user, "password": self.getAccountData(user)['password']}) @@ -30,7 +30,7 @@ class FilecloudIo(Account): return {"premium": False} akey = rep['akey'] - self.accounts[user]['akey'] = akey # Saved for hoster plugin + self.accounts[user]['akey'] = akey #: Saved for hoster plugin rep = self.load("http://api.filecloud.io/api-fetch_account_details.api", post={"akey": akey}, req=req) rep = json_loads(rep) diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index aca09a7ed..9ab900831 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -25,7 +25,7 @@ class FilerNet(Account): def loadAccountInfo(self, user, req): html = self.load("https://filer.net/profile", req=req) - # Free user + #: Free user if re.search(self.FREE_PATTERN, html): return {"premium": False, "validuntil": None, "trafficleft": None} diff --git a/module/plugins/accounts/FourSharedCom.py b/module/plugins/accounts/FourSharedCom.py index 041671b9a..2f79d944c 100644 --- a/module/plugins/accounts/FourSharedCom.py +++ b/module/plugins/accounts/FourSharedCom.py @@ -15,7 +15,7 @@ class FourSharedCom(Account): def loadAccountInfo(self, user, req): - # Free mode only for now + #: Free mode only for now return {"premium": False} diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index 5a1f75bf6..b9a0acea7 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -35,7 +35,7 @@ class FreeWayMe(Account): def login(self, user, data, req): status = self.getAccountStatus(user, req) - # Check if user and password are valid + #: Check if user and password are valid if not status: self.wrongPassword() diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 6b538c1f0..811abd971 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -30,5 +30,5 @@ class LetitbitNet(Account): def login(self, user, data, req): - # API_KEY is the username and the PREMIUM_KEY is the password + #: API_KEY is the username and the PREMIUM_KEY is the password self.logInfo(_("You must use your API KEY as username and the PREMIUM KEY as password")) diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 9a7508617..53c67833c 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -14,7 +14,7 @@ class MegaDebridEu(Account): __authors__ = [("D.Ducatel", "dducatel@je-geek.fr")] - # Define the base URL of MegaDebrid api + #: Define the base URL of MegaDebrid api API_URL = "https://www.mega-debrid.eu/api.php" diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index a854dd826..258c99346 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -25,7 +25,7 @@ class MyfastfileCom(Account): def login(self, user, data, req): - # Password to use is the API-Password written in http://myfastfile.com/myaccount + #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", get={"user": user, "pass": data['password']}, req=req) diff --git a/module/plugins/accounts/NoPremiumPl.py b/module/plugins/accounts/NoPremiumPl.py index 024cdfebe..30822791b 100644 --- a/module/plugins/accounts/NoPremiumPl.py +++ b/module/plugins/accounts/NoPremiumPl.py @@ -36,7 +36,7 @@ class NoPremiumPl(Account): try: result = json_loads(self.runAuthQuery()) except Exception: - # todo: return or let it be thrown? + #@TODO: return or let it be thrown? return premium = False diff --git a/module/plugins/accounts/OverLoadMe.py b/module/plugins/accounts/OverLoadMe.py index e7e1b71e1..898c122cd 100644 --- a/module/plugins/accounts/OverLoadMe.py +++ b/module/plugins/accounts/OverLoadMe.py @@ -23,7 +23,7 @@ class OverLoadMe(Account): data = json_loads(html) self.logDebug(data) - # Check for premium + #: Check for premium if data['membership'] == "Free": return {'premium': False, 'validuntil': None, 'trafficleft': None} else: diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index 686898ca4..d7f0b7391 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -15,11 +15,11 @@ class PremiumizeMe(Account): def loadAccountInfo(self, user, req): - # Get user data from premiumize.me + #: Get user data from premiumize.me status = self.getAccountStatus(user, req) self.logDebug(status) - # Parse account info + #: Parse account info account_info = {"validuntil": float(status['result']['expires']), "trafficleft": max(0, status['result']['trafficleft_bytes'] / 1024)} #@TODO: Remove `/ 1024` in 0.4.10 @@ -30,17 +30,17 @@ class PremiumizeMe(Account): def login(self, user, data, req): - # Get user data from premiumize.me + #: Get user data from premiumize.me status = self.getAccountStatus(user, req) - # Check if user and password are valid + #: Check if user and password are valid if status['status'] != 200: self.wrongPassword() def getAccountStatus(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 + #: Use premiumize.me API v1 (see https://secure.premiumize.me/?show=api) + #: 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 509febde6..be456f2d7 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -15,11 +15,11 @@ class RPNetBiz(Account): def loadAccountInfo(self, user, req): - # Get account information from rpnet.biz + #: Get account information from rpnet.biz res = self.getAccountStatus(user, req) try: if res['accountInfo']['isPremium']: - # Parse account info. Change the trafficleft later to support per host info. + #: Parse account info. Change the trafficleft later to support per host info. account_info = {"validuntil": float(res['accountInfo']['premiumExpiry']), "trafficleft": -1, "premium": True} else: @@ -33,16 +33,16 @@ class RPNetBiz(Account): def login(self, user, data, req): - # Get account information from rpnet.biz + #: Get account information from rpnet.biz res = self.getAccountStatus(user, req) - # If we have an error in the res, we have wrong login information + #: If we have an error in the res, we have wrong login information if 'error' in res: self.wrongPassword() def getAccountStatus(self, user, req): - # Using the rpnet API, check if valid premium account + #: Using the rpnet API, check if valid premium account res = self.load("https://premium.rpnet.biz/client_api.php", get={"username": user, "password": self.getAccountData(user)['password'], "action": "showAccountInformation"}) diff --git a/module/plugins/accounts/RapideoPl.py b/module/plugins/accounts/RapideoPl.py index 8b868ee07..0fc934255 100644 --- a/module/plugins/accounts/RapideoPl.py +++ b/module/plugins/accounts/RapideoPl.py @@ -36,7 +36,7 @@ class RapideoPl(Account): try: result = json_loads(self.runAuthQuery()) except Exception: - # todo: return or let it be thrown? + #@TODO: return or let it be thrown? return premium = False diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index da81a6b80..148818957 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -43,7 +43,7 @@ class SmoozedCom(Account): 'trafficleft': None, 'premium' : False} else: - # Parse account info + #: Parse account info info = {'validuntil' : float(status["data"]["user"]["user_premium"]), 'trafficleft': max(0, status["data"]["traffic"][1] - status["data"]["traffic"][0]), 'session' : status["data"]["session_key"], @@ -61,10 +61,10 @@ class SmoozedCom(Account): def login(self, user, data, req): - # Get user data from premiumize.me + #: Get user data from premiumize.me status = self.getAccountStatus(user, req) - # Check if user and password are valid + #: Check if user and password are valid if status['state'] != 'ok': self.wrongPassword() diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 8cdfab0c6..55bddabae 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -61,7 +61,7 @@ class UploadedTo(Account): def login(self, user, data, req): - # req.cj.setCookie("uploaded.net", "lang", "en") + #: req.cj.setCookie("uploaded.net", "lang", "en") html = self.load("https://uploaded.net/io/login", post={'id': user, 'pw': data['password'], '_': ""}, req=req) |