You can iterate over all sidecar nodes (slides) in every post and add the corresponding url to the list:
def scrapImageAddresses(PROFILE):
print(PROFILE)
L = Instaloader()
L.login('####', "####")
profile = Profile.from_username(L.context, PROFILE)
imageList = []
for post in profile.get_posts():
for slide in post.get_sidecar_nodes():
imageList.append({
'url': slide.video_url if slide.is_video else slide.display_url,
'media_id': post.mediaid
})
return imageList
Documentation: Instagram Structures — Instaloader documentation
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…