2012-03-28 9 views

答えて

0

私は過去2年間、ナッチコードベースで作業していますが、これまで見てきたことはありません。コンテンツがナチュラルセグメントに入ると、ドロップダウンメニューやナビゲーションなどの部分を取り除き、必要なものだけを残しておくことができます。

あなたや他の誰かが(コードを変更せずに)それを行う方法を知っている場合は、同じものを共有してください。

1

これを行う必要がある場合に備えて、その場合に備えて、https://issues.apache.org/jira/browse/NUTCH-585にあるblacklist_whitelistプラグインを試すこともできます。

プラグインを使用すると、ブロックまたは許可する要素のリストを持つことができますが、両方ではできません。 例:

<property> 
    <name>parser.html.blacklist</name> 
    <value>noscript,div,#footer</value> 
    <description> 
    A comma-delimited list of css like tags to identify the elements which should 
    NOT be parsed. Use this to tell the HTML parser to ignore the given elements, e.g. site navigation. 
    It is allowed to only specify the element type (required), and optional its class name ('.') 
    or ID ('#'). More complex expressions will not be parsed. 
    Valid examples: div.header,span,p#test,div#main,ul,div.footercol 
    Invalid expressions: div#head#part1,#footer,.inner#post 
    Note that the elements and their children will be silently ignored by the parser, 
    so verify the indexed content with Luke to confirm results. 
    Use either 'parser.html.blacklist' or 'parser.html.whitelist', but not both of them at once. If so, 
    only the whitelist is used. 
    </description> 
</property> 
関連する問題