Procházet zdrojové kódy

Update youtube-dl.sh

高中数学
https://www.youtube.com/playlist?list=PLR1ACzwrLF_09MidJqluugHTHQCErNeSb

高中物理
https://www.youtube.com/playlist?list=PLR1ACzwrLF_1W1nOT0-0WI51VsufIWO3C

高中化学
https://www.youtube.com/playlist?list=PLR1ACzwrLF_3JEmrFtjdGYHIUtnWtiPCK
蘭雅sRGB před 4 roky
rodič
revize
843e41bc95
1 změnil soubory, kde provedl 11 přidání a 2 odebrání
  1. 11 2
      youtube_dl/youtube-dl.sh

+ 11 - 2
youtube_dl/youtube-dl.sh

@@ -30,6 +30,13 @@ mp3_download(){
     rm *.m4a
 }
 
+m4a_download(){
+    while read -r line || [[ -n $line ]];do
+        youtube-dl -f 140 $line
+    done < $url_list
+
+    ls -1 *.m4a
+}
 
 url_list=url_list.txt
 if [[ $# > 1 ]];then
@@ -46,7 +53,7 @@ url_f(){
 }
 
 help_info(){
-echo -e "\e[1;33m Usage: $0  [install | mp3 | vod]  [url_list.txt | URL] \e[0m"
+echo -e "\e[1;33m Usage: $0  [install | mp3 | vod | m4a ]  [url_list.txt | URL] \e[0m"
 }
 
 url_f
@@ -63,7 +70,9 @@ if [[ $# > 0 ]];then
         vod)
 		vod_download
 		;;
-
+		m4a)
+		m4a_download
+		;;
 	esac
 else
     help_info