From 8e7d14bae4d3c836f029a1235eb227380acc3f75 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 16 Feb 2015 21:59:10 +0100 Subject: Fix plugins to work on 0.4.10 --- module/plugins/hoster/SimplyPremiumCom.py | 81 ------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 module/plugins/hoster/SimplyPremiumCom.py (limited to 'module/plugins/hoster/SimplyPremiumCom.py') diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py deleted file mode 100644 index a87e7533f..000000000 --- a/module/plugins/hoster/SimplyPremiumCom.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- - -import re - -from datetime import datetime, timedelta - -from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -from module.plugins.internal.SimpleHoster import secondsToMidnight - - -class SimplyPremiumCom(MultiHoster): - __name__ = "SimplyPremiumCom" - __type__ = "hoster" - __version__ = "0.08" - - __pattern__ = r'https?://.+simply-premium\.com' - - __description__ = """Simply-Premium.com multi-hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("EvolutionClip", "evolutionclip@live.de")] - - - def setup(self): - self.chunkLimit = 16 - - - def checkErrors(self): - if '0' in self.html or ( - "You are not allowed to download from this host" in self.html and self.premium): - self.account.relogin(self.user) - self.retry() - - elif "NOTFOUND" in self.html: - self.offline() - - elif "downloadlimit" in self.html: - self.logWarning(_("Reached maximum connctions")) - self.retry(5, 60, _("Reached maximum connctions")) - - elif "trafficlimit" in self.html: - self.logWarning(_("Reached daily limit for this host")) - self.retry(wait_time=secondsToMidnight(gmt=2), reason="Daily limit for this host reached") - - elif "hostererror" in self.html: - self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry")) - self.retry(5, 60, _("Hoster is temporarily unavailable")) - - - def handlePremium(self, pyfile): - for i in xrange(5): - self.html = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url}) - - if self.html: - self.logDebug("JSON data: " + self.html) - break - else: - self.logInfo(_("Unable to get API data, waiting 1 minute and retry")) - self.retry(5, 60, _("Unable to get API data")) - - self.checkErrors() - - try: - self.pyfile.name = re.search(r'([^<]+)', self.html).group(1) - - except AttributeError: - self.pyfile.name = "" - - try: - self.pyfile.size = re.search(r'(\d+)', self.html).group(1) - - except AttributeError: - self.pyfile.size = 0 - - try: - self.link = re.search(r'([^<]+)', self.html).group(1) - - except AttributeError: - self.link = 'http://www.simply-premium.com/premium.php?link=' + self.pyfile.url - - -getInfo = create_getInfo(SimplyPremiumCom) -- cgit v1.2.3