mirror of
https://github.com/instaloader/instaloader.git
synced 2024-11-04 09:22:29 +01:00
e21d34124d
Such as for downloading hashtag feeds, as discussed in #666 and contributed by @e2tovar. Also change comment color to grey in codesnippets in documentation.
16 lines
416 B
Python
16 lines
416 B
Python
from datetime import datetime
|
|
from itertools import dropwhile, takewhile
|
|
|
|
import instaloader
|
|
|
|
L = instaloader.Instaloader()
|
|
|
|
posts = instaloader.Profile.from_username(L.context, "instagram").get_posts()
|
|
|
|
SINCE = datetime(2015, 5, 1)
|
|
UNTIL = datetime(2015, 3, 1)
|
|
|
|
for post in takewhile(lambda p: p.date > UNTIL, dropwhile(lambda p: p.date > SINCE, posts)):
|
|
print(post.date)
|
|
L.download_post(post, "instagram")
|