Python Bot To Like and Comment On All Posts Of A User On Instagram.

Ayush Saini
1 min readMar 2, 2019


Photo by Luke van Zyl on Unsplash

I recently followed someone really important person on Instagram. I wanted to like every post of that person but the number of total posts was in the thousands. Liking all the posts was a very tedious and time-consuming task, so I automated this task. This Bot liked and commented on all the posts and impressed me as well as that person also.

So firstly you have to install selenium on your computer and have to download chrome driver (for Google Chrome).

Now here is the script of Bot. You just have to copy the code and create a new python file.


Here in the above code, you have to enter your Instagram username and password.

After that, you have to Enter the username of the person whose posts you want to like and comment on.

After that Run the code and Bingo!

Give time to code to like and comment on the posts and the terminal will display the number of posts liked by the bot.

If you liked this, drop a clap. Thankyou!



Ayush Saini

Android || Kotlin || React Native

Recommended from Medium


See more recommendations