Tuesday, September 30, 2014

Grab videos.

Good job for an old computer to get videos from youtube. Data flle (aka vidlist) consists of lines like this:

https://www.youtube.com/watch?v=3kJXbXhEPrk
https://www.youtube.com/watch?v=yxAhrUAvjo0
http://www.youtube.com/watch?v=9DTjssGms8I
https://www.youtube.com/watch?v=ACsy6xSIBm8

The code:



<code>
 #================================
#
#  Get youtube videos
#
#=================================
# Assignments
# --------------------------------
datafile="vidlist"
#=================================
#
# Data input
#---------------------------------
while read line
        do theurl=$line
                youtube-dl $theurl -f flv
done < $datafile
</code>


No comments:

Post a Comment