From b378f107090f6093b970bf1bd35a21885a0ef8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Oroszi?= Date: Tue, 9 May 2017 09:44:07 +0200 Subject: [PATCH] add support for videos in carousel --- lib/posts.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/posts.coffee b/lib/posts.coffee index 10bf27b..d293008 100644 --- a/lib/posts.coffee +++ b/lib/posts.coffee @@ -71,7 +71,7 @@ class InstagramPosts extends Readable when 'video' post.media = rawPost.videos['standard_resolution'].url when 'carousel' - post.media = rawPost.carousel_media.map((media) -> media.images['standard_resolution'].url) + post.media = rawPost.carousel_media.map((media) -> media[if media.images then 'images' else 'videos']['standard_resolution'].url) else throw new Error("Instagram did not return a URL for the media on post #{post.id}")