You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WWW::Mechanize users
I`m using wwwMechanize to download a list of urls in the file to my
hard,
when this script read an url that does not exist,program with this
error can`t continue anymore:
Error getting url
Here is my code:
use strict;
use WWW::Mechanize;
use File::Basename;
use HTML::Parser;
use Crypt::SSLeay;
#use LWP::Debug qw(+);
open F,"urls.txt" or die "I can not open it:$!";
my $mech = WWW::Mechanize->new( autocheck => 1 );
my @array = <F>;
foreach my $link(@array){
$link =~ s/\s+$//g;
my $url = $link;
$link =~ s/\///g;
my $filename = $link;
$mech->get( $url);
$mech->success or die "Can't get the $url";
$mech->save_content( $filename );
}
foobar
unread,
Feb 23, 2009, 10:27:52 AM2/23/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to www-mecha...@googlegroups.com
if what you want is to be able to continue, set the autocheck param to 0 (btw that's the default)