- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Perl LWP help....
Operating System - Linux
1752800
Members
5769
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2007 08:15 AM
тАО05-01-2007 08:15 AM
Perl LWP help....
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.
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.
Netbackup Failures for last hours
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.
Netbackup Failures for last 24 hours as of May 1 10:00:00
For troubleshooting tips, click on Status. |
| Status (96) | View Database | Last Data Backup (02/14/2007) | >bhovdlt1 |
|
- Tags:
- Perl
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2007 08:53 AM
тАО05-01-2007 08:53 AM
Re: Perl LWP help....
Hi Jody:
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.
http://search.cpan.org/~gaas/libwww-perl-5.805/lib/LWP.pm
Regards!
...JRF...
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.
http://search.cpan.org/~gaas/libwww-perl-5.805/lib/LWP.pm
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2007 03:32 PM
тАО05-01-2007 03:32 PM
Re: Perl LWP help....
Yes, I have....
I also have ascript that parses using HTML::TReeBuilder however that is only getting anything with a tag.
I also need the data from the table...
Here is my script.
use HTML::TreeBuilder;
my $tree = HTML::TreeBuilder->new;
$tree->parse_file( 'website.html' ) || die $!;
my $base_url = 'http://website.html';
# for resolving relative URLs
foreach $i ($tree->parse_file) {
my $html =~ m{(.*?)};
}
foreach my $a ( $tree->find_by_tag_name('a') ) {
my $href = $a->attr('href') || next;
my $text_content = $a->as_text;
use URI;
print "$html::", "$text_content\::", URI->new_abs($href, $base_url),"\n";
}
It outputs this: (one for every table a ref)
View Database::http://website/view.pl?Hostname=soleng02&BackupMethod=Data&Database=Active
Last Data Backup::http://website.Data.html
Status::http://website.status.html
THe source looks like this:
exnjpf10
Status (219)
View Database
Last Exchange Backup (UNKNOWN)
nyovdlt2/epmnj7prod2
I also have ascript that parses using HTML::TReeBuilder however that is only getting anything with a tag.
I also need the data from the table...
Here is my script.
use HTML::TreeBuilder;
my $tree = HTML::TreeBuilder->new;
$tree->parse_file( 'website.html' ) || die $!;
my $base_url = 'http://website.html';
# for resolving relative URLs
foreach $i ($tree->parse_file) {
my $html =~ m{(.*?)};
}
foreach my $a ( $tree->find_by_tag_name('a') ) {
my $href = $a->attr('href') || next;
my $text_content = $a->as_text;
use URI;
print "$html::", "$text_content\::", URI->new_abs($href, $base_url),"\n";
}
It outputs this: (one for every table a ref)
View Database::http://website/view.pl?Hostname=soleng02&BackupMethod=Data&Database=Active
Last Data Backup::http://website.Data.html
Status::http://website.status.html
THe source looks like this:
Status (219)
View Database
Last Exchange Backup (UNKNOWN)
nyovdlt2/epmnj7prod2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2008 07:20 AM
тАО01-31-2008 07:20 AM
Re: Perl LWP help....
I had to add a cookie container:
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP