July 24th, 2003, 03:21 PM
-
Using LWP module and getstore funtion
For some reason when I used LWP module, and getstore function. i tested it, it writes the source code of the webpage on to the text file. Is there a way so it writes only whats displayed on the web in the text file?
This is what the code looks like:
#!/usr/bin/perl
use lib '/path/to/lwp/';
use LWP::Simple;
$url = "http://www.myurl.com/";
$file = "/path/to/savefile.txt";
getstore($url, $file);
Last edited by robbyd; July 24th, 2003 at 03:54 PM.
July 24th, 2003, 04:42 PM
-
Umm. . .LWP doesn't render HTML or javascript, it just allows you to automate interactions with web pages and forms.
Search this forum for "strip HTML" for information about stripping HTML from a document. Hint: Regexes are the wrong way to do it.