I'd like to download Files hosted on Facebook group which I'm part of.
I couldn't find any relevant API, and the following question at Quora points to extensions which are outdated.
The first challenge is to click on See more to see all the files, then click them one by one. Sometimes after See more, the AJAX loading is stuck, so the whole page needs to be refresh and started again.
How this can be achieved?
Best Answer
The following steps can be used:
Using DevTools JS Console in web-browser, run the following code (ignore the red Stop sign):
The script is going to click See more button every 20 seconds, even when it's stuck.
When page is fully loaded, extract all links into
urls
variable.Source: How to get all the URLs in a web site using JavaScript?
Optionally you can print the links using
console.log(urls)
orconsole.table(urls)
.copy(urls.join("\n"))
and paste into the text file.Convert into
wget
by making the following adjustments to the command (as per this post):curl
towget
(1st string from the left).--compress
parameter.-H
to--header
in all places.-nc
or-c
to not re-download the existing files.--content-disposition
parameter.-i list.txt
.Note: If you're Vim user, run
set -o vi
, type command, and hit Esc+V, to edit shell command in Vim.Run above converted command, to start downloading the files. It should looks like: