will pull quite a bit of HTML. Unfortunately the Text I want isn't enclosed in the <body> tag, so it misses what I want. I tried this:use strict; use Win32::OLE; my $sh = Win32::OLE->new('Shell.Application'); print "Count is $sh->{Windows}->{Count}\n"; for (my $i = 0; $i < $sh->{Windows}->{Count}; $i++) { my $win = $sh->{Windows}->Item($i); print "InnerHTML '$win->{Document}->{body}->{innerHTML}'\n"; print "OuterHTML '$win->{Document}->{body}->{outerHTML}'\n"; print "InnerText '$win->{Document}->{body}->{InnerText}'\n"; print "OuterText '$win->{Document}->{body}->{outerText}'\n"; }
Hoping that I could enumerate the ALL collection, but it just gets me more Win32::OLE hashes, that I don't know what to do with. I had hoped each one would be a reference to an element on the page, and I could reconstruct the page source from it, but once again I've hit a wall...use strict; use Win32::OLE; my $sh = Win32::OLE->new('Shell.Application'); print "Count is $sh->{Windows}->{Count}\n"; for (my $i = 0; $i < $sh->{Windows}->{Count}; $i++) { my $win = $sh->{Windows}->Item($i); my @list = Win32::OLE::Enum->All($win->Document->all); print "My Enum "; print "@list"; }
In reply to Re: Scrape an existing IE Window?
by rsilvergun
in thread Scrape an existing IE Window?
by rsilvergun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |