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/GigapetaCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index c2feeb6f8..bfa30358e 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class GigapetaCom(SimpleHoster): __name__ = "GigapetaCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -29,16 +29,16 @@ class GigapetaCom(SimpleHoster): COOKIES = [("gigapeta.com", "lang", "us")] - def handleFree(self, pyfile): + def handle_free(self, pyfile): captcha_key = str(random.randint(1, 100000000)) captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) for _i in xrange(5): - self.checkErrors() + self.check_errors() - captcha = self.decryptCaptcha(captcha_url) + captcha = self.decrypt_captcha(captcha_url) self.html = self.load(pyfile.url, post={ "captcha_key": captcha_key, "captcha": captcha, @@ -49,7 +49,7 @@ class GigapetaCom(SimpleHoster): self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 break elif "Entered figures don`t coincide with the picture" in self.html: - self.invalidCaptcha() + self.invalid_captcha() else: self.fail(_("No valid captcha code entered")) -- 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/GigapetaCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index bfa30358e..78b0416b6 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -40,9 +40,9 @@ class GigapetaCom(SimpleHoster): captcha = self.decrypt_captcha(captcha_url) self.html = self.load(pyfile.url, post={ - "captcha_key": captcha_key, - "captcha": captcha, - "download": "Download"}) + 'captcha_key': captcha_key, + 'captcha': captcha, + 'download': "Download"}) m = re.search(r'Location\s*:\s*(.+)', self.req.http.header, re.I) if m: -- 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/GigapetaCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 78b0416b6..e4562be59 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -11,6 +11,7 @@ class GigapetaCom(SimpleHoster): __name__ = "GigapetaCom" __type__ = "hoster" __version__ = "0.05" + __status__ = "stable" __pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\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/GigapetaCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index e4562be59..3fcf4ee32 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -39,7 +39,7 @@ class GigapetaCom(SimpleHoster): for _i in xrange(5): self.check_errors() - captcha = self.decrypt_captcha(captcha_url) + captcha = self.captcha.decrypt_image(captcha_url) self.html = self.load(pyfile.url, post={ 'captcha_key': captcha_key, 'captcha': captcha, @@ -50,7 +50,7 @@ class GigapetaCom(SimpleHoster): self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10 break elif "Entered figures don`t coincide with the picture" in self.html: - self.invalid_captcha() + self.captcha.invalid() else: self.fail(_("No valid captcha code entered")) -- 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/GigapetaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 3fcf4ee32..0334087d3 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -39,7 +39,7 @@ class GigapetaCom(SimpleHoster): for _i in xrange(5): self.check_errors() - captcha = self.captcha.decrypt_image(captcha_url) + captcha = self.captcha.decrypt(captcha_url) self.html = self.load(pyfile.url, post={ 'captcha_key': captcha_key, 'captcha': captcha, -- 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/GigapetaCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/GigapetaCom.py') diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py index 0334087d3..381c39a21 100644 --- a/module/plugins/hoster/GigapetaCom.py +++ b/module/plugins/hoster/GigapetaCom.py @@ -11,7 +11,7 @@ class GigapetaCom(SimpleHoster): __name__ = "GigapetaCom" __type__ = "hoster" __version__ = "0.05" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3