How to download Instagram posts using python.

P Giri Kishore - Jul 6 '20 - - Dev Community

Hello Everyone!

In this post I will show you guys how to download posts from instagram using Command prompt of a machine with python installed


Install the instaloader library. We can do this using the Python Package installer pip.

$ pip install instaloader
Enter fullscreen mode Exit fullscreen mode

[1] To download all pictures and videos of a profile, as well as the profile picture of a public account, do

$ instaloader thepracticaldev
Enter fullscreen mode Exit fullscreen mode

You can also pass a list of profiles by entering the profiles inside [].


[2] To download all pictures and videos of a profile, as well as the profile picture of a private account, do

$ instaloader --login=<your-username> thepracticaldev
Enter fullscreen mode Exit fullscreen mode

You can also pass a list of profiles by entering the profiles inside []. You can only download the pictures and videos from the profiles you follow on instagram.


[3] To download a single post, do

$ instaloader -- -<post’s-shortcode>
$ instaloader -- -CByYyUMAhhY
Enter fullscreen mode Exit fullscreen mode

[4] To download current stories, feed, saved contents and hashtags, do

$ instaloader --login=<your-username> :stories
$ instaloader --login=<your-username> :feed
$ instaloader --login=<your-username> :saved
$ instaloader --login=<your-username> "#hashtag"
Enter fullscreen mode Exit fullscreen mode

Leave your queries in the comment section

Library Creator: https://github.com/instaloader/instaloader

. . . . .
Terabox Video Player