How Python Library helps in downloading Instagram photos | Instagram photos kaise download kare

Akansha Yadav shows how to use the Python library Instaloader to download all photos from any Instagram profile. The script creates a function that takes a username, loads the profile, and iterates through posts to download each image. She demonstrates the full process and shows how to modify the code to download a specific photo by URL.
Chapters
Hello everyone, welcome back to my YouTube channel. In today's video, I will show you how you can download the Instagram photo if of any of the profiles. So I have created a notebook. Now I am going to install a library which is install_loader library. Once you have installed it, you have to move on to import it. So we'll show you each and every program, so stay connected. And now this is another cell. Now what I have done is I have imported install_loader library. After doing that, I am going to create a function in which I am asking it to use the username. Now I'm creating an instance of the Insta, InstaLoader. Now I'm going to use a try and catch, and then I'm going to load the profile of that particular user that you are going to enter. So using the InstaLoader.profile from the username that you are going to enter, then I am going to iterate it through the user's post. It means the number of posts that person has posted it will iterate it and then keep on downloading it. So using loader.download_post, I am going to target it to the— that particular profile and will take that URL and will download it. So it will show you a message saying that downloaded and this is the URL. And in case it's not able to do that, it will— I'm writing an except, it means it will catch out that. So let's run it one by one. So first is to import, install the basically the library of Instaloader. So it will take just few seconds. I have already installed it, so that is why it's showing me requirement already satisfied. For you, it might take few minutes of yours to just run it. Now I am going to run the main program. Now you have to enter the Instagram username. So I am using my own username to just download it. So once I have entered the username, it will take that particular username and will try to download each and every photo that I have posted. So there are n number of photos that I have posted on my Instagram. So it's just taking those things and showing me downloaded along with the URL, that this was the URL that I have used and I have downloaded this particular picture of from this username. So it will keep on doing it because it's going to iterate it through the entire post that the person has posted. So if you wanted to download a particular one, what you can do is you can modify the code and just can set it to the URL and can use the Instaloader library as well. So I have already downloaded it, so I will check it in the folder in which they are getting stored. So I do have a folder So we'll show you. If you can see over here, this is showing the entire URL and multiple photos has been downloaded. So we'll quickly open a folder and we'll show you. So let it get completely download everything from the profile, then we'll open the folder. So it's— I think it's taking long time. So let— we'll show you. It's a folder in which I have the pictures. So if you can see, it has successfully downloaded. If you like the video, don't forget to subscribe the channel and follow for










