Download Display Picture of an Instagram Account Using Python

Search for a command to run...

Hello, I've been reading your blog's since you uploaded the "automate ms teams" blog. I just want to say I am a huge fan and a learning python enthusiast. Thank you so much for the amazing content that you post :)
Good Job
Survey.Bertuccis.com – If you had as of late dining at the Bertucci’s, at that point here is a piece of good news for you.
Cause you can get Free Bertucci’s Validation Code for imparting your experience to Bertucci’s Survey.
Along these lines, go to the official site of Bertucci’s Customer Satisfaction Survey and you have a chance to share your real opinion regarding the restaurant food quality and customer service. https://humansurvey.xyz/survey-bertuccis-com/
Glad you found it Useful!
The series content will mostly cover Technical Python tutorials and my recent learnings and experience in Python.
Hello world! We all make use of passwords on a daily basis, to keep your account safe and prevent your password from being hacked we have to make our password is hard enough that nobody can guess. Password generator is a Random Password generating pr...
All you need to know about Hacktoberfest 2021

Hello reader! Well, Hacktoberfest is something, you are gonna hear a lot about in the coming month. You can refer to my YouTube video Tutorial to see a working tutorial for better understanding and a step-by-step guide of the same. https://www.yo...

Hello reader! In this Blog post, I will share some useful code snippets and functions in Python. Give it a read. Let's get started! 1. Memory The method getsizeof can be used to retrieve the size of any object. Here's an example of the same. import...

Hello reader! Whenever a client sends a request to the server, the response always contains a status code. You might not see it always but it's returned at every client-server interaction. Well, even if you are not a programmer, you would still know...

Hello reader! Microsoft subsidiary GitHub launched Copilot to power pair programming with AI. In this blog post, I will share all you need to know about it. You can refer to my YouTube video Tutorial to see a working tutorial for better understandin...

Hello world!
I am attending a Technical Writing Bootcamp at @hashnode. Hashnode Bootcamp II is a free virtual Bootcamp to help beginner technical writers to improve their writing skill. This article is inspired by the latest session by Anna McDougall, [@AnnaJMcDougall]
TASK: In 7 days, write a blog post from one of the topics you learned during the session
In this Blog article, I will share my thoughts on the same. Let's get started.
Have you heard about Instagram? Do you Use Instagram? Well, In this Blog article, we will learn how to Download Display Picture of an Instagram Account. We will see the implementation in Python.
Check out the Repository for Ultimate Resource in python. Drop a star if you find it useful! Got anything to add? Open a PR on the same!
You can refer to my YouTube video Tutorial to see a working tutorial for better Understanding and a step by step Guide of the same.
1. Instagram Introduction
2. Instaloader Introduction
3. How to Download Display Picture of an Instagram Account
I do not think Instagram needs an Introduction but for those who do not know, Instagram is an photo and video sharing social networking platform owned by Facebook. If you wish to know more about Instagram, you can refer its Wikipedia page.
Instagram Link: https://www.instagram.com/
Instaloader Introduction:The Instaloader module is python package having great functionalities to scrap instagram, it’s functions can be used as command line utility. It can be used for download pictures (or videos) along with their captions and other metadata from Instagram.
If you wish to know more about it, you can refer to Instaloader Documentation. Use this link to navigate to the documentation.
Now that you are aware of Instaloader basics, we can move forward to the coding section. Let's get started!
You can find all the code at my GitHub Repository. Drop a star if you find it useful.

In order to access the Python library, you need to install it into your Python environment, use the following command to install Instaloader
pip install instaloader
Now, let's import the package in our Python script and create an instance test
import instaloader
test = instaloader.Instaloader()
Once done, let's take user input to get the username of the account you wish to download the profile picture ! I am storing it in acc
acc = input('Enter the Account Username: ')
#acc = 'leomessi'
So here, Assuming you all must have heard the name of Lionel Messi, we have entered the account username as leomessi.
Finally, its time to download the data.
We will make use of download_profile method here and pass in two parameters:
acc: the username profile_pic_only: we will set this to be True.test.download_profile(acc, profile_pic_only = True)
A new folder will be created with the account username, in our case, leomessi and it will contain the Display Picture.

Let's have a look at the output. It will look something like this:

This is how you can Download Display Picture of an Instagram Account using python script. That's it!
Simple, isn't it? Hope this tutorial has helped. I would strongly recommend you to Check out the YouTube video of the same and don't forget to subscribe my Channel.
You can play around with the Instaloader library and even explore more features. You can even make use of Python GUI using Tkinter.
You can find all the code at my GitHub Repository. Drop a star if you find it useful.
Thank you for reading, I would love to connect with you at Twitter | LinkedIn.
Do share your valuable suggestions, I appreciate your honest feedback!
You should definitely check out my other Blogs:
See you in my next Blog article, Take care!!