Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: parsing html link

by poolpi (Hermit)
on May 25, 2009 at 10:24 UTC ( #766002=note: print w/ replies, xml ) Need Help??


in reply to parsing html link

You might try something like that:

#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $start = "http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl +?pdbcode=2j6p&template=ligands.html&l=1.1"; my $m = WWW::Mechanize->new( autocheck => 1 ); $m->get($start); my @links = $m->find_all_links(); print "No link\n" unless @links; for my $link (@links) { next unless $link->text; if ( $link->text =~ /EPE/msx ) { print $link->text, "\n"; } } # Output: # EPE 1148(C) # EPE 1148(D) # EPE-EPE


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb


Comment on Re: parsing html link
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://766002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (15)
As of 2014-07-24 16:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (162 votes), past polls