notslang / instagram-screen-scrape

scrape public instagram data w/out API access
https://npmjs.com/package/instagram-screen-scrape
GNU General Public License v3.0
162 stars 38 forks source link

rather than a stream, how can you get, say, 20 of the most recent posts? #18

Open faceyspacey opened 7 years ago

faceyspacey commented 7 years ago

I imagine something like?

new InstagramPosts({
  username: 'steveaoki',
  limit: 20,
}).then((posts) => {
     posts.length === 20;
});

and it seems profiles load 12 posts now. So perhaps by specifying a page parameter instead to control how many request (I'm assuming) must be made.

notslang commented 7 years ago

nope - there's no limit or page parameter, but there is a .destroy method that you can use to stop it.

topikuning commented 7 years ago

hello, how to utilise the destroy method?

majstors commented 7 years ago

Nice example of destroy, here on gist: https://gist.github.com/Maarius/3a7179480f227daf51135b77635017ee