Skip to content

Instantly share code, notes, and snippets.

@pmcalabrese
Last active September 22, 2018 18:32
Show Gist options
  • Save pmcalabrese/cea2c3137f98991950d6b0e334919966 to your computer and use it in GitHub Desktop.
Save pmcalabrese/cea2c3137f98991950d6b0e334919966 to your computer and use it in GitHub Desktop.
Script that can run in the browser for extract user information (developed for Alessandro)
let usernames = ["alexeidos", "dilettaleotta"]
const pa = usernames.map((username) => {
return fetch("https://www.instagram.com/"+username+"/?__a=1")
.then((data) => { return data.json() })
.then((data) => { return `${data.graphql.user.full_name}, ${data.graphql.user.business_email}` })
})
Promise.all(pa).then((data) => {
console.log(data.join("\n"))
});
let usernames = prompt("usernames (comma spaced)").split(",").map( username => username.trim() );
const pa = usernames.map((username) => {
return fetch("https://www.instagram.com/"+username+"/?__a=1")
.then((data) => { return data.json() })
.then((data) => { return `${data.graphql.user.full_name}, ${data.graphql.user.business_email}` })
})
Promise.all(pa).then((data) => {
console.log(data.join("\n"))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment