Usualy I make scrapers in Ruby, but decide to do in Perl. And when I run my script I see number of url which opens very very very slow. And I thank, maybe its redirect problem? Or maybe its JS urls thats why problem. And I decide to use some module which can open JS web sites. So I look to cpan doc, take code and try to run it. Nothing no content. What I do wrong? Please correct me. Or maybe advice me smth. I try to use Selenium but have problems with installation, see error when I try to run selenium in Linux console.
use WWW::Scripter;
$w = new WWW::Scripter;
$w->use_plugin('JavaScript');
open(FH, "<links.csv");
while (<FH>) {
$url = $_;
if ( $url !~ /http(s)/ ) {
$url = "http://".$url;
}
$w->get(url);
$html = $w->content;
print "=======\n";
print Dupmper $w->content;
print "=======\n";
}