How can I using the installed library add a list of profiles? at this point I have to add one by one

Asked

Viewed 15 times

0

I know it is possible using profile_list['profile1, profile2,.. '] but when I try to do this in my code it does not work. What I do?

from instaloader import Instaloader, Profile
import instaloader
from instaloader.structures import Post 

list_of_profile = [''] 
for list_element in list_of_profile: 
L = Instaloader() 
profile = Profile.from_username(L.context, list_element)
posts_sorted_by_likes = sorted(profile.get_posts(), key=lambda post:post.likes, reverse=True) 

quant = 3
for elements in range(quant):
L.download_post(posts_sorted_by_likes[elements], list_element)
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.