Welcome folks today in this blog post we will be downloading the profile picture
of instagram user using username
in command line using instaloader
library in python. All the full source code of the application is shown below.
Get Started
In order to get started you need to install the below library using the pip
command as shown below
pip install instaloader
After this you need to make an app.py
file and copy paste the following code
app.py
1 2 3 4 |
import instaloader test = instaloader.Instaloader() acc = input('Enter the Account Username: ') test.download_profile(acc, profile_pic_only = True) |
As you can see we are importing the instaloader
library and then we are asking the user to input the instagram username
in the command line. For this we are using the input()
function and then we are using the download()
function to download the profile
pic of the user. Here inside the function we are passing 2
arguments. First is the instagram username and then we are providing the boolean parameter of profile_pic_only