I want to download a video uploaded by a friend on Facebook for offline access. How can I do that? I tried almost all Chrome extensions on Chrome store and none seems to work. Also, youtube-dl didn’t work as expected. Any reliable way to download it?
--add-header option, youtube-dl will be able to access the video and download it.
Here’s one way to do it in Chrome:
- In your web browser, login to Facebook as normal
- Open Chrome Developer Tools
- Reload the page
- In Developer Tools, switch to the Network tab and scroll up to the first request
- Right click the first request and select Copy as cURL
- Paste the cURL command line into a text editor and look for the cookie header information. You’re looking for the part directly that looks like
-H 'cookie: <...>'. Copy everything within the quotes.
From a terminal, run
youtube-dl, adding the cookie information using
youtube-dl "<url-of-facebook-video>" --add-header '<cookie-header-from-curl>'
youtube-dl will now be able to access the page and retrieve the video.