Instagram Automation Using Python


Hai Nerds,

I have a piece of good news for all Instagram fans out there. Instagram which was launched in 2010 has gone from an idea of two Stanford computer geeks to a platform used by 1000 million which is changing the very nature of photography.

As Instagram has grown in popularity in the past years ‘Instagrammers’ have managed to create a career out of posting images. Instagrammers generally fit into the categories of technology, fashion, beauty, fitness, food, and entertainment. It’s reported that some of the biggest accounts can earn thousands just from posting one post.


Instagram Automation Using Python


Every one of us is having an Instagram account, either personal or business profile and most of us use to upload photos to it several times a day. This is a  very time-consuming process and I'm obsessed with it. So what if we could automate this task of posting photos to Instagram.

What we are going to build is a Python script that will automate our Instagram activity. We are gonna schedule posts in advance and this Python script will post these at the right time. This will save a lot of my time so that I could use it for other projects and works. Firstly, I will be creating a folder of photos that I want to upload and add them to the script so that it will automatically upload two or three photos every day, at the time of my wish.

So it will take almost one and a half hours for me to prepare the backlog of photos.  After, I will be free for a month because the script will upload the photos daily for me. I just need to add more photos to the collection when it gets empty.


Requirements:
An in-process scheduler for periodic jobs that uses the builder pattern for configuration. Schedule lets you run Python functions (or any other callable) periodically at pre-determined intervals using a simple, human-friendly syntax.
Publish photos and videos on Instagram, without a phone! You can upload posts and even stories on Instagram. You can upload a local file or use a link, it does everything for you automagically.

Installation:
pip install schedule
pip install instapy-cli


The Algorithm that I made for this program:
  1. The program calling a function to upload photos to Instagram, at a scheduled time.
  2. The script will automatically login to Instagram with username and password.
  3. Scan the specified directory for images and upload the specified number of photos with a description and hashtags.
  4. Loop so that the program will keep running.


This is the code to automate Instagram with Python.


automate_instagram_python.py



Automating Instagram with Python
Collection of Images to be Posted


Instagram Auto Post Using Python
Recent 2 Photos are Posted by the Program


Make sure to run the script after restarting your computer. In Windows, you can also schedule this program to automatically start running whenever you turn on your system. I will explain this in the next post.

Hope you enjoy reading. If you have any trouble implementing this or if you need any help, feel free to comment below.


Thank You.

Instagram Automation Using Python Instagram Automation Using Python Reviewed by Cyril Tom Mathew on July 24, 2019 Rating: 5

No comments:

Powered by Blogger.