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)