Skip to content

Instantly share code, notes, and snippets.

@aadityaubhat
Created July 23, 2022 19:37
Show Gist options
  • Save aadityaubhat/1b6dba5d8519724a8b3a5307547e9573 to your computer and use it in GitHub Desktop.
Save aadityaubhat/1b6dba5d8519724a8b3a5307547e9573 to your computer and use it in GitHub Desktop.
JS blurb to get location keywords from Instagram explore locations
// Open https://www.instagram.com/explore/locations/c2728325/midtowneast-united-states/
// Scroll down and click 'See More' until all the locations are loaded
// Open the developer tools of your browser and run the following code in the console
var elemList = document.getElementsByClassName('aMwHK');
var result = [];
for (let elem of elemList){
result.push(elem.href.split('/').at(-2));
}
console.log(JSON.stringify(result));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment