youtube视频批量下载
youtube 下载视频脚本:
得到下载列表:download_list
var links = document.getElementsByTagName('a');var style_class = "style-scope ytd-playlist-panel-video-renderer"; for(var i =0;i<links.length;i++){ if(links[i].className.indexOf(style_class)>-1){ console.log(links[i].href)}}
使用youtube-dl下载
youtube-dl -f mp4 -a download_list
======
附
-----
youtube-dl 安装:
sudo wget https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl sudo chmod a+x /usr/local/bin/youtube-dl hash -r