mirror of
https://github.com/instaloader/instaloader.git
synced 2024-09-11 16:22:24 +02:00
Change Example Hashtag in Codesnippets
This commit is contained in:
parent
3226c43a98
commit
cf293ce312
@ -2,13 +2,13 @@ import instaloader
|
|||||||
|
|
||||||
L = instaloader.Instaloader()
|
L = instaloader.Instaloader()
|
||||||
|
|
||||||
posts = L.get_hashtag_posts('milfgarden')
|
posts = L.get_hashtag_posts('urbanphotography')
|
||||||
|
|
||||||
users = set()
|
users = set()
|
||||||
|
|
||||||
for post in posts:
|
for post in posts:
|
||||||
if not post.owner_profile in users:
|
if not post.owner_profile in users:
|
||||||
L.download_post(post, '#milfgarden')
|
L.download_post(post, '#urbanphotography')
|
||||||
users.add(post.owner_profile)
|
users.add(post.owner_profile)
|
||||||
else:
|
else:
|
||||||
print("{} from {} skipped.".format(post, post.owner_profile))
|
print("{} from {} skipped.".format(post, post.owner_profile))
|
||||||
|
@ -5,7 +5,7 @@ import instaloader
|
|||||||
|
|
||||||
L = instaloader.Instaloader()
|
L = instaloader.Instaloader()
|
||||||
|
|
||||||
posts = L.get_hashtag_posts('milfgarden')
|
posts = L.get_hashtag_posts('urbanphotography')
|
||||||
# or
|
# or
|
||||||
# posts = instaloader.Profile.from_username(L.context, PROFILE).get_posts()
|
# posts = instaloader.Profile.from_username(L.context, PROFILE).get_posts()
|
||||||
|
|
||||||
@ -14,4 +14,4 @@ UNTIL = datetime(2015, 3, 1)
|
|||||||
|
|
||||||
for post in takewhile(lambda p: p.date > UNTIL, dropwhile(lambda p: p.date > SINCE, posts)):
|
for post in takewhile(lambda p: p.date > UNTIL, dropwhile(lambda p: p.date > SINCE, posts)):
|
||||||
print(post.date)
|
print(post.date)
|
||||||
L.download_post(post, '#milfgarden')
|
L.download_post(post, '#urbanphotography')
|
||||||
|
Loading…
Reference in New Issue
Block a user