diff --git a/modules/anticaptcha/browser.py b/modules/anticaptcha/browser.py index bf76baafb1a9da91696a1ae4d265a793d79f4d60..19ad3032b6a1b2c6b77017d4dfa1065693422e9d 100644 --- a/modules/anticaptcha/browser.py +++ b/modules/anticaptcha/browser.py @@ -17,6 +17,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this weboob module. If not, see . +# flake8: compatible + from __future__ import unicode_literals from base64 import b64encode @@ -49,7 +51,7 @@ def post_image(self, data): "math": 0, "minLength": 0, "maxLength": 0, - } + }, } r = self.request('/createTask', data=data) self.check_reply(r) @@ -82,13 +84,13 @@ def post_gcaptcha(self, url, key, prefix): def post_gcaptchav3(self, url, key, action): data = { "clientKey": self.apikey, - "task":{ - "type":"RecaptchaV3TaskProxyless", + "task": { + "type": "RecaptchaV3TaskProxyless", "websiteURL": url, "websiteKey": key, "minScore": 0.3, - "pageAction": action - } + "pageAction": action, + }, } r = self.request('/createTask', data=data) self.check_reply(r) @@ -161,7 +163,7 @@ def poll(self, job): def get_balance(self): data = { - "clientKey": self.apikey + "clientKey": self.apikey, } r = self.request('/getBalance', data=data) self.check_reply(r) diff --git a/modules/anticaptcha/module.py b/modules/anticaptcha/module.py index d8f7015f4042650c3dee13519b4dad4bb479f896..39e2d99b3f7f31a93d3384f080c5ee3082927b5b 100644 --- a/modules/anticaptcha/module.py +++ b/modules/anticaptcha/module.py @@ -17,8 +17,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this weboob module. If not, see . -from __future__ import unicode_literals +# flake8: compatible +from __future__ import unicode_literals from weboob.tools.backend import Module, BackendConfig from weboob.capabilities.captcha import ( diff --git a/modules/anticaptcha/test.py b/modules/anticaptcha/test.py index 9c818529c459ebda51b7804c74bb9111373ab839..f97fe8b7239c59ff8e6c568fca89e9a34d515cab 100644 --- a/modules/anticaptcha/test.py +++ b/modules/anticaptcha/test.py @@ -17,6 +17,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this weboob module. If not, see . +# flake8: compatible + from __future__ import unicode_literals from weboob.capabilities.captcha import ImageCaptchaJob