in reply to Getting the Linking Text from a page
#!/usr/bin/perl -w use strict; use HTML::TokeParser; my $p = new HTML::TokeParser($ARGV[0]) or die; while(my $t = $p->get_token()) { if($$t[0] eq 'S' and $$t[1] eq 'a') { print $$t[2]->{href}, "\n", $p->get_trimmed_text('/a'), "\n\n"; } } undef $p;
______crazyinsomniac_____________________________ Of all the things I've lost, I miss my mind the most. perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;" |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (crazyinsomniac) Re: Getting the Linking Text from a page
by jonjacobmoon (Pilgrim) on Mar 13, 2002 at 10:35 UTC |