Skip to content

Guusvanmeerveld/ytadl

Repository files navigation

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);
});

About

A simple way to automatically download new songs from music channels.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published