I am trying to automate a website download. The website is https address and is a password protected site. I have used lwp in the past to capture html pages, mostly by just copying code and modifying it. This is different. By using liveheaders I found out the url I am looking for is "https://mysite.com/myapp.dll<someotherstuffhere>" When this is typed in a browser window, the download browser window comes up.
Live headers has this "Content-Disposition: attachment; filename="myfilename.tgz" Transfer-Encoding: chunked Content-Type: application/octet-stream"
Here is the code I used before :

my $ua = LWP::UserAgent->new(); $ua->agent("USER/AGENT/IDENTIFICATION"); # make request my $request = HTTP::Request->new(GET => $URI); # authenticate $request->authorization_basic($user, $pass); # accept response my $response = $ua->request($request);
Now I get as far as making the request and it hangs..
I am using ActiveState Perl 5.10.1
Question : can I use lwp to download these files ( I have hundreds of them ) or should I approach this another way?
thanks in advance

In reply to web downloading via lwp by 23penguins

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.