Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the frame source with Perl's WWW::Mechanize?

Using WWW::Mechanize::Firefox, I can get the source of the page I visited. However, if the page contains a frame, I get the frame tag and not the actual source of the page that is loaded. Mechanize::Frames seems to be what I am looking for. Is there a way to use them together?

like image 202
SJaguar13 Avatar asked Dec 14 '25 12:12

SJaguar13


1 Answers

That's probably because you're not loading the frame contents.

$mech->follow_link(tag => "frame"); # open first frame in document
my $src = $mech->content;
like image 152
Zano Avatar answered Dec 16 '25 21:12

Zano