Create youtube.sh

This commit is contained in:
tianyu
2015-07-21 23:16:28 +08:00
parent 8b040445bb
commit 867283fbc7

10
net/youtube.sh Normal file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# pip install youtube-dl
URI=$1
AUDIO=$(youtube-dl -F $URI | grep "DASH audio"|grep "aac"|tail -1|cut -d ' ' -f 1)
VIDEO=$(youtube-dl -F $URI | grep "DASH video"|grep "mp4"|tail -1|cut -d ' ' -f 1)
youtube-dl -f $VIDEO+$AUDIO -k $URI