How do I download a reel from Instagram with sound using a library called Instaloader in Python?
import instaloader
L = instaloader.Instaloader()
post = instaloader.Post.from_shortcode(L.context, "https://www.instagram.com/reel/CNr9_PnJXLw/")
video_url = post.video_url
filename = L.format_filename(post, target=post.owner_username)
L.download_pic(filename=filename, url=video_url, mtime=post.date_utc)
This is the code I was trying. But it fails with KeyError: 'date_utc'
File "/Users/vin/Desktop/testing/.venv/lib/python3.7/site-packages/instaloader/instaloader.py", line 697, in download_post filename_template = os.path.join(dirname, self.format_filename(post, target=target))