1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-09-17 11:02:23 +02:00
instaloader/docs/codesnippets/113_only_one_per_user.py
2019-10-13 19:47:44 +02:00

15 lines
343 B
Python

import instaloader
L = instaloader.Instaloader()
posts = L.get_hashtag_posts('urbanphotography')
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))