Monthly Archives: April 2014

Youtube python magic

*repost for archiving purposes*

NB THIS IS INTENDED FOR DEBIAN LINUX
BUT MAY ALSO WORK ON OTHER DISTRIBUTIONS

In this video we’ll be using python curl and youtube-dl to download the latest videos from your favourite channels.

sudo apt-get install python curl
install this too – http://rg3.github.com/youtube-dl/

make a dir in your home folder …
~/yt-downloads
~/yt-downloads/downloads

copy the script into
~/yt-downloads

edit the downloadpath variable in the script to match the directory you just made
/home/USER/yt-downloads/downloads/

DONT FORGET THE FORWARD STROKE

Run the script by issuing the following command …
python script.py hakology

DOWNLOAD THE V1.0 SCRIPT FROM HERE …
http://pastebin.com/Vjr4sJgv

V1.1 HERE …
http://pastebin.com/BGAAVshM
modified for playlists by advancednewbie
(usage has changed on this version call the script with the -h option for all options)

Big shout out to advanced newbie for suggesting this idea.

Hakology – Zeya linux installation (HTML5 streaming music)

*repost for archiving purposes*

# Notes:
# Requirements
# Python 2.5+ (2.6+ recommended) tested on 2.7 (worked fine)
# python-tagpy (critical : boost lib)
# python-simplejson (critical : boost lib)
# oggenc (critical : ogg encoder for streaming)
# mpg123 (optional : for decoding MP3 files) (you will want this)
# flac (optional : for decoding FLAC files) (you might want this)

echo "Hakology - Zeya installation script for linux."
echo "Zeya is a client for streaming audio from a central servernto any device that supports html5"
echo "Zeya - web.psung.name/zeya/"
echo "Hakology - youtube.com/hakology"
echo "Visit the youtube channel for more coolness"

cd ~
sudo apt-get install python git mpg123 flac python-tagpy vorbis-tools faad python-simplejson
sudo git clone http://web.psung.name/git/zeya.git

echo "############################################"
echo "Installation complete"
echo "############################################"
echo "To run :";
echo "./zeya.py --path=/path/to/music";
echo "To add to crontab (crontab -e) add the following to start on reboot";
echo "@reboot /full/path/to/zeya.py --path=/path/to/music";
echo "You should add a htaccess file to use this on the web";
echo "./zeya.py --basic_auth_file=/path/to/.htpasswd --path=/to/your/music/";
echo "You can also run on a different port";
echo "./zeya.py --port=9000";
exit