Smaug has asked for the wisdom of the Perl Monks concerning the following question:
called serials.txt13XGK4J 9KJDK4J CNOR665J74445994CNTS 3RT1K4J
use strict; use warnings; use LWP::Simple; use Data::Dumper; use HTML::HeadParser; #use HTML::Miner; #use HTML::Tree; my $URL; my $head; open (DELLSERIALS, 'serials.txt'); while (<DELLSERIALS>) { chomp; print "<<<Now checking $_>>>\n"; my $funky = "http://www.dell.com/support/troubleshooting/ed/en/edb +sdt1/Servicetag/" . $_; $URL = get("$funky"); $head = HTML::HeadParser->new; $head->parse("$URL"); # print Dumper($head); print $head->header('x-meta-supportservicetag') . "\n"; print $head->header('x-meta-supportproductcode') . "\n"; } close (DELLSERIALS);
$VAR1 = { 'warranty' => {'NBD ProSupport for Enterprise' => '02/12/201 +2', 'Next Business Day' => '02/12/2012' }, 'model' => 'Latitude E6500', 'serial' => '13XGK4J ' };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Retrieve select information from HTML
by Anonymous Monk on Jul 19, 2013 at 01:13 UTC | |
|
Re: Retrieve select information from HTML
by Anonymous Monk on Jul 19, 2013 at 02:37 UTC | |
|
Re: Retrieve select information from HTML
by Preceptor (Deacon) on Jul 18, 2013 at 19:20 UTC | |
|
Re: Retrieve select information from HTML
by poj (Abbot) on Jul 19, 2013 at 07:12 UTC |