From fcdc1f730118050e390ad2d9fa337ce62809d9a6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 30 May 2015 15:54:38 +0200 Subject: [SimpleCrypter] Merge with SimpleDereferer --- module/plugins/internal/SimpleHoster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 1d44a6642..c333f34b0 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -511,7 +511,7 @@ class SimpleHoster(Hoster): self.correctCaptcha() - link = html_unescape(link.strip().decode('unicode-escape')) #@TODO: Move this check to plugin `load` method in 0.4.10 + link = html_unescape(link.decode('unicode-escape').strip()) #@TODO: Move this check to plugin `load` method in 0.4.10 if not urlparse.urlparse(link).scheme: url_p = urlparse.urlparse(self.pyfile.url) -- cgit v1.2.3 From ee383fe3d45aded7be86d3b06e256c94829614e1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 1 Jun 2015 19:46:11 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1445 --- module/plugins/internal/SimpleHoster.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index c333f34b0..222ba4b05 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.50" + __version__ = "1.51" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -474,7 +474,7 @@ class SimpleHoster(Hoster): if not self.link and not self.lastDownload: self.MULTI_HOSTER = False - self.retry(1, reason="Multi hoster fails") + self.retry(1, reason=_("Multi hoster fails")) if not self.link and not self.lastDownload: self.preload() @@ -635,9 +635,14 @@ class SimpleHoster(Hoster): elif re.search('up to', errmsg, re.I): self.fail(_("File too large for free download")) - elif re.search('offline|delet|remov|not (found|available)', errmsg, re.I): + elif re.search('offline|delet|remov|not? (found|(longer)? available)', errmsg, re.I): self.offline() + elif re.search('filename', errmsg, re.I): + url_p = urlparse.urlparse(self.pyfile.url) + self.pyfile.url = "%s://%s/%s" % (url_p.scheme, url_p.netloc, url_p.path.strip('/').split('/')[0]) + self.retry(1, reason=_("Wrong url")) + elif re.search('premium', errmsg, re.I): self.fail(_("File can be downloaded by premium users only")) -- cgit v1.2.3 From 6637b832d74e0cf1fb96a1731daeb5832ea31822 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 2 Jun 2015 01:10:08 +0200 Subject: [SimpleCrypter] Update --- module/plugins/internal/SimpleHoster.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 222ba4b05..52ec25a5a 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.51" + __version__ = "1.52" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -308,13 +308,14 @@ class SimpleHoster(Hoster): SIZE_REPLACEMENTS = [] URL_REPLACEMENTS = [] - TEXT_ENCODING = False #: Set to True or encoding name if encoding value in http header is not correct - COOKIES = True #: or False or list of tuples [(domain, name, value)] CHECK_TRAFFIC = False #: Set to True to force checking traffic left for premium account + COOKIES = True #: or False or list of tuples [(domain, name, value)] DIRECT_LINK = None #: Set to True to looking for direct link (as defined in handleDirect method), set to None to do it if self.account is True else False - MULTI_HOSTER = False #: Set to True to leech other hoster link (as defined in handleMulti method) - LOGIN_ACCOUNT = False #: Set to True to require account login DISPOSITION = True #: Set to True to use any content-disposition value in http header as file name + LOGIN_ACCOUNT = False #: Set to True to require account login + LOGIN_PREMIUM = False #: Set to True to require premium account login + MULTI_HOSTER = False #: Set to True to leech other hoster link (as defined in handleMulti method) + TEXT_ENCODING = False #: Set to True or encoding name if encoding value in http header is not correct directLink = getFileURL #@TODO: Remove in 0.4.10 @@ -430,6 +431,9 @@ class SimpleHoster(Hoster): if not self.getConfig('use_premium', True): self.retryFree() + if self.LOGIN_PREMIUM and not self.premium: + self.fail(_("Required premium account not found")) + if self.LOGIN_ACCOUNT and not self.account: self.fail(_("Required account not found")) -- cgit v1.2.3 From f8ee62fa313beddc7af46dc1c361adb8577d0fa4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 2 Jun 2015 03:26:41 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1446 --- module/plugins/internal/SimpleHoster.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 52ec25a5a..16e9c7f2e 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -317,6 +317,7 @@ class SimpleHoster(Hoster): MULTI_HOSTER = False #: Set to True to leech other hoster link (as defined in handleMulti method) TEXT_ENCODING = False #: Set to True or encoding name if encoding value in http header is not correct + directLink = getFileURL #@TODO: Remove in 0.4.10 -- cgit v1.2.3 From 3abd6df2b3df9cecdfd9aca298476e258b98a183 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 2 Jun 2015 12:37:59 +0200 Subject: [NitroflareCom] Premium support --- module/plugins/internal/SimpleHoster.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 16e9c7f2e..33e7d3674 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.52" + __version__ = "1.53" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -630,6 +630,7 @@ class SimpleHoster(Hoster): elif re.search('captcha|code', errmsg, re.I): self.invalidCaptcha() + self.retry(10, reason=_("Wrong captcha")) elif re.search('countdown|expired', errmsg, re.I): self.retry(wait_time=60, reason=_("Link expired")) -- cgit v1.2.3 From 08d629c98d7c0acb24dd03c785f3d64fb98bbdeb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 5 Jun 2015 16:23:42 +0200 Subject: Fix http://forum.pyload.org/viewtopic.php?f=10&t=4301 --- module/plugins/internal/SimpleHoster.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 33e7d3674..4c1441e4b 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.53" + __version__ = "1.54" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -615,7 +615,7 @@ class SimpleHoster(Hoster): self.info['error'] = re.sub(r'<.*?>', " ", errmsg) self.logWarning(self.info['error']) - if re.search('limit|wait', errmsg, re.I): + if re.search('limit|wait|slot', errmsg, re.I): if re.search("da(il)?y|today", errmsg): wait_time = secondsToMidnight(gmt=2) else: @@ -633,12 +633,12 @@ class SimpleHoster(Hoster): self.retry(10, reason=_("Wrong captcha")) elif re.search('countdown|expired', errmsg, re.I): - self.retry(wait_time=60, reason=_("Link expired")) + self.retry(10, wait_time=60, reason=_("Link expired")) elif re.search('maintenance|maintainance|temp', errmsg, re.I): self.tempOffline() - elif re.search('up to', errmsg, re.I): + elif re.search('up to|size', errmsg, re.I): self.fail(_("File too large for free download")) elif re.search('offline|delet|remov|not? (found|(longer)? available)', errmsg, re.I): -- cgit v1.2.3 From afa6e88d46d61de5523a5d00b657d4a7f742a5cc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 6 Jun 2015 07:34:41 +0200 Subject: [UploadedTo] Fixup (2) --- module/plugins/internal/SimpleHoster.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 4c1441e4b..a369559ca 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.54" + __version__ = "1.55" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -285,8 +285,8 @@ class SimpleHoster(Hoster): IP_BLOCKED_PATTERN: (optional) example: IP_BLOCKED_PATTERN = r'in your country' - DOWNLOAD_LIMIT_PATTERN: (optional) - example: DOWNLOAD_LIMIT_PATTERN = r'download limit' + DL_LIMIT_PATTERN: (optional) + example: DL_LIMIT_PATTERN = r'download limit' SIZE_LIMIT_PATTERN: (optional) example: SIZE_LIMIT_PATTERN = r'up to' @@ -545,9 +545,12 @@ class SimpleHoster(Hoster): if r not in rules: rules[r] = p - for r, a in [('Error' , "ERROR_PATTERN" ), - ('Premium only', "PREMIUM_ONLY_PATTERN"), - ('Wait error' , "WAIT_PATTERN" )]: + for r, a in [("IP blocked" , "IP_BLOCKED_PATTERN" ), + ("Download limit", "DL_LIMIT_PATTERN" ), + ("Size limit" , "SIZE_LIMIT_PATTERN" ), + ("Error" , "ERROR_PATTERN" ), + ("Premium only" , "PREMIUM_ONLY_PATTERN"), + ("Wait error" , "WAIT_PATTERN" )]: if r not in rules and hasattr(self, a): rules[r] = getattr(self, a) @@ -582,8 +585,8 @@ class SimpleHoster(Hoster): elif hasattr(self, 'SIZE_LIMIT_PATTERN') and re.search(self.SIZE_LIMIT_PATTERN, self.html): self.fail(_("File too large for free download")) - elif hasattr(self, 'DOWNLOAD_LIMIT_PATTERN') and re.search(self.DOWNLOAD_LIMIT_PATTERN, self.html): - m = re.search(self.DOWNLOAD_LIMIT_PATTERN, self.html) + elif hasattr(self, 'DL_LIMIT_PATTERN') and re.search(self.DL_LIMIT_PATTERN, self.html): + m = re.search(self.DL_LIMIT_PATTERN, self.html) try: errmsg = m.group(1).strip() except Exception: -- cgit v1.2.3 From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/internal/SimpleHoster.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index a369559ca..da477ad79 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -12,8 +12,8 @@ from module.PyFile import statusMap as _statusMap from module.network.CookieJar import CookieJar from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL -from module.plugins.Hoster import Hoster -from module.plugins.Plugin import Fail, Retry +from module.plugins.internal.Hoster import Hoster +from module.plugins.internal.Plugin import Fail, Retry from module.utils import fixup, fs_encode, html_unescape, parseFileSize @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.55" + __version__ = "1.56" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), -- cgit v1.2.3 From 3af8bfcf685f82de097ef6b110dffa77fd529eaf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 10:01:24 +0200 Subject: [SimpleHoster] Improve logging and file checking --- module/plugins/internal/SimpleHoster.py | 124 +++++++++++++++++++++----------- 1 file changed, 82 insertions(+), 42 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index da477ad79..a1a1a4a67 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -133,7 +133,7 @@ def timestamp(): return int(time.time() * 1000) -#@TODO: Move to hoster class in 0.4.10 +#@TODO: Move to Hoster in 0.4.10 def getFileURL(self, url, follow_location=None): link = "" redirect = 1 @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.56" + __version__ = "1.57" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -308,6 +308,11 @@ class SimpleHoster(Hoster): SIZE_REPLACEMENTS = [] URL_REPLACEMENTS = [] + FILE_ERRORS = [('Html error' , r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'), + ('Request error', r'([Aa]n error occured while processing your request)' ), + ('Html file' , r'\A\s*)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)')}) - - if not errmsg: - for r, p in [('Html file' , re.compile(r'\A\s* Date: Mon, 8 Jun 2015 11:14:56 +0200 Subject: [SimpleHoster] Fixup --- module/plugins/internal/SimpleHoster.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index a1a1a4a67..e04d9d7f5 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.57" + __version__ = "1.58" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -425,8 +425,8 @@ class SimpleHoster(Hoster): def _log(self, type, args): msg = " | ".join([(a.encode("utf-8", "replace") if type(a) is unicode else str(a)).strip() for a in args if a]) logger = getattr(self.core.log, type) - logger("%(plugin)s[%(id)s]: %(msg)s" % {'plugin' : self.__name, - 'id' : self.pyfile.id + logger("%(plugin)s[%(id)s]: %(msg)s" % {'plugin' : self.__name__, + 'id' : self.pyfile.id, 'msg' : msg or _("%s MARK" % type.upper())}) -- cgit v1.2.3 From 2f114a7359d1702c4a22e16ea2a99b132d151d12 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 11:18:48 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1460 --- module/plugins/internal/SimpleHoster.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index e04d9d7f5..828367c97 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.58" + __version__ = "1.59" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -587,12 +587,12 @@ class SimpleHoster(Hoster): self.logDebug(_("Checking last downloaded file with custom rules")) if self.CHECK_FILE: - rules = [r, getattr(self, a) for r, a in (("IP blocked" , "IP_BLOCKED_PATTERN" ), - ("Download limit", "DL_LIMIT_PATTERN" ), - ("Size limit" , "SIZE_LIMIT_PATTERN" ), - ("Error" , "ERROR_PATTERN" ), - ("Premium only" , "PREMIUM_ONLY_PATTERN"), - ("Wait error" , "WAIT_PATTERN" ))] + rules = [(r, getattr(self, a)) for r, a in (("IP blocked" , "IP_BLOCKED_PATTERN" ), + ("Download limit", "DL_LIMIT_PATTERN" ), + ("Size limit" , "SIZE_LIMIT_PATTERN" ), + ("Error" , "ERROR_PATTERN" ), + ("Premium only" , "PREMIUM_ONLY_PATTERN"), + ("Wait error" , "WAIT_PATTERN" ))] self.FILE_ERRORS.extend(rules) for r, p in self.FILE_ERRORS: -- cgit v1.2.3 From 8d29df1feb4494c98b6aa150b3cb2d628c47a463 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 13:41:16 +0200 Subject: [SimpleHoster] Fixup --- module/plugins/internal/SimpleHoster.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 828367c97..f69669341 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -14,7 +14,7 @@ from module.network.HTTPRequest import BadHeader from module.network.RequestFactory import getURL from module.plugins.internal.Hoster import Hoster from module.plugins.internal.Plugin import Fail, Retry -from module.utils import fixup, fs_encode, html_unescape, parseFileSize +from module.utils import decode, fixup, fs_encode, html_unescape, parseFileSize #@TODO: Adapt and move to PyFile in 0.4.10 @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.59" + __version__ = "1.60" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -423,11 +423,13 @@ class SimpleHoster(Hoster): #@TODO: Move to Hoster in 0.4.10 def _log(self, type, args): - msg = " | ".join([(a.encode("utf-8", "replace") if type(a) is unicode else str(a)).strip() for a in args if a]) + msg = " | ".join((fs_encode(a) if type(a) is unicode else #@NOTE: `fs_encode` -> `encode` in 0.4.10 + decode(a) if type(a) is str else + str(a)).strip() for a in args if a) logger = getattr(self.core.log, type) logger("%(plugin)s[%(id)s]: %(msg)s" % {'plugin' : self.__name__, 'id' : self.pyfile.id, - 'msg' : msg or _("%s MARK" % type.upper())}) + 'msg' : msg or _(type.upper() + " MARK")}) #@TODO: Move to Hoster in 0.4.10 @@ -456,12 +458,10 @@ class SimpleHoster(Hoster): return self._log("critical", args) - #@TODO: Move to Hoster in 0.4.10 def setup(self): self.resumeDownload = self.multiDL = self.premium - #@TODO: Move to Hoster in 0.4.10 def prepare(self): self.pyfile.error = "" #@TODO: Remove in 0.4.10 -- cgit v1.2.3 From 71ccba71175238b62845b88fc707ff3d5432c56c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 15:14:24 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1464 --- module/plugins/internal/SimpleHoster.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index f69669341..38e2641c9 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.60" + __version__ = "1.61" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -423,13 +423,13 @@ class SimpleHoster(Hoster): #@TODO: Move to Hoster in 0.4.10 def _log(self, type, args): - msg = " | ".join((fs_encode(a) if type(a) is unicode else #@NOTE: `fs_encode` -> `encode` in 0.4.10 - decode(a) if type(a) is str else - str(a)).strip() for a in args if a) + msg = " | ".join((fs_encode(a) if isinstance(a, unicode) else + decode(a) if isinstance(a, str) else + str(a)).strip() for a in args if a) #@NOTE: `fs_encode` -> `encode` in 0.4.10 logger = getattr(self.core.log, type) - logger("%(plugin)s[%(id)s]: %(msg)s" % {'plugin' : self.__name__, - 'id' : self.pyfile.id, - 'msg' : msg or _(type.upper() + " MARK")}) + logger("%(plugin)s[%(id)s]: %(msg)s" % {'plugin': self.__name__, + 'id' : self.pyfile.id, + 'msg' : msg or _(type.upper() + " MARK")}) #@TODO: Move to Hoster in 0.4.10 -- cgit v1.2.3 From a8c8ace5ee4868f58067c8af30ea5702a2434999 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 21:26:17 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1467 --- module/plugins/internal/SimpleHoster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 38e2641c9..78d30be91 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.61" + __version__ = "1.62" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -592,7 +592,7 @@ class SimpleHoster(Hoster): ("Size limit" , "SIZE_LIMIT_PATTERN" ), ("Error" , "ERROR_PATTERN" ), ("Premium only" , "PREMIUM_ONLY_PATTERN"), - ("Wait error" , "WAIT_PATTERN" ))] + ("Wait error" , "WAIT_PATTERN" )) if hasattr(self, a)] self.FILE_ERRORS.extend(rules) for r, p in self.FILE_ERRORS: -- cgit v1.2.3 From 9ac5219308e243711afc0ef99158ace05fd76428 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 22:47:00 +0200 Subject: Fix https://github.com/pyload/pyload/issues/1468 --- module/plugins/internal/SimpleHoster.py | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index 78d30be91..6f2dc8a6c 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.62" + __version__ = "1.63" __pattern__ = r'^unmatchable$' __config__ = [("use_premium", "bool", "Use premium account if available" , True), @@ -249,7 +249,6 @@ class SimpleHoster(Hoster): __license__ = "GPLv3" __authors__ = [("Walter Purcaro", "vuolter@gmail.com")] - """ Info patterns: @@ -258,6 +257,7 @@ class SimpleHoster(Hoster): or NAME_PATTERN: (mandatory) Name that will be set for the file example: NAME_PATTERN = r'(?Pfile_name)' + SIZE_PATTERN: (mandatory) Size that will be checked for the file example: SIZE_PATTERN = r'(?Pfile_size) (?Psize_unit)' @@ -297,11 +297,14 @@ class SimpleHoster(Hoster): Instead overriding handleFree and handlePremium methods you may define the following patterns for basic link handling: - LINK_FREE_PATTERN: (optional) group(1) should be the direct link for free download - example: LINK_FREE_PATTERN = r'