Hello Everyone!
After reading this article, you will be able to download profile pictures of anyone from Instagram.
Let's get started!
What is Instagram?
Instagram is an photo and video sharing social networking platform owned by Facebook.
Module Used:
instaloader Module
instaloader
-> Instaloader is a tool to download pictures (or videos) along with their captions and other metadata from Instagram. To know more, visit Instloader Docs.
Let's Start Coding
Firstly, install the module in your Python Environment by writing the below code in your Terminal/Command Prompt.
pip install instaloader
Whole Code Snippet:
import instaloader
test = instaloader.Instaloader()
acc = input('Enter the Insta Account Username: ')
test.download_profile(acc, profile_pic_only=True)
Step By Step Guide:
->Import the package in your python script. Use the command below:
import instaloader
->Now, creating the instance test
test = instaloader.Instaloader()
-> Now, take user input to get the username of the account you wish to download the profile picture or any feed or videos.
Here, I am storing it in acc
acc = input('Enter the Insta Account Username: ')
-> Let's download the data. We will make use of download_profile
method and pass the parameters:
test.download_profile(acc, profile_pic_only = True)
Example -> Here I have downloaded the profile picture of Kannika Mann, an actor.
That's it.
See you in my next blog. Take Care!
๐