Skip to content

Commit

Permalink
why do I always forget some lines? sorry...
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3368 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
karlchenofhell committed Feb 14, 2007
1 parent e6ddf13 commit b2a9d32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions htroot/CrawlURLFetch_p.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import de.anomic.plasma.plasmaCrawlProfile;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverSwitch;
import de.anomic.data.wikiCode;
import de.anomic.http.httpHeader;
import de.anomic.http.httpc;
import de.anomic.server.serverObjects;
import de.anomic.server.logging.serverLog;
import de.anomic.yacy.yacyCore;
import de.anomic.yacy.yacySeed;
import de.anomic.yacy.yacyVersion;

public class CrawlURLFetch_p {

Expand All @@ -37,8 +37,6 @@ public class CrawlURLFetch_p {
private static final long STAT_THREAD_STOPPED = 1;
private static final long STAT_THREAD_PAUSED = 2;

public static final float MIN_PEER_VERSION_LIST_SERVLET = 0.504033F;

private static URLFetcher fetcher = null;
private static plasmaCrawlProfile.entry profile = null;
private static ArrayList savedURLs = new ArrayList();
Expand Down Expand Up @@ -212,7 +210,7 @@ private static int listPeers(serverObjects prop) {
prop.put("peersKnown", 1);
try {
TreeMap hostList = new TreeMap();
final Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, MIN_PEER_VERSION_LIST_SERVLET);
final Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, yacyVersion.YACY_PROVIDES_CRAWLS_VIA_LIST_HTML);
while (e.hasMoreElements()) {
yacySeed seed = (yacySeed) e.nextElement();
if (seed != null) hostList.put(seed.get(yacySeed.NAME, "nameless"),seed.hash);
Expand Down Expand Up @@ -340,7 +338,7 @@ private URL getDLURL() {

// choose random seed
yacySeed ys = null;
Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, MIN_PEER_VERSION_LIST_SERVLET);
Enumeration e = yacyCore.seedDB.seedsConnected(true, false, null, yacyVersion.YACY_PROVIDES_CRAWLS_VIA_LIST_HTML);
int num = new Random().nextInt(yacyCore.seedDB.sizeConnected()) + 1;
Object o;
for (int i=0; i<num && e.hasMoreElements(); i++) {
Expand Down Expand Up @@ -416,7 +414,7 @@ private String[] getURLs(URL url) {
String encoding = res.responseHeader.getCharacterEncoding();

if (encoding == null) encoding = "US-ASCII";
r = parseText(wikiCode.deReplaceHTMLEntities(new String(cbs, encoding)));
r = parseText(new String(cbs, encoding));
}
httpc.returnInstance(con);
} catch (IOException e) { }
Expand Down
1 change: 1 addition & 0 deletions source/de/anomic/yacy/yacyVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ public final class yacyVersion {
public static final float YACY_SUPPORTS_GZIP_POST_REQUESTS = (float) 0.40300772;
public static final float YACY_ACCEPTS_RANKING_TRANSMISSION = (float) 0.414;
public static final float YACY_HANDLES_COLLECTION_INDEX = (float) 0.486;
public static final float YACY_PROVIDES_CRAWLS_VIA_LIST_HTML = (float) 0.50403367;
}

0 comments on commit b2a9d32

Please sign in to comment.