New doc section: codesnippets / Advanced Examples

Presents code examples that use the instaloader module for more advanced tasks
than what is possible with the Instaloader command line interface.

Presents #46, #56, #110, #113, #120, #121.
This commit is contained in:
Alexander Graf
2018-06-04 11:55:49 +02:00
parent 0e433294ad
commit ae492ed68b
9 changed files with 225 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
import instaloader
L = instaloader.Instaloader()
posts = L.get_hashtag_posts('milfgarden')
users = set()
for post in posts:
if not post.owner_profile in users:
L.download_post(post, '#milfgarden')
users.add(post.owner_profile)
else:
print("{} from {} skipped.".format(post, post.owner_profile))