GithubHelp home page GithubHelp logo

twdown's Introduction

twdown

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

It converts twdown.net website into data

[
  {
    ext: 'mp4',
    height: 480,
    protocol: 'https',
    size: '480x480',
    url: 'https://video.twimg.com/amplify_video/943561675927519232/vid/480x480/qURzB_XtWBE-dvRa.mp4',
    width: 480
  }, {
    ext: 'mp4',
    height: 720,
    protocol: 'https',
    size: '720x720',
    url: 'https://video.twimg.com/amplify_video/943561675927519232/vid/720x720/h1uN7biCI-Fbzm9D.mp4',
    width: 720
  }, {
    ext: 'mp4',
    height: 240,
    protocol: 'https',
    size: '240x240',
    url: 'https://video.twimg.com/amplify_video/943561675927519232/vid/240x240/mijiQdCq-p9FaO8H.mp4',
    width: 240
  }, {
    ext: 'mp3',
    protocol: 'https',
    url: 'https://twdown.net/mp3.php?v=NHBtLkQ5bXpiRi1JQ2liN051MWgvMDI3eDAyNy9kaXYvMjMyOTE1NzI5NTc2MTY1MzQ5L29lZGl2X3lmaWxwbWEvbW9jLmdtaXd0Lm9lZGl2Ly86c3B0dGg=&t=token%260c05c632a2822a0a877c7e991602543'
  }
]

Install

NOTE: It needs to pass a browserless instance.

$ npm install twdown --save

Usage

const twdown = require('twdown')
const browserless = require('browserless')()

;(async () => {
  const videos = await twdown({
    url: 'https://twitter.com/verge/status/957383241714970624',
    browserless
  })()

  console.log(videos)
  // [
  //   {
  //     ext: 'mp4',
  //     height: 480,
  //     protocol: 'https',
  //     size: '480x480',
  //     url: 'https://video.twimg.com/amplify_video/943561675927519232/vid/480x480/qURzB_XtWBE-dvRa.mp4',
  //     width: 480,
  //   },
  //   …
  // ]
})()

License

twdown © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

twdown's People

Contributors

kikobeats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

twdown's Issues

(node:8300) UnhandledPromiseRejectionWarning: TypeError: twdown(...) is not a function

Hey I got this error message, how can I fix it ?

(node:8300) UnhandledPromiseRejectionWarning: TypeError: twdown(...) is not a function at /Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:42:15 at app.get (/Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:59:11) at Layer.handle [as handle_request] (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/layer.js:95:5) at next (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/layer.js:95:5) at /Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:335:12) at next (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:275:10) at app.use (/Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:21:5) (node:8300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:8300) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:8300) UnhandledPromiseRejectionWarning: TypeError: twdown(...) is not a function at /Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:42:15 at app.get (/Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:59:11) at Layer.handle [as handle_request] (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/layer.js:95:5) at next (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/layer.js:95:5) at /Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:335:12) at next (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:275:10) at app.use (/Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:21:5) (node:8300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:8300) UnhandledPromiseRejectionWarning: TypeError: twdown(...) is not a function at /Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:42:15 at app.get (/Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:59:11) at Layer.handle [as handle_request] (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/layer.js:95:5) at next (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/layer.js:95:5) at /Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:335:12) at next (/Users/boypanjaitan/Desktop/serverless/mdl/node_modules/express/lib/router/index.js:275:10) at app.use (/Users/boypanjaitan/Desktop/serverless/mdl/app.local.js:21:5) (node:8300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.