From 93592862b520a862c01f80c019e5c4bc43746c19 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:54:20 +0200 Subject: [SimpleHoster] Better inline docs + changed "FILE_OFFLINE_PATTERN" to "OFFLINE_PATTERN" --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index efaf8e5f7..fa84b7732 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -15,7 +15,7 @@ class CatShareNet(SimpleHoster): __author_mail__ = "z00nx0@gmail.com" FILE_INFO_PATTERN = r'

]+>(?P.*)

\s+

]+>(?P.*)

' - FILE_OFFLINE_PATTERN = r'Podany plik zosta' + OFFLINE_PATTERN = r'Podany plik zosta' SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" -- cgit v1.2.3 From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/CatShareNet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index fa84b7732..406b7bcd4 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -16,9 +16,12 @@ class CatShareNet(SimpleHoster): FILE_INFO_PATTERN = r'

]+>(?P.*)

\s+

]+>(?P.*)

' OFFLINE_PATTERN = r'Podany plik zosta' - SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' + + SECONDS_PATTERN = r'var\s+count\s+=\s+(\d+);' + RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" + def handleFree(self): found = re.search(self.SECONDS_PATTERN, self.html) seconds = int(found.group(1)) -- cgit v1.2.3 From 9395182da7afed55a29bde1c7cbefe4204e783f0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:02:09 +0200 Subject: Store all re.search/match object as "m" instead "found" --- module/plugins/hoster/CatShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 406b7bcd4..2cd85420d 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -23,8 +23,8 @@ class CatShareNet(SimpleHoster): def handleFree(self): - found = re.search(self.SECONDS_PATTERN, self.html) - seconds = int(found.group(1)) + m = re.search(self.SECONDS_PATTERN, self.html) + seconds = int(m.group(1)) self.logDebug("Seconds found", seconds) self.wait(seconds + 1) recaptcha = ReCaptcha(self) -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/CatShareNet.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 2cd85420d..4bbdfce89 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -1,15 +1,18 @@ # -*- coding: utf-8 -*- import re -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __pattern__ = r'http://(?:www\.)?catshare.net/\w{16}.*' __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?catshare.net/\w{16}.*' + __description__ = """CatShare.net hoster plugin""" __author_name__ = "z00nx" __author_mail__ = "z00nx0@gmail.com" -- cgit v1.2.3 From 98b6f2781ecff3ad2a0eefbea0c98cb832e76fda Mon Sep 17 00:00:00 2001 From: prOq Date: Sat, 27 Sep 2014 03:56:24 +0200 Subject: [CatShareNet] Plugin rewritten --- module/plugins/hoster/CatShareNet.py | 49 +++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 4bbdfce89..2bcd261b7 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -2,43 +2,56 @@ import re -from module.plugins.internal.CaptchaService import ReCaptcha +from urllib import unquote + from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" - __pattern__ = r'http://(?:www\.)?catshare.net/\w{16}.*' + __pattern__ = r'http://(?:www\.)?catshare\.net/\w+' __description__ = """CatShare.net hoster plugin""" - __author_name__ = "z00nx" - __author_mail__ = "z00nx0@gmail.com" + __author_name__ = ("z00nx", "prOq") + __author_mail__ = ("z00nx0@gmail.com", None) - FILE_INFO_PATTERN = r'

]+>(?P.*)

\s+

]+>(?P.*)

' - OFFLINE_PATTERN = r'Podany plik zosta' - SECONDS_PATTERN = r'var\s+count\s+=\s+(\d+);' + FILE_INFO_PATTERN = r'

]+>(?P.+)

\s+

]+>(?P.+)

' + FILE_OFFLINE_PATTERN = r'Podany plik zosta' + SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" + LINK_PATTERN = r'
' def handleFree(self): m = re.search(self.SECONDS_PATTERN, self.html) - seconds = int(m.group(1)) - self.logDebug("Seconds found", seconds) - self.wait(seconds + 1) - recaptcha = ReCaptcha(self) + if m is not None: + seconds = int(m.group(1)) + self.logDebug("Seconds found", seconds) + self.wait(seconds + 1) + + # solve captcha and send solution challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) - post_data = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": code} - self.download(self.pyfile.url, post=post_data) - check = self.checkDownload({"html": re.compile("\A Date: Sat, 27 Sep 2014 14:39:05 +0200 Subject: [CatShareNet] Fix missing recaptcha --- module/plugins/hoster/CatShareNet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 2bcd261b7..f148a878e 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -11,7 +11,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?catshare\.net/\w+' @@ -36,6 +36,7 @@ class CatShareNet(SimpleHoster): self.wait(seconds + 1) # solve captcha and send solution + recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) self.html = self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field': code}, -- cgit v1.2.3 From 350be82f74ea7756e4a7ab1656f93fa04575caa6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Sep 2014 23:15:19 +0200 Subject: [ZippyshareCom] Fix alternative checksum type --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index f148a878e..88ca6c927 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -13,7 +13,7 @@ class CatShareNet(SimpleHoster): __type__ = "hoster" __version__ = "0.03" - __pattern__ = r'http://(?:www\.)?catshare\.net/\w+' + __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __description__ = """CatShare.net hoster plugin""" __author_name__ = ("z00nx", "prOq") -- cgit v1.2.3 From 13d788058ce3ebada150ebbe7c1a9415f76253d7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 28 Sep 2014 00:39:28 +0200 Subject: [CatShareNet] Fixup --- module/plugins/hoster/CatShareNet.py | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 88ca6c927..f250f4099 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -2,8 +2,6 @@ import re -from urllib import unquote - from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.internal.CaptchaService import ReCaptcha @@ -11,48 +9,50 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __description__ = """CatShare.net hoster plugin""" - __author_name__ = ("z00nx", "prOq") - __author_mail__ = ("z00nx0@gmail.com", None) + __author_name__ = ("z00nx", "prOq", "Walter Purcaro") + __author_mail__ = ("z00nx0@gmail.com", None, "vuolter@gmail.com") - FILE_INFO_PATTERN = r'

]+>(?P.+)

\s+

]+>(?P.+)

' - FILE_OFFLINE_PATTERN = r'Podany plik zosta' + FILE_INFO_PATTERN = r'(?P<N>.+) \((?P<S>[\d.]+) (?P<U>\w+)\)<' + OFFLINE_PATTERN = r'Podany plik został usunięty\s*</div>' - SECONDS_PATTERN = 'var\s+count\s+=\s+(\d+);' + IP_BLOCKED_PATTERN = r'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' + SECONDS_PATTERN = 'var count = (\d+);' RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" LINK_PATTERN = r'<form action="(.+?)" method="GET">' + def process(self, pyfile): + m = re.search(self.IP_BLOCKED_PATTERN, self.html) + if m is None: + self.fail("Only connections from Polish IP address are allowed") + super(CatShareNet, self).process(pyfile) + + def handleFree(self): m = re.search(self.SECONDS_PATTERN, self.html) - if m is not None: - seconds = int(m.group(1)) - self.logDebug("Seconds found", seconds) - self.wait(seconds + 1) + if m: + wait_time = int(m.group(1)) + self.wait(wait_time, True) - # solve captcha and send solution recaptcha = ReCaptcha(self) challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) self.html = self.load(self.pyfile.url, - post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field': code}, - decode=True, - cookies=True, - ref=True) + post={'recaptcha_challenge_field': challenge, + 'recaptcha_response_field': code}) - # find download url m = re.search(self.LINK_PATTERN, self.html) if m is None: self.invalidCaptcha() self.retry(reason="Wrong captcha entered") - download_url = unquote(m.group(1)) - self.logDebug("Download url: " + download_url) - self.download(download_url) + dl_link = m.group(1) + self.download(dl_link) getInfo = create_getInfo(CatShareNet) -- cgit v1.2.3 From b0058d33d2bdc68fa58476577b29d79a6cef7963 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 28 Sep 2014 00:59:23 +0200 Subject: [CatShareNet] Fixup 2 --- module/plugins/hoster/CatShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index f250f4099..c21d11579 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -27,11 +27,11 @@ class CatShareNet(SimpleHoster): LINK_PATTERN = r'<form action="(.+?)" method="GET">' - def process(self, pyfile): + def getFileInfo(self): m = re.search(self.IP_BLOCKED_PATTERN, self.html) if m is None: self.fail("Only connections from Polish IP address are allowed") - super(CatShareNet, self).process(pyfile) + return super(CatShareNet, self).getFileInfo() def handleFree(self): -- cgit v1.2.3 From 26793a8e7f1b44cc9b36d6599dcf1eaf5bd5db27 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 28 Sep 2014 01:01:13 +0200 Subject: [CatShareNet] Increase version number --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index c21d11579..e06547f96 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' -- cgit v1.2.3 From 578a49e391859cbe24411ca4d80432ea5c7b4474 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Mon, 29 Sep 2014 00:02:51 +0200 Subject: [CatShareNet] Fixed and improved --- module/plugins/hoster/CatShareNet.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index e06547f96..121973e4d 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' @@ -18,18 +18,25 @@ class CatShareNet(SimpleHoster): __author_mail__ = ("z00nx0@gmail.com", None, "vuolter@gmail.com") + TEXT_ENCODING = True + FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.]+) (?P<U>\w+)\)<' OFFLINE_PATTERN = r'Podany plik został usunięty\s*</div>' IP_BLOCKED_PATTERN = r'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' - SECONDS_PATTERN = 'var count = (\d+);' + SECONDS_PATTERN = 'var\scount\s=\s(\d+);' RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" LINK_PATTERN = r'<form action="(.+?)" method="GET">' + def setup(self): + self.multiDL = self.premium + self.resumeDownload = True + + def getFileInfo(self): m = re.search(self.IP_BLOCKED_PATTERN, self.html) - if m is None: + if m: self.fail("Only connections from Polish IP address are allowed") return super(CatShareNet, self).getFileInfo() @@ -52,7 +59,7 @@ class CatShareNet(SimpleHoster): self.retry(reason="Wrong captcha entered") dl_link = m.group(1) - self.download(dl_link) + self.download(dl_link, disposition=True) getInfo = create_getInfo(CatShareNet) -- cgit v1.2.3 From 23ae563604dca1dae262fbc598154b99b2f1eae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Fri, 3 Oct 2014 09:06:05 +0200 Subject: Update plugins after CaptchaService and XFileSharingPro changes --- module/plugins/hoster/CatShareNet.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 121973e4d..6bfbe0f1a 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -25,7 +25,6 @@ class CatShareNet(SimpleHoster): IP_BLOCKED_PATTERN = r'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' SECONDS_PATTERN = 'var\scount\s=\s(\d+);' - RECAPTCHA_KEY = "6Lfln9kSAAAAANZ9JtHSOgxUPB9qfDFeLUI_QMEy" LINK_PATTERN = r'<form action="(.+?)" method="GET">' @@ -48,7 +47,12 @@ class CatShareNet(SimpleHoster): self.wait(wait_time, True) recaptcha = ReCaptcha(self) - challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY) + + captcha_key = recaptcha.detect_key() + if captcha_key is None: + self.parseError("ReCaptcha key not found") + + challenge, code = recaptcha.challenge(captcha_key) self.html = self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field': code}) -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/CatShareNet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 6bfbe0f1a..c0c934211 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -14,8 +14,9 @@ class CatShareNet(SimpleHoster): __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __description__ = """CatShare.net hoster plugin""" - __author_name__ = ("z00nx", "prOq", "Walter Purcaro") - __author_mail__ = ("z00nx0@gmail.com", None, "vuolter@gmail.com") + __authors__ = [("z00nx", "z00nx0@gmail.com"), + ("prOq", None), + ("Walter Purcaro", "vuolter@gmail.com")] TEXT_ENCODING = True -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/CatShareNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index c0c934211..c50632ac3 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -14,6 +14,7 @@ class CatShareNet(SimpleHoster): __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __description__ = """CatShare.net hoster plugin""" + __license__ = "GPLv3" __authors__ = [("z00nx", "z00nx0@gmail.com"), ("prOq", None), ("Walter Purcaro", "vuolter@gmail.com")] -- cgit v1.2.3 From ee5f77de01779850b61561be2f6146e7cdc148ae Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 11 Oct 2014 13:52:11 +0200 Subject: [CatShareNet] Account support --- module/plugins/hoster/CatShareNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index c50632ac3..0993c69e6 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' @@ -23,9 +23,9 @@ class CatShareNet(SimpleHoster): TEXT_ENCODING = True FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.]+) (?P<U>\w+)\)<' - OFFLINE_PATTERN = r'Podany plik został usunięty\s*</div>' + OFFLINE_PATTERN = ur'Podany plik został usunięty\s*</div>' - IP_BLOCKED_PATTERN = r'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' + IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' SECONDS_PATTERN = 'var\scount\s=\s(\d+);' LINK_PATTERN = r'<form action="(.+?)" method="GET">' -- cgit v1.2.3 From c5d1a4fd8943877c6d2eb3843e0de725dba5191e Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sat, 11 Oct 2014 15:09:53 +0200 Subject: Pattern update 2 --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 0993c69e6..9d680a9ec 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -22,7 +22,7 @@ class CatShareNet(SimpleHoster): TEXT_ENCODING = True - FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.]+) (?P<U>\w+)\)<' + FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>\w+)\)<' OFFLINE_PATTERN = ur'Podany plik został usunięty\s*</div>' IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' -- cgit v1.2.3 From 388a2f6478d42e423f1f8442d8539983f3762f22 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Tue, 14 Oct 2014 13:38:49 +0200 Subject: Improve unit detection in size pattern --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 9d680a9ec..592792952 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -22,7 +22,7 @@ class CatShareNet(SimpleHoster): TEXT_ENCODING = True - FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>\w+)\)<' + FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)<' OFFLINE_PATTERN = ur'Podany plik został usunięty\s*</div>' IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' -- cgit v1.2.3 From 2ae91b81a2f12a1c9b1f78524df78a2b3f1ef494 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 19 Oct 2014 14:52:42 +0200 Subject: Update hosters to self.error --- module/plugins/hoster/CatShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 592792952..9a7824659 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): __name__ = "CatShareNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' @@ -52,7 +52,7 @@ class CatShareNet(SimpleHoster): captcha_key = recaptcha.detect_key() if captcha_key is None: - self.parseError("ReCaptcha key not found") + self.error("ReCaptcha key not found") challenge, code = recaptcha.challenge(captcha_key) self.html = self.load(self.pyfile.url, -- cgit v1.2.3 From 7b67f68c1636014fe02286da71bdc6c13dc3eeee Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Thu, 23 Oct 2014 00:50:23 +0200 Subject: Simplify captcha challenge calls --- module/plugins/hoster/CatShareNet.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 9a7824659..315ec712b 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -50,11 +50,7 @@ class CatShareNet(SimpleHoster): recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - if captcha_key is None: - self.error("ReCaptcha key not found") - - challenge, code = recaptcha.challenge(captcha_key) + challenge, code = recaptcha.challenge() self.html = self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field': code}) -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> 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/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 315ec712b..e5cf69914 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -38,7 +38,7 @@ class CatShareNet(SimpleHoster): def getFileInfo(self): m = re.search(self.IP_BLOCKED_PATTERN, self.html) if m: - self.fail("Only connections from Polish IP address are allowed") + self.fail(_("Only connections from Polish IP address are allowed")) return super(CatShareNet, self).getFileInfo() -- cgit v1.2.3 From 146fe1e309c33ab149bfaf58ad86c0dd4fb9b156 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Mon, 27 Oct 2014 01:18:45 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index e5cf69914..fdbf0464a 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -58,7 +58,7 @@ class CatShareNet(SimpleHoster): m = re.search(self.LINK_PATTERN, self.html) if m is None: self.invalidCaptcha() - self.retry(reason="Wrong captcha entered") + self.retry(reason=_("Wrong captcha entered")) dl_link = m.group(1) self.download(dl_link, disposition=True) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/CatShareNet.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index fdbf0464a..9faa9be81 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -7,17 +7,17 @@ from module.plugins.internal.CaptchaService import ReCaptcha class CatShareNet(SimpleHoster): - __name__ = "CatShareNet" - __type__ = "hoster" + __name__ = "CatShareNet" + __type__ = "hoster" __version__ = "0.08" __pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}' __description__ = """CatShare.net hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("z00nx", "z00nx0@gmail.com"), - ("prOq", None), - ("Walter Purcaro", "vuolter@gmail.com")] + __license__ = "GPLv3" + __authors__ = [("z00nx", "z00nx0@gmail.com"), + ("prOq", None), + ("Walter Purcaro", "vuolter@gmail.com")] TEXT_ENCODING = True -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 9faa9be81..63ae2c11c 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -22,7 +22,7 @@ class CatShareNet(SimpleHoster): TEXT_ENCODING = True - FILE_INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)<' + INFO_PATTERN = r'<title>(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)<' OFFLINE_PATTERN = ur'Podany plik został usunięty\s*</div>' IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<' -- cgit v1.2.3 From 67587fbe0335cacfde28a86ba729b9d567ce1da7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Sun, 7 Dec 2014 00:27:18 +0100 Subject: Plugin code cosmetics (3) --- module/plugins/hoster/CatShareNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 63ae2c11c..0caac5913 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -31,7 +31,7 @@ class CatShareNet(SimpleHoster): def setup(self): - self.multiDL = self.premium + self.multiDL = self.premium self.resumeDownload = True -- cgit v1.2.3 From 4d578cb15f3d6edd036e438e504739b97660f93e Mon Sep 17 00:00:00 2001 From: Walter Purcaro <vuolter@gmail.com> Date: Tue, 9 Dec 2014 16:58:35 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/CatShareNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/CatShareNet.py') diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py index 0caac5913..949a021dd 100644 --- a/module/plugins/hoster/CatShareNet.py +++ b/module/plugins/hoster/CatShareNet.py @@ -50,10 +50,10 @@ class CatShareNet(SimpleHoster): recaptcha = ReCaptcha(self) - challenge, code = recaptcha.challenge() + challenge, response = recaptcha.challenge() self.html = self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, - 'recaptcha_response_field': code}) + 'recaptcha_response_field' : response}) m = re.search(self.LINK_PATTERN, self.html) if m is None: -- cgit v1.2.3