Last active
July 28, 2018 06:31
-
-
Save MoatazAbdAlmageed/47a2649ff2228a8a15b01a164f88de86 to your computer and use it in GitHub Desktop.
Download facebook videos
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
In brwoser console past this code | |
``` | |
Array.prototype.unique = function() { | |
var a = []; | |
for (i = 0; i < this.length; i++) { | |
var current = this[i]; | |
if (a.indexOf(current) < 0) a.push(current); | |
} | |
return a; | |
} | |
var urls = [] | |
var parent = document.getElementById('pages_video_hub_all_videos_pagelet') | |
var child = parent.getElementsByTagName('a'); | |
for (var i = 0; i < child.length; i++) { | |
urls.push("" + child[i].href +"") | |
} | |
newL = urls.toString().split(',') | |
Array.prototype.unique = function() { | |
return Array.from(new Set(this)); | |
} | |
copy(urls.unique()) | |
``` | |
past your vids like this | |
for Item in "https://www.facebook.com/SheikhMinshawi/videos/2085159401757083/" "https://www.facebook.com/SheikhMinshawi/videos/2084049251868098/" "https://www.facebook.com/SheikhMinshawi/videos/1392149377724759/" ; | |
do | |
youtube-dl --extract-audio --audio-format mp3 $Item | |
done | |
Author
MoatazAbdAlmageed
commented
Jul 28, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment