23penguins has asked for the wisdom of the Perl Monks concerning the following question:
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 :
Now I get as far as making the request and it hangs..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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: web downloading via lwp
by cormanaz (Deacon) on May 19, 2010 at 00:32 UTC | |
by 23penguins (Initiate) on May 19, 2010 at 04:27 UTC | |
|
Re: web downloading via lwp
by Gangabass (Vicar) on May 19, 2010 at 01:43 UTC | |
|
Re: web downloading via lwp
by Khen1950fx (Canon) on May 19, 2010 at 08:16 UTC |