Update: For Instagram stories of video slideshows, use yt-dlp (requires v2022.1.21):
pip install 'yt-dlp>=2022.1.21'
Just make sure you're logged in via one of the authentication methods:
--cookies-from-browser YOUR_BROWSER
--cookies /path/to/cookies.txt
-u YOUR_USERNAME
(interactive)
-n
(config file)
yt-dlp --cookies-from-browser firefox https://www.instagram.com/stories/highlights/17863022906349328/
# [cookies] Extracting cookies from firefox
# [cookies] Extracted 2051 cookies from firefox
# [instagram:story] 17863022906349328: Downloading JSON metadata
# [instagram:story] 17863022906349328: Downloading JSON metadata
# [instagram:story] 17863022906349328: Downloading user info
# [download] Downloading playlist: Mars AR
# [instagram:story] playlist Mars AR: Collected 7 videos; downloading 7 of them
# [download] Downloading video 1 of 7
# [info] 2515578473642074643_787132: Downloading 1 format(s): 2
# [download] Destination: Story by natgeo [2515578473642074643_787132].mp4
# [download] 100% of 793.91KiB in 00:00
# ⋮
# [download] Finished downloading playlist: Mars AR
For Instagram stories of image slideshows, use gallery-dl:
pip install gallery-dl
gallery-dl -u USERNAME -p PASSWORD https://www.instagram.com/stories/highlights/17857710373716419/
# [instagram][info] Logging in as USERNAME
# ./gallery-dl/instagram/weighthefish/2224872001634244851.jpg
# ./gallery-dl/instagram/weighthefish/2224872078683640644.jpg
# ...
# ./gallery-dl/instagram/weighthefish/2224872839329073284.jpg
Note that yt-dlp is a fork of youtube-dl (I am not affiliated with either):
yt-dlp is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project.
youtube-dl still doesn't support Instagram stories, though it's tagged as "todo" on their issue tracker.