@MarkelL/

node-ytdl-core

Nodejs

No description

fork
loading
Files
  • index.js
  • example
  • lib
  • test
  • typings
  • .gitignore
  • .travis.yml
  • LICENSE
  • package-lock.json
  • package.json
  • README.md
  • tsconfig.json
  • video.flv
index.js
1
2
3
4
5
6
7
8
9
const fs = require('fs');
const ytdl = require('ytdl-core');

// TypeScript: import ytdl from 'ytdl-core'; with --esModuleInterop
// TypeScript: import * as ytdl from 'ytdl-core'; with --allowSyntheticDefaultImports
// TypeScript: import ytdl = require('ytdl-core'); with neither of the above

ytdl("https://www.youtube.com/watch?v=AUyOZAfnehM")
  .pipe(fs.createWriteStream('video.flv'));
node v10.16.0