mr_p has asked for the wisdom of the Perl Monks concerning the following question:
I have been trying to extract only 'stylesheet' links from html page and have not been able to do so.
Example:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Header</title> <link href="//www.perl.org/perl.css" rel="stylesheet"> <link href="/css/perl1.css" rel="stylesheet"> <link href="/perl/cpan/index.html" rel="index_page"> </head> <body></body> <html>
I would like to only extract the href from rel=stylesheet. It is case insensetive. I can have Rel=StyleSheet too.
I have tried SimpleLinkExtor, TreeBuilder, Text::Balanced and LinkExtor. I do not wish to use TreeBuilder because it is too expensive.
Please help. I have spent 2 days on this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting stylesheet links or url from HTML Page
by Your Mother (Archbishop) on Jun 23, 2010 at 22:11 UTC | |
by runrig (Abbot) on Aug 15, 2011 at 18:54 UTC | |
|
Re: Extracting stylesheet links or url from HTML Page
by ww (Archbishop) on Jun 23, 2010 at 22:39 UTC | |
by kalyanrajsista (Scribe) on Jun 24, 2010 at 09:03 UTC | |
|
Re: Extracting stylesheet links or url from HTML Page
by ambrus (Abbot) on Jun 24, 2010 at 10:29 UTC | |
by mr_p (Scribe) on Jun 24, 2010 at 13:20 UTC | |
by ww (Archbishop) on Jun 24, 2010 at 17:02 UTC | |
by mr_p (Scribe) on Jun 24, 2010 at 14:21 UTC |