From acc46fc3497a66a427b795b4a22c6e71d69185a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 13 Dec 2014 15:56:57 +0100 Subject: Update --- pyload/plugins/hoster/MultishareCz.py | 80 ----------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 pyload/plugins/hoster/MultishareCz.py (limited to 'pyload/plugins/hoster/MultishareCz.py') diff --git a/pyload/plugins/hoster/MultishareCz.py b/pyload/plugins/hoster/MultishareCz.py deleted file mode 100644 index 0a3f78cea..000000000 --- a/pyload/plugins/hoster/MultishareCz.py +++ /dev/null @@ -1,80 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from random import random - -from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo - - -class MultishareCz(SimpleHoster): - __name = "MultishareCz" - __type = "hoster" - __version = "0.35" - - __pattern = r'http://(?:www\.)?multishare\.cz/stahnout/(?P\d+).*' - - __description = """MultiShare.cz hoster plugin""" - __license = "GPLv3" - __authors = [("zoidberg", "zoidberg@mujmail.cz")] - - - SIZE_REPLACEMENTS = [(' ', '')] - - MULTI_HOSTER = True - - INFO_PATTERN = ur'(?:
  • Název|Soubor): (?P[^<]+)<(?:/li>Velikost: (?P[^<]+)' - OFFLINE_PATTERN = ur'

    Stáhnout soubor

    Požadovaný soubor neexistuje.

    ' - - - def process(self, pyfile): - msurl = re.match(self.__pattern, pyfile.url) - if msurl: - self.fileID = msurl.group('ID') - self.html = self.load(pyfile.url, decode=True) - self.getFileInfo() - - if self.premium: - self.handlePremium() - else: - self.handleFree() - else: - self.handleOverriden() - - - def handleFree(self): - self.download("http://www.multishare.cz/html/download_free.php?ID=%s" % self.fileID) - - - def handlePremium(self): - if not self.checkCredit(): - 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) - - - 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.checkCredit(): - 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) - - - def checkCredit(self): - self.acc_info = self.account.getAccountInfo(self.user, True) - self.logInfo(_("User %s has %i MB left") % (self.user, self.acc_info['trafficleft'] / 1024)) - - return self.pyfile.size / 1024 <= self.acc_info['trafficleft'] - - -getInfo = create_getInfo(MultishareCz) -- cgit v1.2.3