"Aiken, Greg" <[EMAIL PROTECTED]> wrote:
>sorry for thinking that you, an obvious expert in the user of this module,
>might just simply >answer my question with 5 seconds of effort. evidently
>using 30 seconds to chastize me is a
>better use of your time. please forgive my intrusion.
If you didn't like the phrasing of the answer , maybe you should ask
yourself how the question was put, however I did infact answer your
question -
HTML::TokeParser can parse HTML tags to get at either the attributes or the
values.
HTML::TokeParser you'll find inside the HTML folder, inside the LIB
folder, inside the MacPerl folder on your HD -did you look? did you spend 5
seconds of _your _ effort to find this?
#!perl-w
use HTML::TokeParser;
$p = HTML::TokeParser->new("index.html");
while (my $token = $p->get_tag("img")) {
my $url = $token->[1]{src} || "-";
my $text = $p->get_trimmed_text("/a");
print "$url\t$text\n";
}
This short script, taken from the TokeParser POD, will pick out all the
URLS from the <IMG SRC> tags in a HTML doc, which you can then grab using
LWP.
HTH
Robin
- [MacPerl] Grab a web page Chevalier Jacques
- Re: [MacPerl] Grab a web page robinmcf
- Re: [MacPerl] Grab a web page Doug McNutt
- Re: [MacPerl] Grab a web page robinmcf
- Re: [MacPerl] Grab a web page Peter Hartmann
- Re: [MacPerl] Grab a web page robinmcf
- Re: [MacPerl] Grab a web page Bion Pohl
- Re: [MacPerl] Grab a web page Chris Nandor