From 7f239b41cb29ee95c878f78a6e9cacd55f301a8d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 13 Dec 2013 11:20:19 +0100 Subject: Some hosters marked as dead Merged #375 --- module/plugins/hoster/HellspyCz.py | 47 +++----------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) (limited to 'module/plugins/hoster/HellspyCz.py') diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py index 2e0746ff4..1bb595599 100644 --- a/module/plugins/hoster/HellspyCz.py +++ b/module/plugins/hoster/HellspyCz.py @@ -16,58 +16,17 @@ @author: zoidberg """ -import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo -class HellspyCz(SimpleHoster): +class HellspyCz(DeadHoster): __name__ = "HellspyCz" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)*(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj.pl)(/\S+/\d+)/?.*" - __version__ = "0.27" + __version__ = "0.28" __description__ = """HellSpy.cz""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - FILE_SIZE_PATTERN = r'(?P[0-9.]+)\s*(?P[kKMG])i?B' - FILE_NAME_PATTERN = r'

(404 - Page|File) not found

' - FILE_URL_REPLACEMENTS = [(__pattern__, r"http://www.hellspy.com\1")] - - CREDIT_LEFT_PATTERN = r'Credits: \s*(\d+)' - DOWNLOAD_AGAIN_PATTERN = r']*title="You can download the file without deducting your credit.">' - DOWNLOAD_URL_PATTERN = r"launchFullDownload\('([^']+)'" - - def setup(self): - self.resumeDownload = self.multiDL = True - self.chunkLimit = 1 - - def handleFree(self): - self.fail("Only premium users can download from HellSpy.cz") - - 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)) - - if self.pyfile.size / 1024 > info["trafficleft"]: - self.logWarning("Not enough credit left to download file") - - # 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") - 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) -- cgit v1.2.3