tuxity / insta-unfollower

An Instagram script to unfollow accounts who doesn't follow-you-back
MIT License
381 stars 89 forks source link

Return 400 Bad Request #35

Closed isMMa closed 3 years ago

isMMa commented 4 years ago

Lines:

response = session.post(login_route, data=post_data, allow_redirects=True) response_data = json.loads(response.text)

Return Bad Request and finish.

isMMa commented 4 years ago

Any help?

webjoaoneto commented 4 years ago

Instagram now uses an encrypted password in frontend.

you can do the login on browser and get the 'enc_password' param and put directly on the source code of the script.

Like: line 59

post_data = {
        'username': os.environ.get('INSTA_USERNAME'),
        'enc_password': '#PWD_INSTAGRAM_BROWSER:10:(((....restofpassword))',
    }
tuxity commented 4 years ago

Hello,

I don't have time yet to check it, you have any informations about the encryption method ?

tuxity commented 4 years ago

Maybe a start of response here https://github.com/instagrambot/instabot/blob/a15547553600ec8ff54a0c08f6334d9d29981a99/instabot/api/api.py#L216 for a future PR ;)