<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl LWP help.... in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043643#M93252</link>
    <description>I had to add a cookie container:&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 31 Jan 2008 15:20:26 GMT</pubDate>
    <dc:creator>jmckinzie</dc:creator>
    <dc:date>2008-01-31T15:20:26Z</dc:date>
    <item>
      <title>Perl LWP help....</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043640#M93249</link>
      <description>&lt;!--!*#--&gt;I have a wep page that produces sourse such as below.  It produces servernames that have failed backups, error codes, and links to other pages.&lt;BR /&gt;&lt;BR /&gt;I want to use LWP to get this information and send it to a table for a specific set of servers (that my group is responsible for.  I have a list of those servers in another file called list.  Any help with this would be great as I still learning perl.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TITLE&gt;Netbackup Failures for last  hours&lt;/TITLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;H2&gt;Netbackup Failures for last 24 hours as of May 1 10:00:00&lt;/H2&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE bgcolor="#003366" border="" cellpadding="8"&gt;&lt;BR /&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;For troubleshooting tips, click on Status.&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;BR /&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE width="600"&gt;&lt;BR /&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;BR /&gt;&lt;TD width="100" valign="TOP"&gt; &lt;LI&gt;bhovdlt1&lt;/LI&gt;&lt;/TD&gt;&lt;BR /&gt;&lt;TD align="LEFT" width="90" valign="TOP"&gt; &lt;A href="https://community.hpe.com/bhovdlt1.status.html" target="_blank"&gt; Status&lt;/A&gt; (96) &lt;/TD&gt;&lt;BR /&gt;&lt;TD align="LEFT" width="105" valign="TOP"&gt;&lt;A href="http://bravura/cgi-bin/view.pl?Hostname=bhovdlt1&amp;amp;BackupMethod=Da&amp;lt;BR /&amp;gt;ta&amp;amp;Database=Active" target="_blank"&gt;View Database&lt;/A&gt;&lt;/TD&gt;&lt;BR /&gt;&lt;TD align="LEFT" width="260" valign="TOP"&gt;&lt;A href="https://community.hpe.com/bhovdlt1.last.Data.html" target="_blank"&gt; Last Data Backup&lt;/A&gt; (02/14/2007) &lt;/TD&gt;&amp;gt;&lt;BR /&gt;&lt;TD align="LEFT" width="45" valign="TOP"&gt; bhovdlt1 &lt;/TD&gt;&lt;BR /&gt;&lt;/TR&gt;&lt;BR /&gt;&lt;TR&gt;&lt;BR /&gt;&lt;TD width="100" valign="TOP"&gt; &lt;LI&gt;namcpbbhfs01&lt;/LI&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 01 May 2007 15:15:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043640#M93249</guid>
      <dc:creator>jmckinzie</dc:creator>
      <dc:date>2007-05-01T15:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perl LWP help....</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043641#M93250</link>
      <description>Hi Jody:&lt;BR /&gt;&lt;BR /&gt;I'm not clear as to exactly what you want.  Have a look at the CPAN documentation.  It offers some code examples to get you started.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://search.cpan.org/~gaas/libwww-perl-5.805/lib/LWP.pm" target="_blank"&gt;http://search.cpan.org/~gaas/libwww-perl-5.805/lib/LWP.pm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 01 May 2007 15:53:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043641#M93250</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-05-01T15:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perl LWP help....</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043642#M93251</link>
      <description>Yes, I have....&lt;BR /&gt;&lt;BR /&gt;I also have ascript that parses using HTML::TReeBuilder however that is only getting anything with a &lt;A&gt; tag.&lt;BR /&gt;&lt;BR /&gt;I also need the data from the table...&lt;BR /&gt;&lt;BR /&gt;Here is my script.&lt;BR /&gt;&lt;BR /&gt;use HTML::TreeBuilder;&lt;BR /&gt;my $tree = HTML::TreeBuilder-&amp;gt;new;&lt;BR /&gt;$tree-&amp;gt;parse_file( 'website.html' ) || die $!;&lt;BR /&gt;my $base_url = 'http://website.html';&lt;BR /&gt;  # for resolving relative URLs&lt;BR /&gt;foreach $i ($tree-&amp;gt;parse_file) {&lt;BR /&gt;&lt;BR /&gt;   my $html =~ m{&lt;/A&gt;(.*?)};&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;foreach my $a ( $tree-&amp;gt;find_by_tag_name('a') ) {&lt;BR /&gt;&lt;BR /&gt;   my $href = $a-&amp;gt;attr('href') || next;&lt;BR /&gt;   my $text_content = $a-&amp;gt;as_text;&lt;BR /&gt;   use URI;&lt;BR /&gt;&lt;BR /&gt;  print  "$html::", "$text_content\::", URI-&amp;gt;new_abs($href, $base_url),"\n";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;It outputs this: (one for every table a ref)&lt;BR /&gt;&lt;BR /&gt;View Database::http://website/view.pl?Hostname=soleng02&amp;amp;BackupMethod=Data&amp;amp;Database=Active&lt;BR /&gt; Last Data Backup::&lt;A href="http://website.Data.html" target="_blank"&gt;http://website.Data.html&lt;/A&gt;&lt;BR /&gt; Status::&lt;A href="http://website.status.html" target="_blank"&gt;http://website.status.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;THe source looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;LI&gt;exnjpf10&lt;/LI&gt;&lt;BR /&gt; &lt;A href="https://community.hpe.com/exnjpf10.status.html" target="_blank"&gt; Status&lt;/A&gt; (219) &lt;BR /&gt;&lt;A href="http://bravura/cgi-bin/view.pl?Hostname=exnjpf10&amp;amp;BackupMethod=Da&amp;lt;BR /&amp;gt;ta&amp;amp;Database=Active" target="_blank"&gt;View Database&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.hpe.com/exnjpf10.last.Exchange.html" target="_blank"&gt; Last Exchange Backup&lt;/A&gt; (UNKNOWN)&lt;BR /&gt; &lt;BR /&gt; nyovdlt2/epmnj7prod2</description>
      <pubDate>Tue, 01 May 2007 22:32:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043642#M93251</guid>
      <dc:creator>jmckinzie</dc:creator>
      <dc:date>2007-05-01T22:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Perl LWP help....</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043643#M93252</link>
      <description>I had to add a cookie container:&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Jan 2008 15:20:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-lwp-help/m-p/5043643#M93252</guid>
      <dc:creator>jmckinzie</dc:creator>
      <dc:date>2008-01-31T15:20:26Z</dc:date>
    </item>
  </channel>
</rss>

