Thread html parsen (7 answers)
Opened by Froschpopo at 2008-07-22 10:01

renee
 2008-07-22 11:54
#112432 #112432
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Das ganze mit CPAN:Web::Scraper:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use strict;
use warnings;
use Web::Scraper;

my $scraper = scraper {
  process 'div[class="p"]' => 'divs[]' => 'TEXT';
  result 'divs';
};

my $content = do{ local (@ARGV,$/) = 'bw.html'; <> };
my $res = $scraper->scrape( $content );

use Data::Dumper;
print Dumper $res;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread html parsen