Think, many of you noticed Instagram suspicious login attempt warning when you try login to your account via new device. In GUI it's clear how to send a security code to your phone number or email. In my case, I'm using the python instagram parser library https://github.com/OlegYurchik/InstaParser to interact with Instagram. And came across with problem above. Error instaparser.exceptions.InternetException: Error by connection with Instagram to 'https://www.instagram.com/accounts/login/ajax/' with response code '400', and here is my question, can I somehow avoid this problem. For now I've just an idea to implement it via selenium, just detect first that kind of cases and run the selenium to enter the security code with GUI. Any ideas to make it in easier way?
Thanks in advance!