How to get a bunch of links (URLs) from a Facebook group
Ever need to fetch a horde of externally linked URLs from a bazillion posts and comments, all from one closed Facebook group? Here's how I did it in Chrome/Chromium. (Please note, that this guide might get out of date fairly quickly, as Facebook changes very often.)
Step 1: Get all links loaded inside your browser tab.
Problem: Facebook only shows the last 3 comments for a post in a Group and puts in a "View n more comment(s)." link so the user can load the rest. Also, Facebook only loads a couple of the most recent posts and uses infinite scrolling to load older posts dynamically.
Solution: You can (constantly) press the End button, to jump to the bottom of the page, so it'll continue loading more and more posts until you reach the beginning. You also can use the following JS snippet to "expand" the "view more" links:
Array.prototype.forEach.call(document.getElementsByClassName("UFIPagerLink"), function(el) { el.click(); });
Step 2: Save the loaded HTML to a file.
To do this, right click anywhere on the page, choose Inspect Elements, then on the Elements tab, right click on the html (or maybe body, or even the first div inside the body) element, and choose "Copy as HTML". Then paste it into a text editor of your choice. This could take a while. I used good old Notepad. Save the file.
Step 3: Get ALL the URLs!
You can use lots of tools for this. I used the freeware NirSoft AddrView to open the file, then export the URLs I needed to a plain TXT. That's about it!















