Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guusvanmeerveld/ytadl
A simple way to automatically download new songs from music channels.
https://github.com/guusvanmeerveld/ytadl
rss ytdl
Last synced: about 1 month ago
JSON representation
A simple way to automatically download new songs from music channels.
- Host: GitHub
- URL: https://github.com/guusvanmeerveld/ytadl
- Owner: Guusvanmeerveld
- License: mit
- Created: 2022-01-29T22:37:03.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-19T01:00:17.000Z (almost 3 years ago)
- Last Synced: 2024-05-01T15:33:49.485Z (8 months ago)
- Topics: rss, ytdl
- Language: TypeScript
- Homepage: https://guusvanmeerveld.github.io/ytadl
- Size: 328 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTube Auto DownLoader
![Tests](https://github.com/Guusvanmeerveld/ytadl/actions/workflows/test.yml/badge.svg)
![Publish](https://github.com/Guusvanmeerveld/ytadl/actions/workflows/deploy.yml/badge.svg)> ytadl is a simple package to listen for new uploads on Youtube and stream them automatically.
## Index
- [YouTube Auto DownLoader](#youtube-auto-downloader)
- [Index](#index)
- [Overview](#overview)## Overview
To get started, install the package:```bash
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:
```ts
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);
});
```