in reply to downloading mp3 songs using LWP::UserAgent

getstore() works fine for me.

But: applying binmode to the file handle you're saving to, should work, too.

p.s. You mentioned logging in, so maybe therefore, LPW::Simple is out. But, because mp3 files are quite big, I am not in favour of first retrieving the whole file, and then saving it, as some other people suggested. Instead, take a look at how LWP::Simple implements getstore(), and copy those few lines of code, then extend it to include the logging in.

  • Comment on Re: downloading mp3 songs using LWP::UserAgent

Replies are listed 'Best First'.
Re^2: downloading mp3 songs using LWP::UserAgent
by Anonymous Monk on Oct 11, 2004 at 00:49 UTC
    If you want to keep using LWP::UserAgent how about something like this:
    $user_agent->get($mp3_url, ":content_file" => $local_mp3_filename);