[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: URLs aus über 200.000 Dateien extr ahieren



Am 2005-05-10 15:43:25, schrieb Uwe A. P. Wuerdinger:

> Hm das sollte sich mit n paar zeilen perl oder python erledigen lassen

Also in Perl habe ich das gefunden:

  __( manpage 'HTML::LinkExtor' )_______________________________________
 /
| HTML::LinkExtorUser Contributed Perl DocumentatHTML::LinkExtor(3)
| 
| NAME
|        HTML::LinkExtor - Extract links from an HTML document
| 
| SYNOPSIS
|         require HTML::LinkExtor;
|         $p = HTML::LinkExtor->new(&cb, "http://www.perl.org/";);
|         sub cb {
|             my($tag, %links) = @_;
|             print "$tag @{[%links]}n";
|         }
|         $p->parse_file("index.html");
| 
| 
| DESCRIPTION
|        HTML::LinkExtor is an HTML parser that extracts links from
|        an HTML document.  The HTML::LinkExtor is a subclass of
|        HTML::Parser. This means that the document should be given
|        to the parser by calling the $p->parse() or
|        $p->parse_file() methods.

<snip>

| 2001-03-26                 perl v5.6.0         HTML::LinkExtor(3)
 \______________________________________________________________________

nur verstehe ich garnichts davon...

Ich weis ja, das man diverse Funktionen mit "perl ..." direkt
in BASH Scripte aufrufen kann, nur weis ich nicht wie...

Programmierst Du in Perl ?

Also wie gesagt, jedesmal wenn eine Datei an das Script übergeben
wird, muß es die URL's extrahieren und dann an eine Datei anhängen.

Sortieren, Unifizieren und Aussondern kömmt später.

> gruss Uwe

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: