From 430092f0ba67e4bb2dd75433b08340d0afca0fa9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 12 Dec 2014 20:34:42 +0100 Subject: Update plugins after SimpleHoster changes --- module/plugins/hoster/FileSharkPl.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index ea2b56821..25825a229 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' @@ -20,8 +20,6 @@ class FileSharkPl(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - CONTENT_DISPOSITION = True - NAME_PATTERN = r'

(?P.+)

' SIZE_PATTERN = r'

(.*?)(?P\d+\.?\d*)\s(?P\w+)

' -- cgit v1.2.3 From 4e9c8f7ab1269966a9eac9e1b6363f5458f9f970 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 18 Dec 2014 16:07:21 +0100 Subject: Update checkFile routine in some hoster plugins --- module/plugins/hoster/FileSharkPl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 25825a229..5250a92fe 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' @@ -116,6 +116,8 @@ class FileSharkPl(SimpleHoster): def checkFile(self): + super(FileSharkPl, self).checkFile() + check = self.checkDownload({'wrong_captcha': re.compile(r''), 'wait_pattern' : re.compile(self.SECONDS_PATTERN), 'DL-found' : re.compile('')}) -- cgit v1.2.3 From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/FileSharkPl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 5250a92fe..d686be480 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' @@ -73,13 +73,13 @@ class FileSharkPl(SimpleHoster): #@NOTE: handlePremium method was never been tested - def handlePremium(self): - super(FilerNet, self).handlePremium() + def handlePremium(self, pyfile): + super(FilerNet, self).handlePremium(pyfile) if self.link: self.link = urljoin("http://fileshark.pl/", self.link) - def handleFree(self): + def handleFree(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.error(_("Download url not found")) @@ -116,8 +116,6 @@ class FileSharkPl(SimpleHoster): def checkFile(self): - super(FileSharkPl, self).checkFile() - check = self.checkDownload({'wrong_captcha': re.compile(r''), 'wait_pattern' : re.compile(self.SECONDS_PATTERN), 'DL-found' : re.compile('')}) @@ -132,6 +130,8 @@ class FileSharkPl(SimpleHoster): elif check == "wait_pattern": self.retry() + return super(FileSharkPl, self).checkFile() + def _decode64(self, data, *args, **kwargs): return data.decode("base64") -- cgit v1.2.3 From bb91105bd2b5de67fd30a9d7fb77b73ca7740fd8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 13 Jan 2015 22:41:40 +0100 Subject: [FileSharkPl] Fix https://github.com/pyload/pyload/issues/1040 --- module/plugins/hoster/FileSharkPl.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index d686be480..252270c4b 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,9 +10,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" - __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' + __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __description__ = """FileShark.pl hoster plugin""" __license__ = "GPLv3" @@ -39,6 +39,7 @@ class FileSharkPl(SimpleHoster): def setup(self): self.resumeDownload = True + if self.premium: self.multiDL = True self.limitDL = 20 @@ -53,7 +54,7 @@ class FileSharkPl(SimpleHoster): errmsg = self.info['error'] = _("Another download already run") self.retry(15, int(m.group(1)), errmsg) - m = re.search(self.ERROR_PATTERN, self.html): + m = re.search(self.ERROR_PATTERN, self.html) if m: alert = m.group(1) @@ -72,13 +73,6 @@ class FileSharkPl(SimpleHoster): self.info.pop('error', None) - #@NOTE: handlePremium method was never been tested - def handlePremium(self, pyfile): - super(FilerNet, self).handlePremium(pyfile) - if self.link: - self.link = urljoin("http://fileshark.pl/", self.link) - - def handleFree(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: @@ -119,7 +113,6 @@ class FileSharkPl(SimpleHoster): check = self.checkDownload({'wrong_captcha': re.compile(r''), 'wait_pattern' : re.compile(self.SECONDS_PATTERN), 'DL-found' : re.compile('')}) - if check == "DL-found": self.correctCaptcha() -- cgit v1.2.3 From 79725268402043906f619f7c09e848e02ab8a17b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 31 Jan 2015 22:00:59 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/FileSharkPl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 252270c4b..e4ce711bd 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -127,7 +127,7 @@ class FileSharkPl(SimpleHoster): def _decode64(self, data, *args, **kwargs): - return data.decode("base64") + return data.decode('base64') getInfo = create_getInfo(FileSharkPl) -- cgit v1.2.3