Jump to content

Kurin

Members
  • Posts

    2
  • Joined

  • Last visited

Kurin's Achievements

Newbie

Newbie (1/14)

  1. 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!)
  2. 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/bash FOLDER="OCRemix"; START=1; END=3000; MIRROR="ocrmirror.org"; LIMIT="100m"; WAIT=0; cd $FOLDER for ((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."; fi done 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!
×
×
  • Create New...