Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Download PDF's

by Godsrock37 (Sexton)
on Jun 19, 2008 at 14:58 UTC ( [id://692936]=note: print w/replies, xml ) Need Help??


in reply to Re: Download PDF's
in thread Download PDF's

Really?! That's hot. So I could do:

my $response = $robot->get($url, $url); if ($response->is_success and $response->content_type eq 'application/ +pdf'){ print PDF $contents; }

how would i get $contents? Some type of parsing?

I guess that means i can do the same thing with pictures too?

Replies are listed 'Best First'.
Re: Download PDF's
by b10m (Vicar) on Jun 19, 2008 at 15:01 UTC

    Even easier:

    use strict; use LWP::Simple qw/getstore/; my $url = "http://blahblah/file.pdf"; my $file = "/home/user/file.pdf"; getstore($url, $file);
    --
    b10m

      haha, thanks b10m that looks awesome. i think i'm set then

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found