Automatically Find & Re-post Popular Instagram Content with Python

K. N
5 min readNov 13, 2020

Update (1/25/2021): It seems like the code no longer works, response is error 429 from instagram, which means too many requests. I will update it as soon as I can but until then, wanted to warn readers. I think having the code up might still help some and one can always make changes oneself so I am no taking the tutorial down for now but I will definitely get around to fixing it, thanks!

Disclaimer: Most of this code was obtained from other tutorials, I do not take credit for writing the selenium code. The purpose of this tutorial is to demonstrate Instagram automation and not to encourage posting/re-posting other people’s work. Unfortunately I am unable to find the original author of the code for Autogram, if anyone knows the author please do let me know so that I can give them credit for their awesome work.

The jupyter notebook containing all the code is available here.

What it does?

This takes a keyword as an input from the user and using it as a hashtag, retrieves public Instagram posts. It then sorts those posts based on the number of likes. The post with the most likes is then downloaded to be reposted later. It then pulls any hashtags from the caption, finds other hashtags being used with these hashtags on twitter and Instagram and use them in the…

--

--