Update youtube.sh

This commit is contained in:
tianyu 2015-08-09 10:22:39 +08:00
parent f4c250247c
commit de5fbf4e35
1 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
DOWNLOAD_DIR="YOUR_DOWNLOAD_DIR"
USER="HTTP_USER"
PASSWORD="HTTP_PASSWORD"
RPC="https://home.example.com/jsonrpc"
@ -16,6 +17,8 @@ URI=$1
export LC_ALL=en_US.UTF-8
cd "$DOWNLOAD_DIR"
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)