Reputation: 21
I'm trying to use a little script that gets instagram posts on specific period
That's the code:
from datetime import datetime
from itertools import dropwhile, takewhile
import instaloader
# Get instance
L = instaloader.Instaloader()
posts = instaloader.Profile.from_username(L.context, PROFILE).get_posts()
SINCE = datetime(2019, 4, 1)
UNTIL = datetime(2015, 4, 23)
for post in takewhile(lambda p: p.date > UNTIL, dropwhile(lambda p: p.date > SINCE, posts)):
print(post.date)
L.download_post(post)
When the script runs just prints this: module 'instaloader' has no attribute 'Instaloader'
Yes, I have installed the module.
Upvotes: 2
Views: 2963
Reputation: 80
If your project name is instaloader.py try to rename it in different, because it's the same as lib's name.
Upvotes: 3