From fafeabff0be24254c5ca0e9faedb00eef7c0a42a Mon Sep 17 00:00:00 2001 From: GammaC0de Date: Fri, 5 Jun 2015 18:51:38 +0300 Subject: Update FileSharkPl.py --- 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 de030be9c..5be339896 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -20,7 +20,7 @@ class FileSharkPl(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - NAME_PATTERN = r'

(?P.+)

' + NAME_PATTERN = r'

(?P.+?)

' SIZE_PATTERN = r'

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

' OFFLINE_PATTERN = r'(P|p)lik zosta. (usuni.ty|przeniesiony)' -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- 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 5be339896..d01a34bad 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -47,7 +47,7 @@ class FileSharkPl(SimpleHoster): def checkErrors(self): - # check if file is now available for download (-> file name can be found in html body) + #: check if file is now available for download (-> file name can be found in html body) m = re.search(self.WAIT_PATTERN, self.html) if m: errmsg = self.info['error'] = _("Another download already run") -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/FileSharkPl.py | 22 +++++++++++----------- 1 file changed, 11 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 d01a34bad..595d0c7ed 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -37,16 +37,16 @@ class FileSharkPl(SimpleHoster): def setup(self): - self.resumeDownload = True + self.resume_download = True if self.premium: - self.multiDL = True - self.limitDL = 20 + self.multi_dl = True + self.limit_dl = 20 else: - self.multiDL = False + self.multi_dl = False - def checkErrors(self): + def check_errors(self): #: check if file is now available for download (-> file name can be found in html body) m = re.search(self.WAIT_PATTERN, self.html) if m: @@ -62,7 +62,7 @@ class FileSharkPl(SimpleHoster): elif re.match(self.SLOT_ERROR_PATTERN, alert): errmsg = self.info['error'] = _("No free download slots available") - self.logWarning(errmsg) + self.log_warning(errmsg) self.retry(10, 30 * 60, _("Still no free download slots available")) else: @@ -72,7 +72,7 @@ class FileSharkPl(SimpleHoster): self.info.pop('error', None) - def handleFree(self, pyfile): + def handle_free(self, pyfile): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: self.error(_("Download url not found")) @@ -84,10 +84,10 @@ class FileSharkPl(SimpleHoster): m = re.search(self.WAIT_PATTERN, self.html) if m: seconds = int(m.group(1)) - self.logDebug("Wait %s seconds" % seconds) + self.log_debug("Wait %s seconds" % seconds) self.wait(seconds) - action, inputs = self.parseHtmlForm('action=""') + action, inputs = self.parse_html_form('action=""') m = re.search(self.TOKEN_PATTERN, self.html) if m is None: @@ -102,7 +102,7 @@ class FileSharkPl(SimpleHoster): 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[captcha]'] = self.decrypt_captcha(m.group(1), imgtype='jpeg') inputs['form[start]'] = "" self.load = tmp_load -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- 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 595d0c7ed..3a818e02e 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -47,7 +47,7 @@ class FileSharkPl(SimpleHoster): def check_errors(self): - #: check if file is now available for download (-> file name can be found in html body) + #: Check if file is now available for download (-> file name can be found in html body) m = re.search(self.WAIT_PATTERN, self.html) if m: errmsg = self.info['error'] = _("Another download already run") -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/FileSharkPl.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 3a818e02e..2f6898f15 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,6 +10,7 @@ class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" __version__ = "0.12" + __status__ = "stable" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 027cb529d79558de19c47da88a782b31745a65c9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 21 Jul 2015 22:53:37 +0200 Subject: New Captcha skeleton --- module/plugins/hoster/FileSharkPl.py | 13 ++----------- 1 file changed, 2 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 2f6898f15..901890433 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __status__ = "stable" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' @@ -100,19 +100,10 @@ class FileSharkPl(SimpleHoster): if m is None: self.retry(reason=_("Captcha image not found")) - tmp_load = self.load - self.load = self._decode64 #: work-around: injects decode64 inside decryptCaptcha - - inputs['form[captcha]'] = self.decrypt_captcha(m.group(1), imgtype='jpeg') + inputs['form[captcha]'] = self.captcha.decrypt(m.group(1).decode('base64'), input_type='jpeg') inputs['form[start]'] = "" - self.load = tmp_load - self.download(link, post=inputs, disposition=True) - def _decode64(self, data, *args, **kwargs): - return data.decode('base64') - - getInfo = create_getInfo(FileSharkPl) -- cgit v1.2.3 From 6af9b38a8d5d49355b85aef6ddd003605d6bba05 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Jul 2015 23:44:45 +0200 Subject: Improve Captcha --- 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 901890433..d3fbd26d3 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -100,7 +100,7 @@ class FileSharkPl(SimpleHoster): if m is None: self.retry(reason=_("Captcha image not found")) - inputs['form[captcha]'] = self.captcha.decrypt(m.group(1).decode('base64'), input_type='jpeg') + inputs['form[captcha]'] = self.captcha._decrypt(m.group(1).decode('base64'), input_type='jpeg') inputs['form[start]'] = "" self.download(link, post=inputs, disposition=True) -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/FileSharkPl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FileSharkPl.py') diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index d3fbd26d3..62a7a553f 100644 --- a/module/plugins/hoster/FileSharkPl.py +++ b/module/plugins/hoster/FileSharkPl.py @@ -10,7 +10,7 @@ class FileSharkPl(SimpleHoster): __name__ = "FileSharkPl" __type__ = "hoster" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -41,10 +41,10 @@ class FileSharkPl(SimpleHoster): self.resume_download = True if self.premium: - self.multi_dl = True - self.limit_dl = 20 + self.multiDL = True + self.limitDL = 20 else: - self.multi_dl = False + self.multiDL = False def check_errors(self): -- cgit v1.2.3