![]() ![]() You might be afraid that one of the Instagram posts you’ve saved is going to get deleted or you just want to export your saved posts collections somewhere safe. If all is right, you should end up with a folder similar to this one: How to Download Saved Instagram Collections with Python This will create a pretty folder with all of the available stories of the user mentioned in the parameter “username” within the first line of code. Once this is done, we can proceed with this code: If a user does not add a story to their highlights, you might have to act quickly and snatch up this story that you found yourself interested in using this script.įor this part to work, we also need to log in at the beginning of our script like in the above section, following this code: If you wish to save someone’s stories, this section is for you. In the end, when downloading my girlfriend’s account’s highlights, this is what I ended up with: How to Download Instagram Stories with Python Each folder represents one category of highlight. Once this code is being run, you will see numerous folders being created where your script is located. This is where you will want to input of which profile you want to download the highlights from. The only parameter you have to change is within the first line in the “from_username()” function. Now we can proceed with our highlights download by inputting this code into our script: In order to do that, this is the code we are going to use: Because of the nature of the platform, we are going to need to log in through one of our Instagram accounts. How to Download Instagram Profile Highlights with PythonĪ neat feature of the library we are using here is its ability to circle through all of the highlights of someone’s profile and extracting the video file behind it. Once your command is done, you should end up with a folder named after your hashtag and all of the posts in it, filterable by date of publication: If you do not specify a maximum amount of posts you want to download, it will automatically try to download every single post found under the specified hashtag. ![]() The former is obviously required while the latter is optional. In order to do so, simply run the code specified below:Īs you can see, the only two parameters that are required are “hashtag” and “max_count”. Well, this library can help you with that. Let’s say you are running a user-generated campaign and wish to download all of the posts that have been using the hashtag you asked your followers to use in their posts. How to Download Instagram Hashtag Posts with Python ![]() If the folder does not exist, the library will automatically create it but it won’t overwrite its content if the folder actually already exists. The argument “ target” in the function “ download_post()” is for you to define how the folder that the library will create to download the post in will be named. ![]() To find a post’s ID, we just have to look at the URL of said post. In order to download a single post, or carousel or video, we need to get its ID first. Now that we are done with this first step, we can slowly get acclimated to the easiest things to do with this library. If you are interested in this documentation and/or want to skip this tutorial and navigate yourself the code, you can do so by following this link: How to Download a Single Instagram post, caption and comments with Python In order to install Instaloader, just “pip install instaloader” and you will be on your way.įrom now on, all of your Python files for this tutorial should start with these lines: Originally a command-line program written in Python, this program obviously also has a Python module that we can load and use in our environments. The first thing we want to do in order to move forward with this guide is install the Instaloader library. You can also scroll through the article using the Table of Contents in order to reach the part of the tutorial that you are looking for. I also use some of these tools in order to retrieve user-generated content after a contest or if I want to use the content generated in other platforms.Īs usual, you will only need a basic knowledge of Python to perform these tasks and one library. Whether it is because you want to keep your followers but start on a completely clean slate or because you want to make sure all of the posts and stories you published on the platform will always be accessible to you, I wanted to share the tools I use in order to archive Instagram accounts, including posts, highlights and even stories. As much as the Archive feature of the Instagram app is useful, us Data Hoarders are often looking for a safer and more reliable way to archive our data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |