Closed ljclark closed 2 years ago
I'd also like to know if there's a way to skip videos. They seem to have poor thumbnails when embedding images into a site.
Hi @ljclark and @jsunsawyer ! We can only scratch the latest 12 posts from the profile page. We do not get more posts in any way. If 10 of 12 posts are videos and we (or you) skip or filter them, you only have 2 posts left. Will this be ok for you?
@kringkaste Oh that's a bummer. I suppose this option would still be a bit helpful, as it'd skip downloading anything we don't want to use. (Already skipping anything that isVideo
in our query.)
Yeah this would still be helpful I think, even if it limits the amount of posts we'll actually output.
Is there a reason for the 12 post limit @kringkaste - guessing thats an Instagram rate limit or something?
@ljclark Because IG does not have a usable API, we need to scrape the website to get the posts. And without executing JS and running a full-fledged headless browser to simulate scrolling, you only get 12 images in the first html response.
This is more of a question - I'm trying to query for all non-video format posts, something like the following:
Is there a way to do this in twig?
I know I could put a condition in within the loop to check this status, but that's messing with the limit filter as I need to show 6 non video posts, rather than grabbing 6 posts first, and then filtering out the video posts.