fbdashdl
v1.0.0
Published
Retrieve DASH segments and information of publicly shared Facebook videos via page scraping.
Downloads
4
Readme
fbdashdl
Retrieve DASH segments and information of publicly shared Facebook videos via page scraping.
Usage
const fbdashdl = require('fbdashdl')
fbdashdl('https://www.facebook.com/facebook/videos/1877006505687069', (error, result) => {
// print error then throw
if (error) throw console.error(error) || error
// print result
console.log(result)
})
Sample output
{
"adaptive": {
"video": [{
"url": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.1790-2/10000000_293849658009057_6521200281768689664_n.webm?_nc_cat=104&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfdnA5X2hhbG9fMjYwMGtfZnJhZ18yX3ZpZGVvIn0%3D&_nc_ht=video.fmnl17-1.fna&oh=afea8e4e3cc9381620cb01a5d5537c9a&oe=5C16189C",
"codecs": "vp9",
"mimeType": "video/webm",
"bandwidth": 2506101,
"initRange": "0-295",
"width": 1920,
"height": 1920,
"quality": "2160p"
}, {
"url": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.1790-2/10000000_330309520849122_3056801655619059712_n.webm?_nc_cat=111&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfdnA5X2hhbG9fMTUwMGtfZnJhZ18yX3ZpZGVvIn0%3D&_nc_ht=video.fmnl17-1.fna&oh=85ddb247da856c11fafd0c563c205338&oe=5C161BCE",
"codecs": "vp9",
"mimeType": "video/webm",
"bandwidth": 1446051,
"initRange": "0-295",
"width": 1280,
"height": 1280,
"quality": "1080p"
}, {
"url": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.1790-2/43499019_321080331816647_7683977233081303040_n.webm?_nc_cat=106&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfdnA5X2hhbG9fNzUwa19mcmFnXzJfdmlkZW8ifQ%3D%3D&_nc_ht=video.fmnl17-1.fna&oh=f8bda7a0a82cad34281cefc6c22a013a&oe=5C1609CB",
"codecs": "vp9",
"mimeType": "video/webm",
"bandwidth": 724239,
"initRange": "0-295",
"width": 854,
"height": 854,
"quality": "840p"
}, {
"url": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.1790-2/43516514_369401316934223_7202605858415443968_n.webm?_nc_cat=105&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfdnA5X2hhbG9fNDAwa19mcmFnXzJfdmlkZW8ifQ%3D%3D&_nc_ht=video.fmnl17-1.fna&oh=1245d657389ccb5f70ad823bee900bd0&oe=5C1618A0",
"codecs": "vp9",
"mimeType": "video/webm",
"bandwidth": 395498,
"initRange": "0-295",
"width": 640,
"height": 640,
"quality": "640p"
}, {
"url": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.1790-2/43474769_1860178694089658_2914320148548550656_n.webm?_nc_cat=102&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfdnA5X2hhbG9fMjIwa19mcmFnXzJfdmlkZW8ifQ%3D%3D&_nc_ht=video.fmnl17-1.fna&oh=1010c397526ab4b7ad8b97a9f56fbfa2&oe=5C16192C",
"codecs": "vp9",
"mimeType": "video/webm",
"bandwidth": 218297,
"initRange": "0-295",
"width": 426,
"height": 426,
"quality": "360p"
}
],
"audio": [{
"url": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.1790-2/43299547_289390255120627_4093620826891354112_n.mp4?_nc_cat=1&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfdjRfaHExX2ZyYWdfMl9hdWRpbyJ9&_nc_ht=video.fmnl17-1.fna&oh=6ddca8465cc8aacdacb654edcf13a892&oe=5C161839",
"codecs": "mp4a.40.5",
"mimeType": "audio/mp4",
"bandwidth": 49290,
"initRange": "0-881",
"sampleRate": 48000
}
]
},
"progressive": {
"hd": "https://scontent.fmnl17-1.fna.fbcdn.net/v/t66.18014-6/10000000_302770410330183_5538201514336716399_n.mp4?_nc_cat=102&efg=eyJ2ZW5jb2RlX3RhZyI6Im9lcF9oZCJ9&_nc_ht=scontent.fmnl17-1.fna&oh=3621b3997e9890c5147be4a44ef23330&oe=5CA0D186",
"sd": "https://video.fmnl17-1.fna.fbcdn.net/v/t42.9040-2/43393462_522325751563675_8712538852985667584_n.mp4?_nc_cat=110&efg=eyJybHIiOjU2NywicmxhIjo1MTIsInZlbmNvZGVfdGFnIjoic3ZlX3NkIn0%3D&rl=567&vabr=315&_nc_ht=video.fmnl17-1.fna&oh=aa7ab79245ffa2794f5519accda08f4e&oe=5C1621F6"
},
"subtitle": {
"url": "https://scontent.fmnl17-1.fna.fbcdn.net/v/t39.2093-6/43331840_1877262792328107_7322772725460631552_n.srt?_nc_cat=103&_nc_ht=scontent.fmnl17-1.fna&oh=de30fe36ac044ff55cd56799e6fbac6c&oe=5CAFE370"
},
"id": "1877006505687069",
"url": "https://www.facebook.com/facebook/videos/1877006505687069/",
"title": "Portal From Facebook",
"author": {
"name": "Facebook",
"url": "https://www.facebook.com/facebook/"
},
"description": {
"text": "We’re excited to introduce Portal from Facebook, designed to make you feel closer to family and friends. Watch as loved ones, separated by distance, try it for the first time."
},
"timestamp": 1539119909
}
Test links
|URL|Page|Captions|4K|Source|Duration| |-|-|-|-|-|-| |https://www.facebook.com/video.php?v=1877006505687069|facebook|:heavy_check_mark:|:heavy_check_mark:||01:00| |https://www.facebook.com/video.php?v=230541997805664|NVIDIA|:heavy_check_mark:|||02:07| |https://www.facebook.com/video.php?v=2472353256323313|What.If.science|:heavy_check_mark:|||03:57| |https://www.facebook.com/video.php?v=533426780362641|NVIDIA||:heavy_check_mark:||00:11| |https://www.facebook.com/video.php?v=10155863698358253|NVIDIA||:heavy_check_mark:||00:19| |https://www.facebook.com/video.php?v=428656454198037|TheMasterGamingRace||:heavy_check_mark:||02:23| |https://www.facebook.com/video.php?v=285127879000356|NVIDIA|||:heavy_check_mark:|00:06| |https://www.facebook.com/video.php?v=362986974468218|NVIDIA|||:heavy_check_mark:|00:11|