Jump to content

Got linux? Want to grab every song on OC ReMix?


Recommended Posts

I made a script for you linux users who might wish to grab all the Remixes. It's not terribly long, just made to grab every song from 00001 onward to current.

Notes about the script:

This script uses both curl and wget, please be sure to have both installed!

FOLDER is where all files should be saved

START is the first file you want to grab (Doesn't have to be an existing file)

END is the last file you want to grab (Doesn't have to be an existing file)

MIRROR is which mirror you want to grab from (ocrmirror, iiens.net, etc)

LIMIT is the speed limit you wish to grab the file at, in case you are downloading other things as well, set to extremely high if you don't care. (eg 4k would download it at 4KB/s, 5m would download at 5MB/s [apprx most high speed internet], 100m would allow any/all bandwidth to go to the downloads.)

WAIT allows the script to rest between downloads, if you don't mind it taking an even longer time to download.

This script is sane, and will not overwrite or download files unless the file is newer than current (tags-project for instance), so you can safely run this frequently without using up lots of bandwidth unnecessarily.


for ((i=$START;i<=$END;i++)); do
case $strlen in
"1") file="0000$i"; ;;
"2") file="000$i"; ;;
"3") file="00$i"; ;;
"4") file="0$i"; ;;
"5") file="$i"; ;;
echo "Retrieving OCR$file DATA";
url=$(curl --silent http://ocremix.org/remix/OCR$file/ | grep $MIRROR | sed 's/<a href=\"\(.*\)\">\(.*\)/\1/');
if [ -n "$url" ]; then
echo "Retrieving MP3";
wget --limit-rate=$LIMIT -c -nv $url
if [ $WAIT -gt 0 ]; then
echo "Waiting $WAIT seconds.";
sleep $WAIT;
echo "No file, skipping.";

If you guys have any questions about the script, or need anything else figured out in terms of linux-scripting, don't hesitate to let me know! Happy wgetting!

Link to comment
Share on other sites

Yep, this script will download only once. If the song exists, it won't redownload it, so torrent, or whatever, as long as the directory it's saving to is the directory the rest of the mixes are in, you'll only nab the new ones or updated ones (but it'll still hit the site for links to check against), either way it's not much bandwidth for that little bit of data. (Even less if there's a way to query the filename directly in plaintext instead of HTML that I'm not aware of!)

Link to comment
Share on other sites

  • 10 years later...

@Kurin I fixed the script after a couple of website changes over the years, one recent, so I've put it on GitHub: https://github.com/poikilos/ocremix-download-all 

It now stores the settings in a subdirectory under $HOME/.config so editing the script to change settings isn't necessary.

Is the license I put there (GPL v3) ok? Please confirm or specify one (See https://choosealicense.com/no-permission/). Thanks for the script.

Edited by MixMystery
clarify question
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.


×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...