0.2.1 • Published 2 years ago

ytadl v0.2.1

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

YouTube Auto DownLoader

Tests Publish

ytadl is a simple package to listen for new uploads on Youtube and stream them automatically.

Index

Overview

To get started, install the package:

npm install ytadl

The essence of the package is really simple. You import the class, instantiate a new one and listen for events just like with an EventEmitter. A simple example looks like the following:

import fs from "fs";

import Listener from "ytadl";

const listener = new Listener([{ name: 'Example Youtube channel'} ]);

listener.on('newItem', async (item) => {
	const writeStream = fs.createWriteStream(item.title);

	const stream = await item.stream();

	stream.pipe(writeStream);
});