【发布时间】:2021-01-09 19:43:40
【问题描述】:
我正在使用 Instaloader 开发 Instagram 抓取机器人。这是我的代码的一部分,它通过每个配置文件从安装中获取图像 url:
def scrapImageAddresses(PROFILE):
print(PROFILE)
L = Instaloader()
L.login('####', "####")
profile = Profile.from_username(L.context, PROFILE)
imageList = []
for post in profile.get_posts():
imageList.append({
'url': post.url,
'media_id': post.mediaid
})
return imageList
但对于像this 这样的幻灯片,它只获取帖子的第一个图片。我想要帖子中的所有图片。 我该怎么做?
【问题讨论】:
标签: python instagram instaloader