Last active
October 30, 2018 05:52
-
-
Save ongspxm/1d708dc072a20452d0d0eef06262f16d to your computer and use it in GitHub Desktop.
download videos from viu using youtube-dl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run with the starting index like so: `dload 5` | |
# first url on the list will be index-ed 5 | |
# pipe in list of urls | |
i=$1 | |
if [ -d $1 ]; then i=1; fi | |
while read f; do | |
name=$(echo $f | tr "/" "\n" | tail -n 1) | |
youtube-dl "$f" --sub-lang English --write-sub -o $name-$i.mp4 | |
i=$(( $i+1 )) | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gets full list of the url from the playlist, in the right order | |
console.log([].slice.call(document.querySelectorAll('.video-alllist a')).map(a=>a.href).reverse().join('\n')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment