1

我正在使用 Heritrix3,我们试图从使用 a 抓取的 URI 集中排除图像、视频和档案MatchesListRegexDecideRule,我已将其设置在 crawler-beans.cxml 配置文件中,该文件在创建作业时在启动时创建:

<bean class="org.archive.modules.deciderules.MatchesListRegexDecideRule">
<property name="decision" value="REJECT"/>
<!-- <property name="listLogicalOr" value="true" /> -->
<property name="regexList">
<list>
<!-- Exclude all images -->
<value>".*\.(jpeg|jpg|png|tiff|gif)$"</value>
<!-- Exclude all videos -->
<value>".*\.(mpg|webm|ogg|flv)$"</value>
<!-- Exclude all audio files -->
<value>".*\.(mp3|oga|wav)$"</value>
<!-- Exclude other files -->
<value>".*\.(iso|tar|gz|zip|rar|exe)$"</value>
</list>
</property>
</bean>

但是,这似乎不起作用:图像仍然出现在爬网日志中。有人对为什么会发生这种情况有任何建议吗?

4

0 回答 0