Created
April 26, 2012 20:41
-
-
Save wridgers/2502982 to your computer and use it in GitHub Desktop.
Leach lots of GQ videos, in HD.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in `seq 1 10`; | |
do | |
wget -q "http://www.youtube.com/user/goingquantum/videos?page=$i" -O page.$i.txt | |
done | |
cat page.*.txt > total.txt | |
grep -o "/watch?v=\([^\"\&]*\)" total.txt | sed 's/\/watch?v=//g' | uniq > ids.txt | |
videos="1" | |
while read line; do | |
if [ -n "$line" ]; then | |
already_exists=false | |
for j in *; | |
do | |
if [[ "$j" =~ "${line}" ]]; then | |
already_exists=true | |
fi | |
done | |
if $already_exists; then | |
echo "[$videos] Skipping: $line" | |
else | |
echo "[$videos] Downloading: $line" | |
youtube-dl -t -r 500k -c -w $line | |
fi | |
videos=$[$videos+1] | |
fi | |
done < "ids.txt" | |
rm ids.txt page.*.txt total.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment