protected void search(String fileName){
		
		startOutput(fileName);
		
		while(!cobweb.getUnsearchQueue().isEmpty()){
			final WebPage srb = cobweb.peekUnsearchQueue();// 查找列隊
			
			//初使節點
			if(srb.getDepth() == 1){
				try {
					forefathersNodeFileWriter.write(srb.getUrl() + " ,level=" + srb.getDepth() + "\r\n");
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			
			if (!cobweb.isSearched(srb.getUrl())) {
				if(srb.getDepth() <= getMaxSpyDepth()){
					//
					try {
						WebPage tmpWp = processHtml(srb.getUrl(), srb.getDepth());
						
					} catch (ParserException e) {
						e.printStackTrace();
					} catch (Exception e) {
						e.printStackTrace();
					}
				}

				count++;
				if(count%100 == 0){
					System.out.println("尚未探勘數目: "+cobweb.getUnsearchQueue().size());
					System.gc();
				}
			}
		}
		
		closeOutput();
		
	}