mirror of
				https://github.com/xdtianyu/scripts.git
				synced 2025-11-04 18:28:18 +08:00 
			
		
		
		
	Update youtube.sh
This commit is contained in:
		@@ -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)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user