DEV Community

Cover image for Download Instagram profile picture using python
Saurabh Chavan
Saurabh Chavan

Posted on • Edited on

2

Download Instagram profile picture using python

Hello everyone☀️❤️
Welcome🤝🙏
In this tutorial, we will learn🧾

How to download Instagram profile picture using python🐍.

So,For that we need one module, the name of the module is Instaloader

So,first, download the module Instaloader.

How to download👇

Go to the command prompt.

Simple search cmd or command prompt in the search box and open command prompt

you can see in the below 👇picture and open command prompt.

Alt Text

ok you successfully opened command prompt🦸.

So now using the following command you can download the Instaloader module✨.

     $ Pip install Instaloader
Enter fullscreen mode Exit fullscreen mode

Simple type Pip install Instaloader in the command prompt and then Instaloader will be download🛒.

Alt Text

You successfully 🦸downloaded instaloader module.

So now go to your favourite 💻editor my favourite is VScode.you can download VScode from here https://code.visualstudio.com/download

Go to, The VScode and create a python file.The name of python file is insta_profile.py(you can write your own).
Then📝Write the code in the python file.

   import instaloader

   mod=instaloader.Instaloader()

   user=input("Enter instagram username:")

   mod.download_profile(user,profile_pic_only=True)
Enter fullscreen mode Exit fullscreen mode

So we completed the code now run the python file🏃.

Open terminal and type..

   $ Python insta_profile.py(Python filename.py)
   Enter Instagram username:100rabhch(your Instagram username)
Enter fullscreen mode Exit fullscreen mode

Alt Text

Your profile picture is ready💁.

🚶Go to the python file location .

🕺You can see the name of the folder 100rabhch(your Instagram username folder)open it.

Alt Text

You can see your profile picture successfully download🕺🕺.

Alt Text

🤵hope this tutorial is helpfull.
Thank you 😻⚡
Here is tutorial video👇
https://youtu.be/8_FGgxrNWt8

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Top comments (1)

Collapse
 
Sloan, the sloth mascot
Comment deleted

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more