Last active
January 8, 2022 13:51
-
-
Save ziyadm/996bdee68815ff5ee32bcc03ff585575 to your computer and use it in GitHub Desktop.
Facebook: fetch member pages 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 relevant pages | |
pages = 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 < pages.length; i++) { | |
buffer += pages[i].innerText.split(',')[0] + ", facebook.com" + pages[i].attributes.href.value + "\n"; | |
} | |
// print out | |
console.log(buffer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment