https://github.com/rubiojr/beehive-youtube-dl
Sample Beehive (https://github.com/muesli/beehive) and Redis integration
https://github.com/rubiojr/beehive-youtube-dl
Last synced: 3 months ago
JSON representation
Sample Beehive (https://github.com/muesli/beehive) and Redis integration
- Host: GitHub
- URL: https://github.com/rubiojr/beehive-youtube-dl
- Owner: rubiojr
- License: mit
- Created: 2020-03-16T19:13:51.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-29T12:49:54.000Z (about 5 years ago)
- Last Synced: 2025-01-26T11:09:24.454Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Beehive video downloader
⚠️ this is a basic example **higly insecure** by default. Your files could be exposed to the world.
Example [Beehive](https://github.com/muesli/beehive) based video downloader implementation.
* Enqueue videos to be downloaded
* Notifies videos have been enqueued via Pushover
* Download enqueued videos using youtube-dl
* Notifies when videos have been downloaded via Pushover
* The videos will be served by [minio](https://min.io) at http://localhost:2015 (user: test123, pass: secret123)Needs https://github.com/muesli/beehive/pull/272 so you'll need to build Beehive from that branch.
Sample `beehive.conf` included. Needs Pushover token `changeme` to be replaced with a real token for the notifications to work.
## Workflow
Queueing videos:
```
POST YouTube URL +------------------------+ Save URL +-------------+
| | | |
beeydl queue -----------------------> | Beehive HTTP server +--------------> Redis Server
| | | |
+------------------------+ +-------------+
|
| +------------+
+-------->+ |
| Pushover |
Send notification | |
+------------+```
Downloading videos:
```
+-------------+
| |
beeydl poll +----> Redis Chan |
+ | | |
v | +-------------+
get key |
+ | +-------------------------+
v +----+ |
youtube-dl | | Download queued Video |
+ | | |
| | +-------------------------+
| |
v | +-------------+
publish msg +--->+ |
| Redis Chan | +----------+ +------------+
| | | | | |
+-------------+ | Beehive | +------------->+ Pushover |
+---------->+ | | |
+----------+ +------------+
```## Usage
The easiest way is to clone this repository and use the `docker-compose.yml` file included.
Replace Pushover token placeholders with your own tokens.
```
git clone https://github.com/rubiojr/beehive-youtube-dl
cd beehive-youtube-dl
export PUSHOVER_APP_TOKEN=my-app-token
export PUSHOVER_USER_TOKEN=my-user-token
docker-compose up
```You can then queue videos locally using:
```
./beeydl queue "https://youtube...."
```A `ydl-video` directory will be created automatically in the current directory and the videos will be downloaded there.
A `config` directory will also be created to persist Beehive's configuration.