DEV Community

Cover image for Practical Puppeteer: Get Instagram account profile detail

Practical Puppeteer: Get Instagram account profile detail

Sony AK on December 13, 2019

Today scraping with Puppeteer will be related to Instagram. The scenario is we go to an Instagram profile and we will get some data from there, suc...
Collapse
 
tawsbob profile image
Dellean Santos • Edited

all data that you need you can get in _sharedData Object

exemple

Collapse
 
sonyarianto profile image
Sony AK

wow that's something new for me, thank you and I will and on the article later. Thank you.

Collapse
 
sosdanix profile image
Sosdani

hello my friend, is possible get all posts of user?

Collapse
 
apanjwani0 profile image
Aman Panjwani

@sosdanix , I made a self-project which does the similar work.
Check it out - github.com/apanjwani0/Scrape-Insta...

Collapse
 
sosdanix profile image
Sosdani

Great Code my friend, I tried to do the same something, but it is difficult to work with the instagram api

Thread Thread
 
apanjwani0 profile image
Aman Panjwani • Edited

Thanks :)
Yes, that's why I decided to fetch all posts by scrapping (only public profiles can be fetched this way)
I had an idea for private, but it will require the user to give their instagram credentials to my app, (which I think won't be appreciated) even after that user can only fetch posts of profile which are available to them.

Collapse
 
anahale23 profile image
anahale23

Consistently produce captivating, high-quality content that captivates and engages your audience. Prioritize visually stunning imagery, videos, and graphics, employing professional photography techniques, editing tools, and creativity to produce aesthetically pleasing content. Diversify your content mix, incorporating various formats, including photos, videos, stories, reels, IGTV, and carousel posts, to cater to diverse audience follow instagram preferences and consumption habits.

Collapse
 
apanjwani0 profile image
Aman Panjwani

I built a similar Instagram-Scrapper, worked very fine both with headless:true and false on localmachine (macos) but when deployed on platforms like heroku or glitch, instagram in not rendering the needed divs.
I tried several method, but none of them actually worked, even tried puppeteer-extra stealth plugin to bypass headless:true issues with some site.
Any clue how to solve this issue ?

Collapse
 
frans profile image
Frans Allen

This is pretty cool actually, also published same stuff on my profile, feel free to check it out!

Collapse
 
sonyarianto profile image
Sony AK

Thank you, I will check it out mas.

Collapse
 
rohitmartires profile image
Rohit Martires

Hey when I try hosting this on heroku it doesn't work, any idea y?

Collapse
 
ekko14 profile image
ekko14

Can you add how to post phots or video on instagram using puppeteer at specified time? I tried to do it but m stuck on when instagram asks to select photos or videos.