in reply to Re^3: WWW::Mechanize::Firefox and Net::Telnet timeout
in thread WWW::Mechanize::Firefox and Net::Telnet timeout
$mech->repl->repl->client->{telnet}->timeout($new_timeout);
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize::Firefox; my $mech = new WWW::Mechanize::Firefox(); open(INPUT, "<urls.txt") or die $!; while (<INPUT>) { chomp; print "$_\n"; $mech->get($_); my $png = $mech->content_as_png(); my $name = "$_"; $name =~s/^www\.//; $name .= ".png"; open(OUTPUT, ">$name"); print OUTPUT $png; sleep (5); }
linux-vi17:/home/martin/perl # perl mecha_test_1.pl www.google.com www.cnn.com www.msnbc.com command timed-out at /usr/lib/perl5/site_perl/5.12.3/MozRepl/Client.pm + line 186 linux-vi17:/home/martin/perl #
www.google.com www.cnn.com www.msnbc.com news.bbc.co.uk www.bing.com www.yahoo.com
$mech->repl->repl->client->{telnet}->timeout($new_timeout);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: WWW::Mechanize::Firefox and Net::Telnet timeout
by Corion (Patriarch) on Feb 20, 2012 at 08:59 UTC | |
|
Re^5: WWW::Mechanize::Firefox and Net::Telnet timeout
by Perlbeginner1 (Scribe) on Feb 20, 2012 at 08:51 UTC | |
|
Re^5: WWW::Mechanize::Firefox and Net::Telnet timeout
by Anonymous Monk on Feb 20, 2012 at 09:01 UTC |