Posted By

archlight on 01/04/09


Tagged

ie html automation builder


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

counter202
icecreamboyy


Internet related perl script


 / Published in: Perl
 

  1. //simple http request
  2. use LWP::Simple;
  3. use LWP::UserAgent;
  4.  
  5. sub httpreq {
  6. my($srcpath, $destpath) = @_;
  7.  
  8. my $user_agent = LWP::UserAgent->new;
  9. my $request = HTTP::Request->new('GET', $srcpath);
  10. my $response = $user_agent->request ($request, $destpath);
  11.  
  12. }
  13.  
  14. //IE automation
  15. use Win32::IEAutomation;
  16. my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1);
  17. $ie->gotoURL('http://www.bega.de/index.php?sprache=en');
  18.  
  19. //HTML builder
  20. //used for parse html contents into tree structured array for easy searching
  21. my $right = $ie->getFrame('name:',"pib");
  22. my $root = HTML::TreeBuilder->new_from_content($right->Content());

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: maietta on January 24, 2010

Nice.

You need to login to post a comment.