From 57baa4fc1eb4abae515b8c8c44d5873019e656f7 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Wed, 7 Dec 2022 13:01:06 +0100 Subject: [PATCH] Disable chrome login; since it doesn't work anyway --- lang/Português.json | 2 +- main.py | 6 ++---- translate.py | 2 +- twitch.py | 4 +++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lang/Português.json b/lang/Português.json index f447fc9..b902907 100644 --- a/lang/Português.json +++ b/lang/Português.json @@ -25,7 +25,7 @@ "twofa_code_required": "Token F2A Requerido." }, "error": { - "captcha": "Seu login foi negado pelo CAPTCHA.\nPor favor tente em aproximadamente +12 houras.", + "captcha": "Seu login foi negado pelo CAPTCHA.\nPor favor tente em aproximadamente 12+ houras.", "site_down": "Twitch esta fora do ar, tentando em {seconds} segundos...", "no_connection": "Sem conecao com a TWITCH, reconectando em {seconds} segundos..." }, diff --git a/main.py b/main.py index a612ec0..f6a7a5b 100644 --- a/main.py +++ b/main.py @@ -171,14 +171,12 @@ if __name__ == "__main__": loop.run_until_complete(client.run()) except CaptchaRequired: exit_status = 1 - msg = _("error", "captcha") client.prevent_close() - client.print(msg) + client.print(_("error", "captcha")) except Exception: exit_status = 1 - msg = "Fatal error encountered:\n" client.prevent_close() - client.print(msg) + client.print("Fatal error encountered:\n") client.print(traceback.format_exc()) finally: signal.signal(signal.SIGINT, signal.SIG_DFL) diff --git a/translate.py b/translate.py index dd8a35c..0c31780 100644 --- a/translate.py +++ b/translate.py @@ -247,7 +247,7 @@ default_translation: Translation = { "twofa_code_required": "2FA token required.", }, "error": { - "captcha": "Your login attempt was denied by CAPTCHA.\nPlease try again in +12 hours.", + "captcha": "Your login attempt was denied by CAPTCHA.\nPlease try again in 12+ hours.", "site_down": "Twitch is down, retrying in {seconds} seconds...", "no_connection": "Cannot connect to Twitch, retrying in {seconds} seconds...", }, diff --git a/twitch.py b/twitch.py index 0d27c58..05916c8 100644 --- a/twitch.py +++ b/twitch.py @@ -36,6 +36,7 @@ from websocket import WebsocketPool from inventory import DropsCampaign from exceptions import ( MinerException, + CaptchaRequired, ExitRequest, LoginException, ReloadRequest, @@ -390,7 +391,8 @@ class _AuthState: break if use_chrome: - await self._chrome_login() + # await self._chrome_login() + raise CaptchaRequired() if hasattr(self, "access_token"): logger.debug("Access token granted")