so I am trying to make a program using Instaloader in python that downloads all posts from any posts marked as saved. The instaloader module is kind of confusing and I see lots of people confused about it so I am having a hard time coding it. Now i know I could use the os module and just use the terminal commands that is embedded into the module. (I replaced the actual accounts username to "USERNAME") Here is the code:
import instaloader from instaloader import Profile insta = instaloader.Instaloader() profile = Profile.from_username(insta.context, "USERNAME") insta.interactive_login("USERNAME") for post in profile.get_saved_posts(): insta.download_post(post, target=profile.from_username(post, "USERNAME"))
again I am open to using the terminal commands but I am trying to keep it in the terminal for the time being. Thanks
import instaloader from instaloader import Profile insta = instaloader.Instaloader() profile = Profile.from_username(insta.context, "USERNAME") insta.interactive_login("USERNAME") for post in profile.get_saved_posts(): insta.download_post(post, target=profile.from_username(post, "USERNAME"))
again I am open to using the terminal commands but I am trying to keep it in the terminal for the time being. Thanks