Simple Instagram scraper for recent activities.
The previous library I was using stopped working after Instagram removed their public facing APIs. Public posts should be readily accessible by people anyway because well, they are public.
- Gets up to 12 recent posts (video, post, carousel photos)
- Retrieves latest stories by users
This library requires Node 8.10.0 and above as it utilizes on async/await
, and as per ESLint's requirements.
yarn install
const balanar = await NightStalker.loadBrowser();
balanar.setUserName('username-to-scrape');
const posts = await balanar.getPosts(noOfPosts);
// Login is required for stories. Don't commit your credentials to version control!
// The account also should not have 2FA enabled.
await balanar.login(username, password);
const stories = await balanar.getStories();
Take note that story URLs are time-sensitive and will expire within x minutes.
- Livestream URLs