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

I tried to get the source of the page included in the page "http://www.salvasms.it/mostracat.php/" by the iframe:
<iframe frameborder="no" framespacing="0" scrolling="Auto" border ="0" + width=470 height=500 name="principale" src="http://www.salvasms.it/l +egric.php?pag=&dataric=" scrolling="auto">
With firebug i can see the part of the source, but with WWW::Mechanize and WWW::Mechanize::Frames i can't do it!!

This is my script:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use WWW::Mechanize::Frames; use HTTP::Cookies; {# ridefinisco la set_cookie, in modo che non cestini i cookie "scadut +i" my $orig=HTTP::Cookies->can('set_cookie'); *HTTP::Cookies::set_cookie=sub { $_[9]=undef; goto $orig; } } my $mech = WWW::Mechanize::Frames->new(); $mech->agent_alias('Linux Mozilla'); my $cookies=HTTP::Cookies->new(ignore_discard=>1); $mech->cookie_jar($cookies); my $url = 'http://www.salvasms.it/entra.php?userid=user&password=s3cre +t'; $mech->get($url); #print 'Url: ',$mech->uri(),"\nCookies: ",Dumper($mech->cookie_jar); my @frames = $mech->get_frames(); #print "Frames: @frames\n"; print $frames[0]->content; #print $mech->content();

Login with my user and password

user: cibbao
password: generale

Replies are listed 'Best First'.
Re: How to get iframe source
by Anonymous Monk on Apr 29, 2009 at 00:16 UTC
    There are no frames at that url.
      Login with my user and password

      user: cibbao
      password: generale