Thread: Help please

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    10
    Rep Power
    0

    Help please


    http://records.co.hawaii.hi.us/weblink/1/doc/62475/Page1.aspx

    This webpage has image pdf on it.. I want to download it.
    But I'm getting some issues while.

    I have tried with mechanize module but nothing works.

    Could you help me..
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    spaceBAR Central
    Posts
    225
    Rep Power
    41
    Post your code and the errors/messages you are getting.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    10
    Rep Power
    0

    Re:


    Originally Posted by spacebar208
    Post your code and the errors/messages you are getting.
    use WWW::Mechanize;
    my $mech = WWW::Mechanize->new( autocheck => 1 );
    use WWW::Mechanize:ecodedContent;
    my $url="http://records.co.hawaii.hi.us/WebLink/PDF/zp5pey55qd5wcxnycpoa5q55/146/2012-11-1%20TO%202012-11-3%20PermitsIssuedDetails.pdf";
    $mech->get($url);
    my $status=$mech->response->status_line;
    print "Code::$status\n";
    my $content=$mech->content;
    # my $content = $mech->decoded_content;
    # my @links = $mech->find_all_links(
    # tag => "a", text_regex => qr/\bpermitsIssued\b/igs );
    open(fh1,">mech_cont.html");
    print fh1 $content;
    close(fh1);
    # print "Links::@links\n";
    print "Content Fetched Scuccessfully\n";

IMN logo majestic logo threadwatch logo seochat tools logo