Last active
July 17, 2020 09:03
-
-
Save BexTuychiev/2e204f2845ec83c5e9483df815d0eaa9 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 the hashtag | |
hashtag = instaloader.Hashtag.from_name(bot.context, 'python') | |
# Load posts with `python` tag into a generator object | |
python_posts = hashtag.get_posts() | |
# Iterate over posts to download them | |
for index, post in enumarate(python_posts, 1): | |
bot.download_post(post, target=f'{hashtag.name}_{index}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment