I see some websites that can fetch an instagram profile and get all their posts, reels and videos by simply typing the username and I don't understand how they do it because it's so fast.
I've tried scraping instagram's profile by doing this:
const fs = require("fs")const url = "https://instagram.com/instagram"async function Scrape() { const headers = new Headers() const res = await fetch(url) const data = await res.text() fs.writeFile("result.html", data, err => { if(err) { console.log(err) } else { console.log("file written successfully") } })}Scrape()
const fs = require("fs")const url = "https://instagram.com/instagram"async function Scrape() { const headers = new Headers() const res = await fetch(url) const data = await res.text() fs.writeFile("result.html", data, err => { if(err) { console.log(err) } else { console.log("file written successfully") } })}Scrape()