Author: j16sdiz
Date: 2008-12-11 08:40:24 +0000 (Thu, 11 Dec 2008)
New Revision: 24200
Modified:
trunk/plugins/XMLSpider/XMLSpider.java
Log:
even more badlist extension
Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java 2008-12-11 08:40:14 UTC (rev
24199)
+++ trunk/plugins/XMLSpider/XMLSpider.java 2008-12-11 08:40:24 UTC (rev
24200)
@@ -194,31 +194,26 @@
private boolean stopped = true;
PluginRespirator pr;
+ private final static String[] BADLIST_EXTENSTION = new String[] {
+ ".ico", ".bmp", ".png", ".jpg", ".gif", // image
+ ".zip", ".jar", ".gz" , ".bz2", ".rar", // archive
+ ".7z" , ".rar", ".arj", ".rpm", ".deb",
+ ".xpi", ".ace", ".cab", ".lza", ".lzh",
+ ".ace",
+ ".exe", ".iso",
// binary
+ ".mpg", ".ogg", ".mp3", ".avi", // media
+ ".css", ".sig"
// other
+ };
+
/**
* Adds the found uri to the list of to-be-retrieved uris. <p>Every usk
uri added as ssk.
* @param uri the new uri that needs to be fetched for further indexing
*/
public synchronized void queueURI(FreenetURI uri, String comment) {
String sURI = uri.toString();
- if (sURI.endsWith(".png") ||
- sURI.endsWith(".jpg") ||
- sURI.endsWith(".css") ||
- sURI.endsWith(".gif") ||
- sURI.endsWith(".zip") ||
- sURI.endsWith(".jar") ||
- sURI.endsWith(".tar.gz") ||
- sURI.endsWith(".tar.bz2") ||
- sURI.endsWith(".tbz2") ||
- sURI.endsWith(".tgz") ||
- sURI.endsWith(".tar") ||
- sURI.endsWith(".exe") ||
- sURI.endsWith(".rar") ||
- sURI.endsWith(".7z") ||
- sURI.endsWith(".avi") ||
- sURI.endsWith(".ico") ||
- sURI.endsWith(".xpi") ||
- sURI.endsWith(".iso"))
- return; // be smart
+ for (String ext : BADLIST_EXTENSTION)
+ if (sURI.endsWith(ext))
+ return; // be smart
if (uri.isUSK()) {
if(uri.getSuggestedEdition() < 0)
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs