I have some input with a link and I want to open that link. For instance, I have an HTML file and want to find all links in the file and open their contents in an Excel spreadsheet.
+1
A:
That sounds like a job for WWW::Mechanize. It provides a fairly high level interface to fetching and studying web pages.
Once you've read the docs, I think you'll have a good idea how to go about it.
jplindstrom
2009-05-27 11:41:56
use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1 );$mech->get( "http://www.google.com" );print $mech->content;GETTING ERRORError GETing http://www.google.com: Can't connect to www.google.com:80 (connect:Unknown error)I WANT TO KNOW WHAT IS WRONG.
lokesh
2009-05-27 14:33:42
google.com is special. It doesn't like robots. However, it sounds like you have a network issue if you can't even connect.
brian d foy
2009-05-27 21:31:05
+2
A:
It sounds like you want the linktractor script from my HTML::SimpleLinkExtor module.
You might also be interested in my webreaper script. I wrote that a long, long time ago to do something close to this same task. I don't really recommend it because other tools are much better now, but you can at least look at the code.
brian d foy
2009-05-27 12:14:01