How can I use Perl to clean up a website that is showing its content using JavaScript?

I need to write a Perl script to clean up a website. The website can only be cleared with JavaScript and the user is on Windows.

I have a way with Win32 :: IE :: Mechanize on my work computer with IE6, but then I switched to my netbook with IE8, and can't even access a simple page.

Is Win32 :: IE :: Modify Latest IE Versions?

But more importantly, given the recent WinXP machine, what's the fastest and easiest way to clean up a site that only displays its content via JavaScript?

+2


a source to share


4 answers


WWW :: Selenium .

  • It allows you to specify which browser to use (IE and Firefox are supported with get-go)
  • It supports accessing elements via xpath elements, table ids, text (regex match!) And urls
  • It provides a Swiss army knife for custom interaction options, giving you flexibility in how you want to simulate end-user browsing.


You need to download Selenium Remote Control and run it in the background for the module to work.

This may not be a good option if page load times are unpredictable.

+3


a source


Have a look at Win32 :: Watir . This is a new module and clearly supports IE 6, 7 and 8.



0


a source


I don't see any mention of WWW :: Mechanize , so I'll post it just for completeness. Selenium is also becoming very popular and can be used in many testing scenarios.

0


a source


WWW :: Scripter and its :: Plugin :: Perhaps Javascript can help you.

0


a source







All Articles