diff options
Diffstat (limited to 'module/plugins/hoster')
| -rw-r--r-- | module/plugins/hoster/MultishareCz.py | 19 | ||||
| -rw-r--r-- | module/plugins/hoster/NoPremiumPl.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/PremiumTo.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/RapideoPl.py | 5 | ||||
| -rw-r--r-- | module/plugins/hoster/RehostTo.py | 4 | ||||
| -rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 6 | ||||
| -rw-r--r-- | module/plugins/hoster/SimplydebridCom.py | 2 | 
7 files changed, 20 insertions, 26 deletions
| diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index ee84f613f..421ad111b 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class MultishareCz(SimpleHoster):      __name__    = "MultishareCz"      __type__    = "hoster" -    __version__ = "0.38" +    __version__ = "0.39"      __pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+)' @@ -21,7 +21,8 @@ class MultishareCz(SimpleHoster):      SIZE_REPLACEMENTS = [(' ', '')] -    MULTI_HOSTER = True +    CHECK_TRAFFIC = True +    MULTI_HOSTER  = True      INFO_PATTERN    = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'      OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>' @@ -32,10 +33,6 @@ class MultishareCz(SimpleHoster):      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.info['pattern']['ID']) @@ -44,7 +41,7 @@ class MultishareCz(SimpleHoster):          self.checkInfo() -        if not self.checkCredit(): +        if not self.checkTrafficLeft():              self.fail(_("Not enough credit left to download file"))          self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random()), @@ -54,12 +51,4 @@ class MultishareCz(SimpleHoster):                        disposition=True) -    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) diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py index f4f7ba56a..feedd7651 100644 --- a/module/plugins/hoster/NoPremiumPl.py +++ b/module/plugins/hoster/NoPremiumPl.py @@ -43,8 +43,9 @@ class NoPremiumPl(SimpleHoster):          if not self.account:              self.fail(_("Please enter your %s account or deactivate this plugin") % "NoPremium.pl")          else: -            self._usr = self.account.getAccountData(self.user).get('usr') -            self._pwd = self.account.getAccountData(self.user).get('pwd') +            data = self.account.getAccountData(self.user) +            self._usr = data['usr'] +            self._pwd = data['pwd']      def runFileQuery(self, url, mode=None):          query = self._api_query.copy() diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py index 8a998c816..11d4e9541 100644 --- a/module/plugins/hoster/PremiumTo.py +++ b/module/plugins/hoster/PremiumTo.py @@ -11,7 +11,7 @@ from module.utils import fs_encode  class PremiumTo(MultiHoster):      __name__    = "PremiumTo"      __type__    = "hoster" -    __version__ = "0.18" +    __version__ = "0.19"      __pattern__ = r'^unmatchable$' @@ -22,6 +22,9 @@ class PremiumTo(MultiHoster):                         ("stickell", "l.stickell@yahoo.it")] +    CHECK_TRAFFIC = True + +      def handlePremium(self):          #raise timeout to 2min          self.download("http://premium.to/api/getfile.php", diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py index 9fd20e69e..7260ebbe3 100644 --- a/module/plugins/hoster/RapideoPl.py +++ b/module/plugins/hoster/RapideoPl.py @@ -41,8 +41,9 @@ class RapideoPl(SimpleHoster):          if not self.account:              self.fail(_("Please enter your %s account or deactivate this plugin") % "Rapideo.pl")          else: -            self._usr = self.account.getAccountData(self.user).get('usr') -            self._pwd = self.account.getAccountData(self.user).get('pwd') +            data = self.account.getAccountData(self.user) +            self._usr = data['usr'] +            self._pwd = data['pwd']      def runFileQuery(self, url, mode=None):          query = self._api_query.copy() diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 5dd17e374..96443d5f5 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo  class RehostTo(MultiHoster):      __name__    = "RehostTo"      __type__    = "hoster" -    __version__ = "0.17" +    __version__ = "0.18"      __pattern__ = r'https?://.*rehost\.to\..+' @@ -22,7 +22,7 @@ class RehostTo(MultiHoster):      def handlePremium(self): -        data = self.account.getAccountInfo(self.user) +        data = self.account.getAccountData(self.user)          self.download("http://rehost.to/process_download.php",                        get={'user': "cookie", diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index dc3d5093c..bbf75c94a 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo  class ShareonlineBiz(SimpleHoster):      __name__    = "ShareonlineBiz"      __type__    = "hoster" -    __version__ = "0.45" +    __version__ = "0.46"      __pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P<ID>\w+)' @@ -28,6 +28,8 @@ class ShareonlineBiz(SimpleHoster):      URL_REPLACEMENTS = [(__pattern__ + ".*", "http://www.share-online.biz/dl/\g<ID>")] +    CHECK_TRAFFIC = True +      RECAPTCHA_KEY = "6LdatrsSAAAAAHZrB70txiV5p-8Iv8BtVxlTtjKX"      ERROR_INFO_PATTERN = r'<p class="b">Information:</p>\s*<div>\s*<strong>(.*?)</strong>' @@ -125,8 +127,6 @@ class ShareonlineBiz(SimpleHoster):      def handlePremium(self):  #: should be working better loading (account) api internally -        self.account.getAccountInfo(self.user, True) -          html = self.load("http://api.share-online.biz/account.php",                          {"username": self.user, "password": self.account.accounts[self.user]['password'],                           "act": "download", "lid": self.info['fileid']}) diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py index 8211d40d4..0be9bfa12 100644 --- a/module/plugins/hoster/SimplydebridCom.py +++ b/module/plugins/hoster/SimplydebridCom.py @@ -36,7 +36,7 @@ class SimplydebridCom(MultiHoster):          self.logDebug("New URL: %s" % self.link)          if not re.match(self.__pattern__, self.link): -            page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link})  # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password']) +            page = self.load("http://simply-debrid.com/api.php", get={'dl': self.link})              if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page):                  self.fail(_("Unable to unrestrict link"))              self.link = page | 
