README
get-social-video-url
Get video URL from a social link (Facebook/Twitter/Vimeo/etc).
Install
NOTE: It needs to pass a browserless instance.
$ npm install get-social-video-url --save
Usage
const getSocialVideoUrl = require('get-social-video-url')
const browserless = require('browserless')()
;(async () => {
const videoQualities = await getSocialVideoUrl({
url: 'https://twitter.com/verge/status/957383241714970624',
browserless
})()
console.log(videoQualities)
// [
// 'https://video.twimg.com/amplify_video/943561675927519232/vid/720x720/h1uN7biCI-Fbzm9D.mp4',
// 'https://video.twimg.com/amplify_video/943561675927519232/vid/480x480/qURzB_XtWBE-dvRa.mp4',
// 'https://video.twimg.com/amplify_video/943561675927519232/vid/240x240/mijiQdCq-p9FaO8H.mp4'
// ]
})()
Qualities are sorted from high to low.
See example for more.
License
get-social-video-url © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats