TL;DR β¨
In this easy-to-follow tutorial, you will learn how to build your own Instagram Automation tool from scratch with cron jobs. π
...
For further actions, you may consider blocking this person and/or reporting abuse
Wow, wow, wow β I love this article so much! Just following what others do is not how I define a programmer; finding an unusual way to solve real-world problems is where creativity comes in.
Who would've thought that anyone could use something as simple as a cron job to automate posting on social media?
I am definitely spinning this up on my Ubuntu server running in my homelab. Cheers to you. π₯
To be honest, I didn't know you could create an entire image with NumPy arrays. I don't work with Python much but Wow!
I'm glad I could share it with you. π Here, we're generating an image using the Pillow library from NumPy arrays, so the image generation isn't solely based on NumPy.
I'm glad that you liked it. βΊοΈ
Let me know your thoughts on this π
Seems to be well-explained article. I think it can be applied to own social media.
@heyeasley Glad you liked it! π
You've written a complete book. 23Β min long article π
Hope you enjoyed reading this.
But, I love the fact that the code is very crisp and well documented. Saving it for later.
while it is a very good article and I am going to read it in detail shortly, I am going to ask a question about whether it will impact your account.
I was using a Mac app to view my account on my desktop and recently Instagram logged me out saying that I am using automation to view my account, which is apparently against the rules. After that, I got logged off on my mobile so I had to log back again and I could not get into that app anymore.
Just curious of there is a possibility of getting the same behaviour using this cron? Not against the automation, I am all for that, but when you deal with Meta, it's a different story.
This shouldn't have any security complications, to be honest, as long as Instagram is happy to expose its API (and you ensure that nobody other than you can view your
.env
file with your username and password). Do keep in mind that the first time you try this from your system, have Instagram open in another tab, as it may ask if the device trying to access your account is indeed yours.But make sure you don't have a post scheduled for every other minute, as it will try to log in to Instagram for each post.
This is one big post. Bookmarking it for later. As long as you use it inside a cloud VM, this script will be a lifesaver.
Exactly. If you plan to use this on your own computer, it should be when your computer is powered on most of the time.
If you have a cloud VM or a home lab setup, this should be a lifesaver.
I love the fact that you using docsttring in the documentation!
Almost after a week, I still see this 23 min read blog on my feed. Great to see it performing well. ππ½
Thank you π
This is amazing! I love this project. But when I take a step back. What problem is it solving?
Iβm glad you liked it! π It can definitely come in handy if you have a few images that you want to post on Instagram, but not right away β just on a certain day.
I can't say this is super useful all the time, but it can come in handy at times. After I wrote this article, I found out that Instagram offers this feature for professional accounts: help.instagram.com/439971288310029.
Not everyone would want to switch their account to professional, though. The idea of Instagram automation came to me when I built a GNOME wallpaper changer script that updates my wallpaper every 3 hours using cron jobs and decided to code it up and share with you all.
Great work around to get the professional account feature!
Wow, good piece. I don't know anything about shell scripting and all.
Definitely not a beginner like me π₯² friendly article . Try changing the experience level.
I just noticed that the post experience is set to the first stage of the Advanced graph by default.
I've tried documenting portions of the code itself, so the article won't be over half an hour long.
TIL. Interesting!
Glad you found it helpful! π
I still didn't read that since it's 2:30 a.m now
But I'm willing to go back to that
However I have a question, any idea about how can I make a code to automate replies and DMs based on some triggers on the comments
That's what I was looking for and I came across your article
I've used python more than any other language, but I'm not expert tho, but I'm definitely willing to commit to learn how to automate my Instagram business using my own code, I don't mind if I'll need to use other languages, but I'll be happier if it's python
Please tell me if you know the answer to my request or at least lead me to where did you learn the post automation, I might find my need in your sources ππΎ
Hey @sami_reg_bc7f377019e7cf4c, sorry for the late response! πΆ I just saw your comment in my notifications.
Regarding handling comments on Instagram posts, I noticed that instagrapi supports a Comment API which you can use to manage comments on your post.
To automate commenting based on triggers in comments using my cron job approach, you can build a similar Python script that tracks the comment state (number of comments) on your post (the Comment API allows you to check the comment count). You can schedule this script to run daily, hourly, or even every minute. If a new comment is detected, you can add a standard reply to those comments.
I hope this makes sense! If you need any extra help, feel free to ask.
Oh thank you, I was busy too so I haven't get back here until now.
You said it's possible to handle comments through 2 ways
But either I missed or you really didn't say anything about DM's right? Are they also possible to automate through the same trigger
Client comment > Detect trigger > auto reply + auto DM
What do you think? And thank you again and sorry for being clingy haha
@sami_reg_bc7f377019e7cf4c Yes, there is support for DMs as well. As I mentioned, for replying to comments, you can also set up DMs. Instagrapi has documentation on DMs here.
Let me know if you need any extra help. π
God bless you ππΎππΎ