From 3eae93612bd08cce8ae136d0b6a1a780878a84b2 Mon Sep 17 00:00:00 2001 From: prOq Date: Wed, 22 Oct 2014 22:32:32 +0200 Subject: New hoster plugin FileSharkPl --- module/plugins/hoster/FileSharkPl.py | 138 +++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 module/plugins/hoster/FileSharkPl.py (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py new file mode 100644 index 000000000..20f0e1cc0 --- /dev/null +++ b/module/plugins/hoster/FileSharkPl.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- + +import re + +from urlparse import urljoin + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class FileSharkPl(SimpleHoster): + __name__ = "FileSharkPl" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' + + __description__ = """FileShark.pl hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("prOq", None), + ("Walter Purcaro", "vuolter@gmail.com")] + + + FILE_NAME_PATTERN = r'

(?P.+)

' + FILE_SIZE_PATTERN = r'

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

' + + OFFLINE_PATTERN = '(P|p)lik zosta. (usuni.ty|przeniesiony)' + + DOWNLOAD_ALERT = r'

(.*?)

' + IP_BLOCKED_PATTERN = 'Strona jest dost.pna wy..cznie dla u.ytkownik.w znajduj.cych si. na terenie Polski' + DOWNLOAD_SLOTS_ERROR_PATTERN = r'Osi.gni.to maksymaln. liczb. .ci.ganych jednocze.nie plik.w\.' + + DOWNLOAD_URL_FREE = r'' + DOWNLOAD_URL_PREMIUM = r'' + + SECONDS_PATTERN = r'var timeToDownload = (\d+);' + + CAPTCHA_IMG_PATTERN = '' + + + def setup(self): + self.resumeDownload = True + if self.premium: + self.multiDL = True + self.limitDL = 20 + else: + self.multiDL = False + + + def prepare(self): + super(FileSharkPl, self).prepare() + + m = re.search(self.DOWNLOAD_ALERT, self.html): + if m: + return + + alert = m.group(1) + + if re.match(self.IP_BLOCKED_PATTERN, alert): + self.fail("Only connections from Polish IP are allowed") + elif re.match(self.DOWNLOAD_SLOTS_ERROR_PATTERN, alert): + self.logInfo("No free download slots available") + self.retry(10, 30 * 60, "Still no free download slots available") + else: + self.logInfo(alert) + self.retry(10, 10 * 60, "Try again later") + + + #@NOTE: handlePremium method was never been tested + def handlePremium(self): + self.logDebug("Premium accounts support in experimental modus!") + m = re.search(self.DOWNLOAD_URL_PREMIUM, self.html) + file_url = urljoin("http://fileshark.pl", m.group(1)) + + self.download(file_url, disposition=True) + self.checkDownload() + + + def handleFree(self): + m = re.search(self.DOWNLOAD_URL_FREE, self.html) + if m is None: + self.error("Download url not found") + + file_url = urljoin("http://fileshark.pl", m.group(1)) + + m = re.search(self.SECONDS_PATTERN, self.html) + if m: + seconds = int(m.group(1)) + self.logDebug("Wait %s seconds" % seconds) + self.wait(seconds + 2) + + action, inputs = self.parseHtmlForm('action=""') + m = re.search(self.CAPTCHA_TOKEN_PATTERN, self.html) + if m is None: + self.retry(reason="Captcha form not found") + + inputs['form[_token]'] = m.group(1) + + m = re.search(self.CAPTCHA_IMG_PATTERN, self.html) + if m is None: + self.retry(reason="Captcha image not found") + + tmp_load = self.load + self.load = self.decode64 #: injects decode64 inside decryptCaptcha + + inputs['form[captcha]'] = self.decryptCaptcha(m.group(1), imgtype='jpeg') + inputs['form[start]'] = "" + + self.load = tmp_load + + self.download(file_url, post=inputs, cookies=True, disposition=True) + self.checkDownload() + + + def checkDownload(self): + check = super(FileSharkPl, self).checkDownload({ + 'wrong_captcha': re.compile(r''), + 'wait_pattern': re.compile(self.SECONDS_PATTERN), + 'DL-found': re.compile('') + }) + + if check == "DL-found": + self.correctCaptcha() + self.logDebug("Captcha solved correct") + + elif check == "wrong_captcha": + self.invalidCaptcha() + self.retry(10, 1, reason="Wrong captcha solution") + + elif check == "wait_pattern": + self.retry() + + + def decode64(self, data, *args, **kwargs): + return data.decode("base64") + + +getInfo = create_getInfo(FileSharkPl) -- cgit v1.2.3 From 4da90891eb2544ac15a7d512aba8cb357f68ee5f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 01:11:29 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/FileSharkPl.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 20f0e1cc0..427ae9dcc 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -121,7 +121,6 @@ class FileSharkPl(SimpleHoster): if check == "DL-found": self.correctCaptcha() - self.logDebug("Captcha solved correct") elif check == "wrong_captcha": self.invalidCaptcha() -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/FileSharkPl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 427ae9dcc..8f314f059 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -57,9 +57,9 @@ class FileSharkPl(SimpleHoster): alert = m.group(1) if re.match(self.IP_BLOCKED_PATTERN, alert): - self.fail("Only connections from Polish IP are allowed") + self.fail(_("Only connections from Polish IP are allowed")) elif re.match(self.DOWNLOAD_SLOTS_ERROR_PATTERN, alert): - self.logInfo("No free download slots available") + self.logInfo(_("No free download slots available")) self.retry(10, 30 * 60, "Still no free download slots available") else: self.logInfo(alert) @@ -79,7 +79,7 @@ class FileSharkPl(SimpleHoster): def handleFree(self): m = re.search(self.DOWNLOAD_URL_FREE, self.html) if m is None: - self.error("Download url not found") + self.error(_("Download url not found")) file_url = urljoin("http://fileshark.pl", m.group(1)) -- cgit v1.2.3 From 146fe1e309c33ab149bfaf58ad86c0dd4fb9b156 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 27 Oct 2014 01:18:45 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/FileSharkPl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 8f314f059..4cb816724 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -92,13 +92,13 @@ class FileSharkPl(SimpleHoster): action, inputs = self.parseHtmlForm('action=""') m = re.search(self.CAPTCHA_TOKEN_PATTERN, self.html) if m is None: - self.retry(reason="Captcha form not found") + self.retry(reason=_("Captcha form not found")) inputs['form[_token]'] = m.group(1) m = re.search(self.CAPTCHA_IMG_PATTERN, self.html) if m is None: - self.retry(reason="Captcha image not found") + self.retry(reason=_("Captcha image not found")) tmp_load = self.load self.load = self.decode64 #: injects decode64 inside decryptCaptcha @@ -124,7 +124,7 @@ class FileSharkPl(SimpleHoster): elif check == "wrong_captcha": self.invalidCaptcha() - self.retry(10, 1, reason="Wrong captcha solution") + self.retry(10, 1, reason=_("Wrong captcha solution")) elif check == "wait_pattern": self.retry() -- cgit v1.2.3 From 8b3589dd394d81177bf4680dddb5bdb9506b89ea Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:04:10 +0100 Subject: Update plugins to last changes --- module/plugins/hoster/FileSharkPl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 4cb816724..f70fdb5ac 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -60,10 +60,10 @@ class FileSharkPl(SimpleHoster): self.fail(_("Only connections from Polish IP are allowed")) elif re.match(self.DOWNLOAD_SLOTS_ERROR_PATTERN, alert): self.logInfo(_("No free download slots available")) - self.retry(10, 30 * 60, "Still no free download slots available") + self.retry(10, 30 * 60, _("Still no free download slots available")) else: self.logInfo(alert) - self.retry(10, 10 * 60, "Try again later") + self.retry(10, 10 * 60, _("Try again later")) #@NOTE: handlePremium method was never been tested @@ -124,7 +124,7 @@ class FileSharkPl(SimpleHoster): elif check == "wrong_captcha": self.invalidCaptcha() - self.retry(10, 1, reason=_("Wrong captcha solution")) + self.retry(10, 1, _("Wrong captcha solution")) elif check == "wait_pattern": self.retry() -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/FileSharkPl.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index f70fdb5ac..43e7c1415 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -8,16 +8,16 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): - __name__ = "FileSharkPl" - __type__ = "hoster" + __name__ = "FileSharkPl" + __type__ = "hoster" __version__ = "0.01" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' __description__ = """FileShark.pl hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("prOq", None), - ("Walter Purcaro", "vuolter@gmail.com")] + __license__ = "GPLv3" + __authors__ = [("prOq", None), + ("Walter Purcaro", "vuolter@gmail.com")] FILE_NAME_PATTERN = r'

(?P.+)

' -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/FileSharkPl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 43e7c1415..5a9cbb456 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -20,8 +20,8 @@ class FileSharkPl(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - FILE_NAME_PATTERN = r'

(?P.+)

' - FILE_SIZE_PATTERN = r'

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

' + NAME_PATTERN = r'

(?P.+)

' + SIZE_PATTERN = r'

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

' OFFLINE_PATTERN = '(P|p)lik zosta. (usuni.ty|przeniesiony)' -- cgit v1.2.3 From f000135de9d6de7277080683c2b9d396da65e7f5 Mon Sep 17 00:00:00 2001 From: prOq Date: Fri, 24 Oct 2014 19:29:58 +0200 Subject: [FileSharkPl] Recovered needed behaviour Conflicts: module/plugins/hoster/FileSharkPl.py --- module/plugins/hoster/FileSharkPl.py | 38 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 5a9cbb456..5683d2a9e 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.01" + __version__ = "0.02" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' @@ -50,20 +50,32 @@ class FileSharkPl(SimpleHoster): def prepare(self): super(FileSharkPl, self).prepare() + # check if file is now available for download (-> file name can be found in html body) + try: + m = re.search(self.FILE_NAME_PATTERN, self.html) + pyfile.name = m.group('N') + except: + try: + m = re.match(self.__pattern__, pyfile.url) + pyfile.name = m.group(1) + except: + pyfile.name = "NoName" + + sec = re.search(self.SECONDS_PATTERN, self.html) + if sec: + self.retry(15,int(sec.group(1)),"Another download already run") + m = re.search(self.DOWNLOAD_ALERT, self.html): if m: - return - - alert = m.group(1) - - if re.match(self.IP_BLOCKED_PATTERN, alert): - self.fail(_("Only connections from Polish IP are allowed")) - elif re.match(self.DOWNLOAD_SLOTS_ERROR_PATTERN, alert): - self.logInfo(_("No free download slots available")) - self.retry(10, 30 * 60, _("Still no free download slots available")) - else: - self.logInfo(alert) - self.retry(10, 10 * 60, _("Try again later")) + alert = m.group(1) + if re.match(self.IP_BLOCKED_PATTERN, alert): + self.fail(_("Only connections from Polish IP are allowed")) + elif re.match(self.DOWNLOAD_SLOTS_ERROR_PATTERN, alert): + self.logInfo(_("No free download slots available")) + self.retry(10, 30 * 60, _("Still no free download slots available")) + else: + self.logInfo(alert) + self.retry(10, 10 * 60, _("Try again later")) #@NOTE: handlePremium method was never been tested -- cgit v1.2.3 From 4a6a99d3fe5bcfcb7c3bb35b6cf001adb62d3bb5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 5 Dec 2014 23:06:17 +0100 Subject: [FileSharkPl] Cleanup --- module/plugins/hoster/FileSharkPl.py | 101 ++++++++++++++++------------------- 1 file changed, 46 insertions(+), 55 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 5683d2a9e..ea2b56821 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.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}' @@ -20,22 +20,23 @@ class FileSharkPl(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] + CONTENT_DISPOSITION = True + NAME_PATTERN = r'

(?P.+)

' SIZE_PATTERN = r'

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

' OFFLINE_PATTERN = '(P|p)lik zosta. (usuni.ty|przeniesiony)' - DOWNLOAD_ALERT = r'

(.*?)

' - IP_BLOCKED_PATTERN = 'Strona jest dost.pna wy..cznie dla u.ytkownik.w znajduj.cych si. na terenie Polski' - DOWNLOAD_SLOTS_ERROR_PATTERN = r'Osi.gni.to maksymaln. liczb. .ci.ganych jednocze.nie plik.w\.' - - DOWNLOAD_URL_FREE = r'
' - DOWNLOAD_URL_PREMIUM = r'' + LINK_FREE_PATTERN = r'' + LINK_PREMIUM_PATTERN = r'' - SECONDS_PATTERN = r'var timeToDownload = (\d+);' + WAIT_PATTERN = r'var timeToDownload = (\d+);' + ERROR_PATTERN = r'

(.*?)

' + IP_ERROR_PATTERN = r'Strona jest dost.pna wy..cznie dla u.ytkownik.w znajduj.cych si. na terenie Polski' + SLOT_ERROR_PATTERN = r'Osi.gni.to maksymaln. liczb. .ci.ganych jednocze.nie plik.w\.' - CAPTCHA_IMG_PATTERN = '' + CAPTCHA_PATTERN = '' def setup(self): @@ -47,89 +48,79 @@ class FileSharkPl(SimpleHoster): self.multiDL = False - def prepare(self): - super(FileSharkPl, self).prepare() - + def checkErrors(self): # check if file is now available for download (-> file name can be found in html body) - try: - m = re.search(self.FILE_NAME_PATTERN, self.html) - pyfile.name = m.group('N') - except: - try: - m = re.match(self.__pattern__, pyfile.url) - pyfile.name = m.group(1) - except: - pyfile.name = "NoName" - - sec = re.search(self.SECONDS_PATTERN, self.html) - if sec: - self.retry(15,int(sec.group(1)),"Another download already run") - - m = re.search(self.DOWNLOAD_ALERT, self.html): + m = re.search(self.WAIT_PATTERN, self.html) + if m: + errmsg = self.info['error'] = _("Another download already run") + self.retry(15, int(m.group(1)), errmsg) + + m = re.search(self.ERROR_PATTERN, self.html): if m: alert = m.group(1) - if re.match(self.IP_BLOCKED_PATTERN, alert): + + if re.match(self.IP_ERROR_PATTERN, alert): self.fail(_("Only connections from Polish IP are allowed")) - elif re.match(self.DOWNLOAD_SLOTS_ERROR_PATTERN, alert): - self.logInfo(_("No free download slots available")) + + elif re.match(self.SLOT_ERROR_PATTERN, alert): + errmsg = self.info['error'] = _("No free download slots available") + self.logWarning(errmsg) self.retry(10, 30 * 60, _("Still no free download slots available")) + else: - self.logInfo(alert) + self.info['error'] = alert self.retry(10, 10 * 60, _("Try again later")) + self.info.pop('error', None) + #@NOTE: handlePremium method was never been tested def handlePremium(self): - self.logDebug("Premium accounts support in experimental modus!") - m = re.search(self.DOWNLOAD_URL_PREMIUM, self.html) - file_url = urljoin("http://fileshark.pl", m.group(1)) - - self.download(file_url, disposition=True) - self.checkDownload() + super(FilerNet, self).handlePremium() + if self.link: + self.link = urljoin("http://fileshark.pl/", self.link) def handleFree(self): - m = re.search(self.DOWNLOAD_URL_FREE, self.html) + m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.error(_("Download url not found")) - file_url = urljoin("http://fileshark.pl", m.group(1)) + link = urljoin("http://fileshark.pl", m.group(1)) - m = re.search(self.SECONDS_PATTERN, self.html) + m = re.search(self.WAIT_PATTERN, self.html) if m: seconds = int(m.group(1)) self.logDebug("Wait %s seconds" % seconds) - self.wait(seconds + 2) + self.wait(seconds) action, inputs = self.parseHtmlForm('action=""') - m = re.search(self.CAPTCHA_TOKEN_PATTERN, self.html) + + m = re.search(self.TOKEN_PATTERN, self.html) if m is None: self.retry(reason=_("Captcha form not found")) inputs['form[_token]'] = m.group(1) - m = re.search(self.CAPTCHA_IMG_PATTERN, self.html) + m = re.search(self.CAPTCHA_PATTERN, self.html) if m is None: self.retry(reason=_("Captcha image not found")) - tmp_load = self.load - self.load = self.decode64 #: injects decode64 inside decryptCaptcha + tmp_load = self.load + self.load = self._decode64 #: work-around: injects decode64 inside decryptCaptcha inputs['form[captcha]'] = self.decryptCaptcha(m.group(1), imgtype='jpeg') inputs['form[start]'] = "" self.load = tmp_load - self.download(file_url, post=inputs, cookies=True, disposition=True) - self.checkDownload() + self.download(link, post=inputs, cookies=True, disposition=True) - def checkDownload(self): - check = super(FileSharkPl, self).checkDownload({ - 'wrong_captcha': re.compile(r''), - 'wait_pattern': re.compile(self.SECONDS_PATTERN), - 'DL-found': re.compile('
') - }) + def checkFile(self): + 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() @@ -142,7 +133,7 @@ class FileSharkPl(SimpleHoster): self.retry() - def decode64(self, data, *args, **kwargs): + def _decode64(self, data, *args, **kwargs): return data.decode("base64") -- cgit v1.2.3 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