From 4419c816f5b8c674e1a8fa43fe30e87bb783a098 Mon Sep 17 00:00:00 2001 From: Marco Gavelli Date: Sun, 15 Jul 2018 12:37:20 +0200 Subject: [PATCH] Fix 2FA for non english FB --- fbchat/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fbchat/client.py b/fbchat/client.py index 5b5dbe1..0ecb4a7 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -265,8 +265,7 @@ class Client(object): # Usually, 'Checkpoint' will refer to 2FA if ('checkpoint' in r.url - and ('enter security code to continue' in r.text.lower() - or 'enter login code to continue' in r.text.lower())): + and ('id="approvals_code"' in r.text.lower())): r = self._2FA(r) # Sometimes Facebook tries to show the user a "Save Device" dialog