I noticed a couple of weeks back that after logging in, the script would immediately go to my profile page before I even got the verification code. That causes this to be executed:
if not login_user(self.browser, self.username, self.password):
print('Wrong login data!')
self.logFile.write('Wrong login data!\n')
Then the session ends. What I did was to increase the sleep time to sleep(10) in login_util.py to give me more time to enter the code. I just figured it out this morning and now everything is fine.
Has anyone else experienced this?
@ToJen please make sure to have the right login data entered as either ENV Variables or into the quickstart.py into InstaPy(username="<your-username)", password="<your-password>"
@timgrossmann yup, I have the credentals in IntsaPy(...).
@ToJen
What I did was to increase the sleep time to sleep(10) in login_util.py to give me more time to enter the code. I just figured it out this morning and now everything is fine.
You are not supposed to enter the credentials on your own... The bot does all of this for you.
Please post your quickstart.py file (make sure to blur the login credentials)
I passed my credentials in __init__ of the InstaPyclass. But this is what my quickstart looks like.
from instapy import InstaPy
dont_like = ['food', 'girl', 'hot']
ignore_words = ['pizza']
friend_list = ['friend1', 'friend2', 'friend3']
InstaPy()\
.login()\
.set_upper_follower_count(limit = 2500) \
.set_do_comment(True, percentage=10) \
.set_comments(['Cool!', 'Awesome!', 'Nice!']) \
.set_dont_include(friend_list) \
.set_dont_like(dont_like) \
.set_ignore_if_contains(ignore_words) \
.like_by_tags(['pictureoftheday', 'photooftheday', 'dailyquotes'], amount=100) \
.end()
Disable 2FA or wait until Instagram unflag your account.
Yup, two-factor was somehow slowing down the sign in. But it worked before anyways.
Most helpful comment
Disable 2FA or wait until Instagram unflag your account.