So, hi
I do this because I have something with my facebook projects and just wanted to share a quick method I’ve been using to extract facebook group member names + profile urls directly from the browser using plain js. No extensions, no external tools, just the Chrome console
Thanks to chatgpt to my make life easier
I do this because I have something with my facebook projects and just wanted to share a quick method I’ve been using to extract facebook group member names + profile urls directly from the browser using plain js. No extensions, no external tools, just the Chrome console
JavaScript:
// ==== CONFIG ====
const TOTAL_SCROLL = 50; // CHANGE X SCROLL
const SCROLL_DELAY = 1200; // DELAY PER SCROLL
// ==== STORAGE ====
let results = new Set();
// ==== SCRAPE FUNCTION ====
function scrapeMembers() {
const anchors = document.querySelectorAll('a[href*="/user/"]');
anchors.forEach(a => {
const name = a.innerText.trim();
const url = a.getAttribute("href");
if (name && url) {
results.add(`${name} - ${url}`);
}
});
}
// ==== DOWNLOAD RESULT ====
function downloadTXT() {
const blob = new Blob([Array.from(results).join("\n")], { type: "text/plain" });
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "fb_members.txt";
a.click();
URL.revokeObjectURL(url);
console.log("✔ File downloaded: fb_members.txt");
}
// ==== AUTO SCROLL ====
let count = 0;
console.log("▶ Scrolling ...");
const interval = setInterval(() => {
scrapeMembers();
window.scrollBy(0, 2000);
count++;
console.log(`X : ${count}... total data: ${results.size}`);
if (count >= TOTAL_SCROLL) {
clearInterval(interval);
scrapeMembers();
downloadTXT();
console.log("✔ Done!");
}
}, SCROLL_DELAY);
Thanks to chatgpt to my make life easier