diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-09-30 00:44:55 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-09-30 00:44:55 +0200 |
commit | c3b6253f1ea9b8c4a5aeb2c2c0be292f66a2abee (patch) | |
tree | 074493704fe976dacaacbd4f0a91d3596f0a48ee /module | |
parent | Merge pull request #1882 from GammaC0de/patch-5 (diff) | |
download | pyload-c3b6253f1ea9b8c4a5aeb2c2c0be292f66a2abee.tar.xz |
[Captcha] _decrypt -> decrypt_image
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/hoster/BezvadataCz.py | 4 | ||||
-rw-r--r-- | module/plugins/hoster/FileSharkPl.py | 4 | ||||
-rw-r--r-- | module/plugins/internal/Captcha.py | 7 |
3 files changed, 7 insertions, 8 deletions
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py index d2af8272a..547be68fb 100644 --- a/module/plugins/hoster/BezvadataCz.py +++ b/module/plugins/hoster/BezvadataCz.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class BezvadataCz(SimpleHoster): __name__ = "BezvadataCz" __type__ = "hoster" - __version__ = "0.29" + __version__ = "0.30" __status__ = "testing" __pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+' @@ -48,7 +48,7 @@ class BezvadataCz(SimpleHoster): if m is None: self.error(_("Wrong captcha image")) - inputs['captcha'] = self.captcha._decrypt(m.group(1).decode('base64'), input_type='png') + inputs['captcha'] = self.captcha.decrypt_image(m.group(1).decode('base64'), input_type='png') if '<img src="data:image/png;base64' in self.html: self.captcha.invalid() diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py index 94e2d25ab..080e35438 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.14" + __version__ = "0.15" __status__ = "testing" __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+' @@ -100,7 +100,7 @@ class FileSharkPl(SimpleHoster): if m is None: self.retry(msg=_("Captcha image not found")) - inputs['form[captcha]'] = self.captcha._decrypt(m.group(1).decode('base64'), input_type='jpeg') + inputs['form[captcha]'] = self.captcha.decrypt_image(m.group(1).decode('base64'), input_type='jpeg') inputs['form[start]'] = "" self.download(link, post=inputs, disposition=True) diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py index 93642b32a..3d105ed12 100644 --- a/module/plugins/internal/Captcha.py +++ b/module/plugins/internal/Captcha.py @@ -11,7 +11,7 @@ from module.plugins.internal.Plugin import Plugin class Captcha(Plugin): __name__ = "Captcha" __type__ = "captcha" - __version__ = "0.45" + __version__ = "0.46" __status__ = "testing" __description__ = """Base anti-captcha plugin""" @@ -52,11 +52,10 @@ class Captcha(Plugin): def decrypt(self, url, get={}, post={}, ref=False, cookies=True, decode=False, req=None, input_type='jpg', output_type='textual', ocr=True, timeout=120): img = self.load(url, get=get, post=post, ref=ref, cookies=cookies, decode=decode, req=req or self.plugin.req) - return self._decrypt(img, input_type, output_type, ocr, timeout) + return self.decrypt_image(img, input_type, output_type, ocr, timeout) - #@TODO: Definitely choose a better name for this method! - def _decrypt(self, data, input_type='jpg', output_type='textual', ocr=False, timeout=120): + def decrypt_image(self, data, input_type='jpg', output_type='textual', ocr=False, timeout=120): """ Loads a captcha and decrypts it with ocr, plugin, user input |