Created
July 17, 2020 04:46
-
-
Save BexTuychiev/5b8c375a814b0dc744dc7e67fa552c9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load a new profile | |
profile = instaloader.Profile.from_username(bot.context, 'towardsdatascience') | |
# Get all posts in a generator object | |
posts = profile.get_posts() | |
# Iterate and download | |
for index, post in enumerate(posts, 1): | |
bot.download_post(post, target=f"{profile.username}_{index}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment