mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-09-23 04:19:24 +08:00
Update youtube.sh
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
DOWNLOAD_DIR="YOUR_DOWNLOAD_DIR"
|
||||||
USER="HTTP_USER"
|
USER="HTTP_USER"
|
||||||
PASSWORD="HTTP_PASSWORD"
|
PASSWORD="HTTP_PASSWORD"
|
||||||
RPC="https://home.example.com/jsonrpc"
|
RPC="https://home.example.com/jsonrpc"
|
||||||
@@ -16,6 +17,8 @@ URI=$1
|
|||||||
|
|
||||||
export LC_ALL=en_US.UTF-8
|
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)
|
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)
|
VIDEO=$(youtube-dl -F $URI | grep "DASH video"|grep "mp4"|tail -1|cut -d ' ' -f 1)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user