Tagged: download

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.

Defcon auto download script (2012)

dc-21-logo-sm

I found this script floating about on the web I wonder if it could be adapted/used to suite this years defcon. Defcon is the worlds largest hacking conference now in its 21st year. The conference starts this year August 1st and runs till the 4th tickets for a 4 day pass are $180 and the conference will be held at the Rio Hotel in Las Vegas! What happens in Vegas, usually ends up on youtube a few months later

#####
## $ ddl-rss-media https://www.defcon.org/podcast/defcon-20-slides.rss
#####
ddl-rss-media(){
# ddl-rss-media RSS_LINK {would download all media enclosed at current dir}
enclosures=`curl -k -s -L $@ | cat | grep enclosure | sed ‘s/.*enclosures*url=”//’ | sed ‘s/”.*//’`
for url in `echo $enclosures | xargs -L1`;
do
if [ ! -z $url ];
then
filename=`echo $url | sed ‘s/?.*//’ | sed ‘s/.*///’`
echo “Downloading $filename…”
wget -c -O $filename $url
fi
done
}