twscrape icon indicating copy to clipboard operation
twscrape copied to clipboard

Error logging in: [Errno 8] nodename nor servname provided, or not known

Open yemregundogmus opened this issue 1 year ago • 2 comments

I've created a file named accounts.txt with the following format:

username:password:email:email_password

After adding account details in the aforementioned format, I attempted to perform a login operation. However, I encountered an error during this process.

Log Output:

2023-09-12 14:17:48.433 | INFO     | twscrape.accounts_pool:login_all:155 - [1/1] Logging in USERNAME - MAILADDR 
2023-09-12 14:17:50.142 | ERROR    | twscrape.login:next_login_task:181 - Error in LoginAcid: [Errno 8] nodename nor servname provided, or not known
2023-09-12 14:17:50.142 | ERROR    | twscrape.accounts_pool:login:141 - Error logging in to USERNAME: [Errno 8] nodename nor servname provided, or not known

Please assist in resolving this issue.

PS: i use custom domain mail address from yandex mail.

Versions: twscrape: 0.8.0 SQLite client: 2.6.0 SQLite runtime: 3.41.2 (3.41.2) Python 3.11.3

yemregundogmus avatar Sep 12 '23 11:09 yemregundogmus

@yemregundogmus were you able to figure out what the solution for this issue was? I'm hitting the same error, let me know if you have any pointers to help solve this

varunmeds avatar Jan 19 '24 05:01 varunmeds

Hello @varunmeds and @yemregundogmus, I figured this out on my side. You need to add your provider imap server links in the imap.py file and more precisely in the IMAP_MAPPING dictionary line 26.

IMAP_MAPPING: dict[str, str] = { "yahoo.com": "imap.mail.yahoo.com", "icloud.com": "imap.mail.me.com", "outlook.com": "imap-mail.outlook.com", "hotmail.com": "imap-mail.outlook.com", "youremaildomain.com": "yourproviderimap.com", } There might be better ways to deal with this @vladkens will probably know better but it work well on my side (I do have the issue #86 causing me some issues still.)

BFAGIT avatar Feb 27 '24 21:02 BFAGIT