OLE can do this if you have Internet Explorer working.  Granted..  It's
not perfect, but if you want to invest some time in getting all the
"features" worked out, it would be worth it.  (like the <SCRIPT> tags
not telling you what is in the SCRIPT....)..  So, this script is
somewhat limited, but can be worked on to get you more if it doesn't
give you enough.

Please be nice and don't abuse Google, or anyone else for that matter,
with this script...  :)

use Win32::OLE;

$oIE = Win32::OLE->new("InternetExplorer.Application");
$oIE->{Visible} = 1;
$oIE->Navigate("http://www.google.com";);

my $rtn = check_ready_state($oIE);
if ($rtn != 1) {
  $oIE->Quit();
  exit $rtn;
}

print "Title: ".$oIE->Document->{Title}."\n";

print $oIE->Document->{All}->{Length}."\n";

$x = 0;
while ($x < $oIE->{Document}->{All}->{Length} - 1) {
  print $oIE->{Document}->All($x)->{InnerHTML};
  $x++;
}
exit;
sub check_ready_state {
  my $oIE = $_[0];
  my $x;

  while ($oIE->{Busy} == 1) {
    $x++;
    if ($x > 90) {
      print "IE Is taking a really long time to open\nI've decided to
return a failure\n";
      return 0;
    }
    if ($x == 1) { 
      print "  Ready State: ";
    }
    print $oIE->ReadyState;
    print "... ";
    if ($oIE->{Busy} == 1) {
      sleep(1);
    }
  }
  print "\n";
  sleep 2;
  return 1;
} 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Mike Rambour
> Sent: Tuesday, September 04, 2007 10:00 PM
> To: perl-win32-web@listserv.ActiveState.com
> Subject: RE: get html source from web page blocked mouse right button.
> 
>   As Bill already said the "View" pulldown will do it, I have 
> never seen it not work when the right mouse button was 
> blocked.  Also you can do a "Save AS"
> 
> At 09:53 PM 9/4/2007, Chang Min Jeon wrote:
> >really, i'm trying to get html source from online webpage 
> blocked mouse 
> >right button using perl modules.
> >
> >and i will save this source to html format in my filesystem.
> >
> >so, i find perl module which get html source by using URL.
> >
> >2007/9/5, Bill Luebkert <[EMAIL PROTECTED]>:
> > > Chang Min Jeon wrote:
> > > > hello,
> > > >
> > > > i want to get html source from web page blocked mouse 
> right button.
> > > >
> > > > how to do that ?
> > >
> > > What browser are we talking about ?
> > >
> > > If you're using a decent browser there should be a hotkey.
> > >
> > > On Thunderbird, use Ctrl-U or the View pulldown menu.
> > >
> >
> >
> >--
> >CashFlow
> >To be rich.
> >_______________________________________________
> >Perl-Win32-Web mailing list
> >Perl-Win32-Web@listserv.ActiveState.com
> >To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
> 
> _______________________________________________
> Perl-Win32-Web mailing list
> Perl-Win32-Web@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 
> 
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to