ytdl-client

0.0.7 • Public • Published

ytdl-client

This is a wrapper around ytdl-core to make compatible with browsers. It can be used within frontend frameworks.

How To Install

npm install ytdl-client

or

npm i ytdl-client

Usage

import ytdl_client from "ytdl-client";
    or
const ytdl_client = require("ytdl-client");

ytdl_client({
    proxyUrl: '', //any proxy can be used here eg:https://cors-anywhere.herokuapp.com/ or http://localhost:8080
    // proxyquireStubs: {}, arguments mapped directly to proxyquireify
    // For more info, see https://www.npmjs.com/package/proxyquireify
})
    .getInfo('https://www.youtube.com/watch?v=WPdbEbwNTcU')
    .then(info=>console.log(info))
    .catch(err=>{throw err;});

You should remember to make it awaitable, You can use cors-anywhere to set up a proxy.

Package Sidebar

Install

npm i ytdl-client

Weekly Downloads

1

Version

0.0.7

License

ISC

Unpacked Size

427 kB

Total Files

4

Last publish

Collaborators

  • uriah-dev