gnangia has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to download all frames from a url, however, I only seem to be getting the first frame. I would appreciate if anyone could provide some input. Here is my code -
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; use WWW::Mechanize::Link; my $url = "http://members.fortunecity.com/bigg5/index09.htm"; my $browser = WWW::Mechanize->new(); $browser->get($url); my @link = $browser->find_all_links(); foreach my $link (@link) { print "Tag is " . $link->tag . "\n"; print "LINK IS " . $link->url . "\n"; if ($link->tag eq "frame") { print "Adding $link->[0] to todo list\n"; $browser->get($link->[0]); } }

Replies are listed 'Best First'.
Re: Downloading all frames with WWW::Mechanize
by gnangia (Scribe) on Aug 12, 2003 at 16:07 UTC
    Hello fellow Monks,
    I would really appreciate if anyone could help me out from the above post.
    Thanks