From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/hoster/PremiumizeMe.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/hoster/PremiumizeMe.py') diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py index e1f982d78..8e7d74012 100644 --- a/module/plugins/hoster/PremiumizeMe.py +++ b/module/plugins/hoster/PremiumizeMe.py @@ -18,27 +18,27 @@ class PremiumizeMe(MultiHoster): def handlePremium(self, pyfile): - # In some cases hostsers do not supply us with a filename at download, so we - # are going to set a fall back filename (e.g. for freakshare or xfileshare) - pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash + #: In some cases hostsers do not supply us with a filename at download, so we + #: are going to set a fall back filename (e.g. for freakshare or xfileshare) + pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash - # Correction for automatic assigned filename: Removing html at end if needed + #: Correction for automatic assigned filename: Removing html at end if needed suffix_to_remove = ["html", "htm", "php", "php3", "asp", "shtm", "shtml", "cfml", "cfm"] temp = pyfile.name.split('.') if temp.pop() in suffix_to_remove: pyfile.name = ".".join(temp) - # Get account data + #: Get account data user, data = self.account.selectAccount() - # Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api) + #: Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api) data = json_loads(self.load("http://api.premiumize.me/pm-api/v1.php", #@TODO: Revert to `https` in 0.4.10 get={'method' : "directdownloadlink", 'params[login]': user, 'params[pass]' : data['password'], 'params[link]' : pyfile.url})) - # Check status and decide what to do + #: Check status and decide what to do status = data['status'] if status == 200: -- cgit v1.2.3