import instaloader def download_saved_videos(username, password, download_path): # Create an Instaloader instance L = instaloader.Instaloader() # Login (optional) L.login(username, password) # Login if you need to access private saved videos # Obtain profile metadata profile = instaloader.Profile.from_username(L.context, username) # Iterate over saved posts for post in profile.get_saved_posts(): # Check if the post is a video if post.typename == "GraphVideo": try: # Download the video L.download_post(post, target=download_path) print(f"Downloaded video: {post.shortcode}") except Exception as e: print(f"Error downloading video {post.shortcode}: {e}") # Replace 'your_username', 'your_password' and 'download_path' with your Instagram username, password, and download path respectively # download_saved_videos('your_username', 'your_password', 'download_path') download_saved_videos('luctrudel69', 'k#gn6td6!DBtR7h3EX', r'V:\INTERNET\dq')