kkdai / youtube

Download Youtube Video in Golang
MIT License
3.31k stars 429 forks source link

download playlist using bash #247

Closed Kareem21227gg closed 2 years ago

Kareem21227gg commented 2 years ago

sorry for opening this issue and then closing it but thought it will be helpful to have this snip here

for i in `go run ./cmd/youtubedr list https://youtube.com/playlist?list={playlits_id} | awk '{print $2}'`;do sleep 5 && echo $i && go run ./cmd/youtubedr download https://youtube.com/watch?v=$i ;done

tosiek88 commented 1 year ago
youtubedr list https://www.youtube.com/watch\?list\=PL9IEJIKnBJjFiudyP6wSXmykrn67Ykqib -f json | \
jq '.Videos[] | .ID' | xargs -P8 -I {} \
sh -c "youtubedr download https://www.youtube.com/watch\?v\={} -q 137"

Another way - parallel