2.1.0 • Published 6 years ago

get-social-video-url v2.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

get-social-video-url

Last version Build Status Dependency status Dev Dependencies Status NPM Status Donate

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