1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-08-16 11:49:39 +02:00
instaloader/docs/codesnippets/113_only_one_per_user.py
2020-04-17 18:49:38 +02:00

15 lines
376 B
Python

import instaloader
L = instaloader.Instaloader()
posts = instaloader.Hashtag.from_name(L.context, 'urbanphotography').get_posts()
users = set()
for post in posts:
if not post.owner_profile in users:
L.download_post(post, '#urbanphotography')
users.add(post.owner_profile)
else:
print("{} from {} skipped.".format(post, post.owner_profile))