CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Navigating Multiple links on a webpage and collecting the HTML information with WWW:Mechanize

 



Fraizerangus
New User

Sep 28, 2011, 6:13 AM

Post #1 of 1 (273 views)
Navigating Multiple links on a webpage and collecting the HTML information with WWW:Mechanize Can't Post

Dear GURU's

Please help, I've spent the last 2 weeks trying to write code which will allow me to select several similar links from an internet homepage, follow each of them and then follow several more similar links in these and then copying the HTML from these pages (creating a web browsing tree I suppose). I've been trying to grapple with WWW:Mechanize, which seems to work well with linear web progression but I can't find a way to itertae and have it follow multiple similar links on the same page more than once? Does anyone have any code or ideas on the best way to go about doing this?!
heres what I've got so far

use WWW:Mechanize
use Storable;
$url = 'website';
$m = WWW:mechanize->new();
$m->get($url); my @LINKS = $m->find_all_links(url_regex => qr/$string/i);

Much Appreciated

Dan ;)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives