Created
July 23, 2022 19:37
-
-
Save aadityaubhat/1b6dba5d8519724a8b3a5307547e9573 to your computer and use it in GitHub Desktop.
JS blurb to get location keywords from Instagram explore locations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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