Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Automated music retrieval script

by phildog (Novice)
on Apr 24, 2003 at 16:04 UTC ( [id://252938]=perlquestion: print w/replies, xml ) Need Help??

phildog has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking to write a perl script (probably on linux) to automatically retrieve entire albums in mp3 format and save them to a disk.

Specifically, I want to do the following:

1. ssh to my linux box running at home
2. perl myscript.pl --bitrate 128 --artist 'beastie boys' --album 'check your head'
(might do #2 with a simple cgi script instead of the command line way)

Bingo, when I come home later I have a new folder in my /albums directory containing all the songs on the album encoded in 128 bitrate. I may want to have the script do some file renaming magic to make things consistent, but that is not necessary for version 1.0 and you get the idea. This, to me, seems like a good job for perl.

- what file sharing software to use? I've poked around a bit and edonkey seems like a good choice because a)it runs on linux and b)it has a published API (they have a java, and other, front-ends that connect with client software running wherever you like). Keep in mind I'd like to do some "fancy" stuff with search results--like get the version of the song "Hey Ladies" that is both encoded at 128 bitrate and being shared by the greatest number of users.

- how to get the song names? Net::CDDBScan? lwp get on Amazon page? something else?

Yes, if it makes you feel better I will do this only for albums I have purchased :-)

Any suggestions on how best to go about this? Better yet, did you already do this?

Phil

Replies are listed 'Best First'.
Re: Automated music retrieval script
by pfaut (Priest) on Apr 24, 2003 at 16:49 UTC
    Yes, if it makes you feel better I will do this only for albums I have purchased :-)

    If that's the case, why not rip and encode them yourself?

    My personal belief is that these file sharing networks are copyright violations although I also believe the MPAA/RIAA et al. are blowing it way out of proportion. I see nothing wrong with ripping songs from your own albums for your own use (I do it all the time) or with sharing with friends but I find it a stretch to claim that everyone on the internet is your friend.

    90% of every Perl application is already written.
    dragonchild

      I've heard of a few instances where people have purchased a CD (or album or tape) but were unable to rip it to MP3 due to physical damage of the original media. At least, that's what they claimed. ;)

      I personally rip all of my music -- I have found that the majority of the music available is very poor quality in comparison to what I can do on my own. The original idea that I had was to do something similar to what phildog wanted. Start downloading MP3s, leave it, and have music when I come home. I can't say about anyone else's reasoning, but I thought that it might be easier than sitting there watching the computer rip CDs. The whole "start a big long process and come back" rather than the "start a relatively short process, and sit and watch it so you can start the next one" kind of theory. But the quality of the available music (due to low bitrates, clipped songs, or "underwater" ripping) convinced me that sitting and watching my computer rip a CD isn't all that bad...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://252938]
Approved by hardburn
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found