From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/hoster/NarodRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index c201ac250..0a44cd6eb 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -44,7 +44,7 @@ class NarodRu(SimpleHoster): captcha_url, post_data['key'] = m.groups() post_data['rep'] = self.decryptCaptcha(captcha_url) - self.html = self.load(pyfile.url, post=post_data, decode=True) + self.html = self.load(pyfile.url, post=post_data) m = re.search(self.LINK_FREE_PATTERN, self.html) if m: -- 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/NarodRu.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 0a44cd6eb..3c3b0d124 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class NarodRu(SimpleHoster): __name__ = "NarodRu" __type__ = "hoster" - __version__ = "0.12" + __version__ = "0.13" __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+-narod\.yandex\.ru)/(?P\d+)/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -32,7 +32,7 @@ class NarodRu(SimpleHoster): LINK_FREE_PATTERN = r'' - def handleFree(self, pyfile): + def handle_free(self, pyfile): for _i in xrange(5): self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random.random() * 777)) @@ -42,18 +42,18 @@ class NarodRu(SimpleHoster): post_data = {"action": "sendcapcha"} captcha_url, post_data['key'] = m.groups() - post_data['rep'] = self.decryptCaptcha(captcha_url) + post_data['rep'] = self.decrypt_captcha(captcha_url) self.html = self.load(pyfile.url, post=post_data) m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = urlparse.urljoin("http://narod.ru", m.group(1)) - self.correctCaptcha() + self.correct_captcha() break elif u'Ошиблись?' in self.html: - self.invalidCaptcha() + self.invalid_captcha() else: self.error(_("Download link")) -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/hoster/NarodRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 3c3b0d124..53171c837 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -40,7 +40,7 @@ class NarodRu(SimpleHoster): if m is None: self.error(_("Captcha")) - post_data = {"action": "sendcapcha"} + post_data = {'action': "sendcapcha"} captcha_url, post_data['key'] = m.groups() post_data['rep'] = self.decrypt_captcha(captcha_url) -- 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/NarodRu.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index 53171c837..f88b5e2c7 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -11,6 +11,7 @@ class NarodRu(SimpleHoster): __name__ = "NarodRu" __type__ = "hoster" __version__ = "0.13" + __status__ = "stable" __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+-narod\.yandex\.ru)/(?P\d+)/.+' __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/NarodRu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index f88b5e2c7..f54fbf71e 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -43,18 +43,18 @@ class NarodRu(SimpleHoster): post_data = {'action': "sendcapcha"} captcha_url, post_data['key'] = m.groups() - post_data['rep'] = self.decrypt_captcha(captcha_url) + post_data['rep'] = self.captcha.decrypt_image(captcha_url) self.html = self.load(pyfile.url, post=post_data) m = re.search(self.LINK_FREE_PATTERN, self.html) if m: self.link = urlparse.urljoin("http://narod.ru", m.group(1)) - self.correct_captcha() + self.captcha.correct() break elif u'Ошиблись?' in self.html: - self.invalid_captcha() + self.captcha.invalid() else: self.error(_("Download link")) -- 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/NarodRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index f54fbf71e..a833edff4 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -43,7 +43,7 @@ class NarodRu(SimpleHoster): post_data = {'action': "sendcapcha"} captcha_url, post_data['key'] = m.groups() - post_data['rep'] = self.captcha.decrypt_image(captcha_url) + post_data['rep'] = self.captcha.decrypt(captcha_url) self.html = self.load(pyfile.url, post=post_data) -- 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/NarodRu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/NarodRu.py') diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py index a833edff4..b0d4a4960 100644 --- a/module/plugins/hoster/NarodRu.py +++ b/module/plugins/hoster/NarodRu.py @@ -11,7 +11,7 @@ class NarodRu(SimpleHoster): __name__ = "NarodRu" __type__ = "hoster" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+-narod\.yandex\.ru)/(?P\d+)/.+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3