Skip to content

Instantly share code, notes, and snippets.

@pirj
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save pirj/9658821 to your computer and use it in GitHub Desktop.

Select an option

Save pirj/9658821 to your computer and use it in GitHub Desktop.
Parallel download of audio files (10 files at a time) from VK.com. Install extension from vkopt.net, download playlist as "playlist.lst", and run `./download.bash playlist.lst`. Makes "playlist" directory.
mkdir "${1%.*}"
( cd "${1%.*}"
xargs -n1 -P10 -0 -d"\n" -Iuri bash -c "wget -O \"\$(echo \"uri\" | sed -e \"s/^.*&\///g\" -f ../urldecode.sed)\" \"uri\"" <../$1
)
s/%25/%/gi
s/%20/ /gi
s/%09/ /gi
s/%21/!/gi
s/%22/"/gi
s/%23/#/gi
s/%24/\$/gi
s/%26/\&/gi
s/%27/'\''/gi
s/%28/(/gi
s/%29/)/gi
s/%2a/\*/gi
s/%2b/+/gi
s/%2c/,/gi
s/%2d/-/gi
s/%2e/\./gi
s/%2f/\//gi
s/%3a/:/gi
s/%3b/;/gi
s/%3d/=/gi
s/%3e//gi
s/%3f/?/gi
s/%40/@/gi
s/%5b/\[/gi
s/%5c/\\/gi
s/%5d/\]/gi
s/%5e/\^/gi
s/%5f/_/gi
s/%60/`/gi
s/%7b/{/gi
s/%7c/|/gi
s/%7d/}/gi
s/%7e/~/gi
s/%09/ /gi
s/+/ /gi
s/&amp;/\&/gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment