diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-22 20:50:34 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-22 21:20:06 +0200 |
commit | aaaf5a4cddec894aacd7400c59a9f2f5e710362f (patch) | |
tree | 9d9e89aff86598b3ffcc86117abd554b193e28b5 /pyload/plugins/hoster/HellspyCz.py | |
parent | implemented media type filter (diff) | |
download | pyload-aaaf5a4cddec894aacd7400c59a9f2f5e710362f.tar.xz |
Fixed PEP 8 violations in Hosters
(cherry picked from commit 2edeee0532ec6d6b4b26fd045a5971f67ca455da)
Conflicts:
pyload/plugins/hoster/BasePlugin.py
pyload/plugins/hoster/MultishareCz.py
pyload/plugins/hoster/NetloadIn.py
pyload/plugins/hoster/PremiumizeMe.py
pyload/plugins/hoster/RapidshareCom.py
Diffstat (limited to 'pyload/plugins/hoster/HellspyCz.py')
-rw-r--r-- | pyload/plugins/hoster/HellspyCz.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pyload/plugins/hoster/HellspyCz.py b/pyload/plugins/hoster/HellspyCz.py index 9858c82b7..2e0746ff4 100644 --- a/pyload/plugins/hoster/HellspyCz.py +++ b/pyload/plugins/hoster/HellspyCz.py @@ -19,6 +19,7 @@ import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + class HellspyCz(SimpleHoster): __name__ = "HellspyCz" __type__ = "hoster" @@ -32,7 +33,7 @@ class HellspyCz(SimpleHoster): FILE_NAME_PATTERN = r'<h1 title="(?P<N>.*?)"' FILE_OFFLINE_PATTERN = r'<h2>(404 - Page|File) not found</h2>' FILE_URL_REPLACEMENTS = [(__pattern__, r"http://www.hellspy.com\1")] - + CREDIT_LEFT_PATTERN = r'<strong>Credits: </strong>\s*(\d+)' DOWNLOAD_AGAIN_PATTERN = r'<a id="button-download-start"[^>]*title="You can download the file without deducting your credit.">' DOWNLOAD_URL_PATTERN = r"launchFullDownload\('([^']+)'" @@ -44,14 +45,14 @@ class HellspyCz(SimpleHoster): def handleFree(self): self.fail("Only premium users can download from HellSpy.cz") - def handlePremium(self): + def handlePremium(self): # set PHPSESSID cookie cj = self.account.getAccountCookies(self.user) cj.setCookie(".hellspy.com", "PHPSESSID", self.account.phpsessid) self.logDebug("PHPSESSID: " + cj.getCookie("PHPSESSID")) info = self.account.getAccountInfo(self.user, True) - self.logInfo("User %s has %i credits left" % (self.user, info["trafficleft"]/1024)) + self.logInfo("User %s has %i credits left" % (self.user, info["trafficleft"] / 1024)) if self.pyfile.size / 1024 > info["trafficleft"]: self.logWarning("Not enough credit left to download file") @@ -59,12 +60,14 @@ class HellspyCz(SimpleHoster): # get premium download URL and download self.html = self.load(self.pyfile.url + "?download=1") found = re.search(self.DOWNLOAD_URL_PATTERN, self.html) - if not found: self.parseError("Download URL") + if not found: + self.parseError("Download URL") url = found.group(1) self.logDebug("Download URL: " + url) self.download(url) info = self.account.getAccountInfo(self.user, True) - self.logInfo("User %s has %i credits left" % (self.user, info["trafficleft"]/1024)) - -getInfo = create_getInfo(HellspyCz)
\ No newline at end of file + self.logInfo("User %s has %i credits left" % (self.user, info["trafficleft"] / 1024)) + + +getInfo = create_getInfo(HellspyCz) |