Created
January 8, 2022 14:02
-
-
Save ziyadm/106bb8ac2b667cfae0f177522b107c85 to your computer and use it in GitHub Desktop.
Facebook: fetch members for a group
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
// load all data for the page by scrolling down | |
scrollDown = setInterval(function() {window.scrollTo(0,document.body.scrollHeight);}, 1000); | |
// fetch members | |
members = document.getElementsByClassName("oajrlxb2 g5ia77u1 qu0x051f esr5mh6w e9989ue4 r7d6kgcz rq0escxv nhd2j8a9 nc684nl6 p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso i1ao9s8h esuyzwwr f1sip0of lzcic4wl gpro0wi8 oo9gr5id lrazzd5p") | |
// extract page name and url | |
let buffer = ''; | |
for(let i = 1; i < 10; i++) { | |
buffer += members[i].innerText.split(',')[0] + ", facebook.com" + members[i].attributes.href.value + "\n"; | |
} | |
console.log(buffer); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment