Download youtube videos and MP3s over XMPP
Download audo and video files with an XMPP interface.
This bot has two main modes of operation:
Install: xmpppy, requests and youtube-dl.
sudo apt install python-xmpp python-requests python-pip
sudo pip install youtube-dl
Create an XMPP account for your bot. Use a server which supports XEP-0363 HTTP Upload. Consult https://compliance.conversations.im/
Copy settings.py-example
to settings.py
and edit the file.
Run the script
python bot.py
Set up a cron job to update youtube-dl
43 7 * * * pip install --upgrade youtube-dl
Optionally: make it run on startup. Systemd file is attached, for other process supervisor systems: PRs welcome.
Log into your XMPP bot’s account and add your main account to the roster. Only people from the roster are allowed to use the bot.
Send the bot a link from your XMPP client. The bot supports an impressive number of video hosting websites via youtube-dl: https://rg3.github.io/youtube-dl/supportedsites.html
It’s single threaded. Downloading more than one video at once will cause unpredictable effects.