Kurin Posted December 3, 2010 Share Posted December 3, 2010 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. #!/bin/bashFOLDER="OCRemix";START=1;END=3000;MIRROR="ocrmirror.org";LIMIT="100m";WAIT=0;cd $FOLDERfor ((i=$START;i<=$END;i++)); do strlen=${#i}; case $strlen in "1") file="0000$i"; ;; "2") file="000$i"; ;; "3") file="00$i"; ;; "4") file="0$i"; ;; "5") file="$i"; ;; esac 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; fi else echo "No file, skipping."; fidone 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! Quote Link to comment Share on other sites More sharing options...
KyleJCrb Posted December 3, 2010 Share Posted December 3, 2010 Or you could, you know, use the torrents and save slamming one of the servers with traffic. EDIT: Ah, okay. I see that you could download the torrent, point this towards where those songs were saved, and then just download the stuff not in the torrent from the server. That's not so bad then. Quote Link to comment Share on other sites More sharing options...
Kurin Posted December 6, 2010 Author Share Posted December 6, 2010 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!) Quote Link to comment Share on other sites More sharing options...
MixMystery Posted July 1, 2021 Share Posted July 1, 2021 (edited) @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 July 1, 2021 by MixMystery clarify question Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.