Mehak Adlakha
Mar 15, 2024

--

Hey Wayne,

You can use the following snippets. Please note that you would have to inspect the followers page to get the class name of each div tag follower name and replace it below at place of 'content'.

// Select all divs with class "content"

const divs = document.getElementsByClassName('.content');

// Iterate through each div using a for loop

for (let i = 0; i < divs.length; i++) {

// Find all <a> tags within the current div

const links = divs[i].querySelectorAll('a');

// Iterate through each <a> tag using a for loop

for (let j = 0; j < links.length; j++) {

// Get the href attribute value

const href = links[j].getAttribute('href');

console.log(href);

}

}

--

--

Mehak Adlakha
Mehak Adlakha

Written by Mehak Adlakha

26 | Owner of 'The Live. Love. Laugh. Pub' | Software Engineer @ Microsoft, India | Life Enthusiast and Tech Explorer | I promote positivity and knowledge.

Responses (1)