From 9688752e43cbedb368a0666234f7a0c361ffd30b Mon Sep 17 00:00:00 2001 From: Vincent A Date: Sat, 5 May 2018 18:42:02 +0200 Subject: [PATCH] python3: port anticaptcha and deathbycaptcha --- modules/anticaptcha/browser.py | 2 +- modules/deathbycaptcha/browser.py | 4 ++-- tools/py3-compatible.modules | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/anticaptcha/browser.py b/modules/anticaptcha/browser.py index c679c7b204..5a351842f9 100644 --- a/modules/anticaptcha/browser.py +++ b/modules/anticaptcha/browser.py @@ -42,7 +42,7 @@ def post_image(self, data): "clientKey": self.apikey, "task": { "type": "ImageToTextTask", - "body": b64encode(data), + "body": b64encode(data).decode('ascii'), "phrase": False, "case": False, "numeric": False, diff --git a/modules/deathbycaptcha/browser.py b/modules/deathbycaptcha/browser.py index 8d05d4ebc4..9bc7202981 100644 --- a/modules/deathbycaptcha/browser.py +++ b/modules/deathbycaptcha/browser.py @@ -45,9 +45,9 @@ def check_correct(self, reply): raise UnsolvableCaptcha() def create_job(self, data): - data64 = 'base64:%s' % b64encode(data) + data64 = b'base64:%s' % b64encode(data) files = { - 'captchafile': ('captcha.jpg', BytesIO(data64.encode('ascii'))), + 'captchafile': ('captcha.jpg', BytesIO(data64)), } post = OrderedDict([ diff --git a/tools/py3-compatible.modules b/tools/py3-compatible.modules index a420273c08..8e7fd84981 100644 --- a/tools/py3-compatible.modules +++ b/tools/py3-compatible.modules @@ -9,6 +9,7 @@ allrecipes amazon ameli americanexpress +anticaptcha apec arte axabanque @@ -36,6 +37,7 @@ creditcooperatif creditdunord creditmutuel cuisineaz +deathbycaptcha delubac dlfp ebonics -- GitLab