From 4f5d3d6f4fb1bfad26fc6f2646270764bea614a4 Mon Sep 17 00:00:00 2001 From: aatakansalar Date: Wed, 13 Sep 2023 04:08:03 +0300 Subject: [PATCH] Fixing Email Verification Token Retrieval Issue Changing the value msg_from (where the verification email is sent from) is compared to. Instead of "info@twitter.com", it should check for "info@x.com" as the verification code seems to be sent from this email now. Fixes the "Error in LoginAcid: Email code timeout" error in my case. --- twscrape/imap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twscrape/imap.py b/twscrape/imap.py index c9c2226..e591a5b 100644 --- a/twscrape/imap.py +++ b/twscrape/imap.py @@ -55,7 +55,7 @@ def _wait_email_code(imap: imaplib.IMAP4_SSL, count: int, min_t: datetime | None if min_t is not None and msg_time < min_t: return None - if "info@twitter.com" in msg_from and "confirmation code is" in msg_subj: + if "info@x.com" in msg_from and "confirmation code is" in msg_subj: # eg. Your Twitter confirmation code is XXX return msg_subj.split(" ")[-1].strip()