self.download( "http://www.multishare.cz/html/download_premium.php?ID=%s" % self.fileID) self.checkTrafficLeft() def handleOverriden(self): if not self.premium: self.fail("Only premium users can download from other hosters") self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": self.pyfile.url}, decode=True) self.getFileInfo() if not self.checkTrafficLeft(): self.fail("Not enough credit left to download file") url = "http://dl%d.mms.multishare.cz/html/mms_process.php" % round( random() * 10000 * random()) params = { "u_ID": self.acc_info["u_ID"], "u_hash": self.acc_info["u_hash"], "link": self.pyfile.url } self.logDebug(url, params) self.download(url, get=params) self.checkTrafficLeft() getInfo = create_getInfo(MultishareCz)
self.fail("No valid captcha code entered") #download url self.html = self.load("http://bezvadata.cz%s" % action, post=inputs) self.checkErrors() found = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', self.html) if not found: self.parseError("page2 URL") url = "http://bezvadata.cz%s" % found.group(1) self.logDebug("DL URL %s" % url) #countdown found = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) wait_time = (int(found.group(1)) * 60 + int(found.group(2)) + 1) if found else 120 self.setWait(wait_time, False) self.wait() self.download(url) def checkErrors(self): if 'images/button-download-disable.png' in self.html: self.longWait(300, 24) # parallel dl limit elif '<div class="infobox' in self.html: self.tempOffline() def loadcaptcha(self, data, *args, **kwargs): return data.decode("base64") getInfo = create_getInfo(BezvadataCz)
#download url self.html = self.load("http://bezvadata.cz%s" % action, post=inputs) self.checkErrors() found = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', self.html) if not found: self.parseError("page2 URL") url = "http://bezvadata.cz%s" % found.group(1) self.logDebug("DL URL %s" % url) #countdown found = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html) wait_time = (int(found.group(1)) * 60 + int(found.group(2)) + 1) if found else 120 self.setWait(wait_time, False) self.wait() self.download(url) def checkErrors(self): if 'images/button-download-disable.png' in self.html: self.longWait(300, 24) # parallel dl limit elif '<div class="infobox' in self.html: self.tempOffline() def loadcaptcha(self, data, *args, **kwargs): return data.decode("base64") getInfo = create_getInfo(BezvadataCz)
def handleFree(self): self.download("http://www.multishare.cz/html/download_free.php?ID=%s" % self.fileID) def handlePremium(self): if not self.checkTrafficLeft(): self.logWarning("Not enough credit left to download file") self.resetAccount() self.download("http://www.multishare.cz/html/download_premium.php?ID=%s" % self.fileID) self.checkTrafficLeft() def handleOverriden(self): if not self.premium: self.fail("Only premium users can download from other hosters") self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": self.pyfile.url}, decode=True) self.getFileInfo() if not self.checkTrafficLeft(): self.fail("Not enough credit left to download file") url = "http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()) params = {"u_ID": self.acc_info["u_ID"], "u_hash": self.acc_info["u_hash"], "link": self.pyfile.url} self.logDebug(url, params) self.download(url, get=params) self.checkTrafficLeft() getInfo = create_getInfo(MultishareCz)