I need a perl script that logs on my site, gets the html code and then parse the code to find something I need.
I write a script that works just for some site (e.g. it can log on www.mail.yahoo.com) but when I use it to log on my site the submit doesn't works.
My code is:
#d:\Perl\bin\perl.exe use Win32::GUI; use Win32::OLE; use Win32::GUI::AxWindow; $Window = new Win32::GUI::Window ( -title => "Win32::GUI::AxWindow and Win32::OLE", -pos => [100, 100], -size => [900, 500], -name => "Window", ) or die "new Window"; $Button1 = new Win32::GUI::Button ( -parent => $Window, -name => "Button1", -pos => [0, 25], -size => [200, 50], -text => "Login", ); # more buttons here .. $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -pos => [0, 100], -size => [700, 450], -control => "Shell.Explorer.2", ) or die "new Control"; $OLEControl = $Control->GetOLE(); Win32::OLE->WithEvents($OLEControl,\&Event,"DWebBrowserEvents2"); $url = "http://mysite.com"; $OLEControl->Navigate2($url); Win32::OLE->MessageLoop; $Window->Show(); Win32::GUI::Dialog(); our $doc; # Button Event sub Button1_Click { $OLEControl->{Document}->{login}->{cont}->{value}= "cont"; $OLEControl->{Document}->{login}->{parola}->{value} = "*****"; $OLEControl->{Document}->{login}->{submit}; Win32::OLE->MessageLoop; $doc = $OLEControl->{Document}->{body}->{innerHTML}; }
Could someone help me?
In reply to A tool that logs and then parses the returned HTML. by marynella
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |