Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Download MP3 file from site with cookies?

Thread Tools

Download MP3 file from site with cookies?
Posts: n/a
Hello, everyone. I'm writing a Perl script that downloads and saves
to disk all of the MP3 files linked on a given Web page. For Web
sites that do not require the use of cookies, I'm able to use
LWP::Simple::getstore() without any problem. And I already know how
to download HTML Web pages from sites that use cookies, using
LWP::UserAgent->new(), HTTP::Cookies::Netscape->new(), HTTP::Request-
>new(), etc.

But I do not see how to do both at the same time -- in other words,
download and store an MP3 file from a site that requires one to be
logged in with a cookie. I tried using the HTTP::Request->new(), $ua-
>request(), but it does not work because the content type is not 'text/

html', but instead 'audio/mpeg', and thus $response->is_success is

Any ideas?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
3GP to MP3 Convert 3GP to MP3 using 3GP MP3 Converter music-fan DVD Video 0 12-24-2009 04:58 AM
MP3 playback using Java Sound and Sun MP3 plugin Daniel Dyer Java 6 01-22-2006 05:43 PM
MP3 file size for MP3 players .... Computer Information 1 11-11-2005 09:37 AM
New Forum site about mp3 and mp3 related topics Steve Steele Computer Support 1 04-14-2004 10:21 PM