アットウィキロゴ

webVV

import java.io.*;
import java.net.URLEncoder;

class web{
  
String str,urlx;
int ch,ch1,ch2;
int page;
String[] link=new String[100];
String[] web=new String[10000];
int s,sx,linknumber,webnumber;

void makedata(String word){

point p=new point();
p.makedata(word);
ch1=p.ch1;
ch2=p.ch2;

if(ch2<1)ch=ch1;
if(ch2>0)ch=ch1+1;

sx=0;
for(page=1;page<ch+1;page++){

urlx="";

try{

str = URLEncoder.encode(word,"utf-8");

urlx="http://m.logsoku.com/search.jsp?query=";
urlx=urlx+str;
urlx=urlx+"&page=";
urlx=urlx+page;
}catch(Exception e) { System.err.println(e); }

link lk=new link();
lk.makedata(urlx);
linknumber=lk.linknumber;
link=lk.link;

for(s=1;s<linknumber+1;s++){
sx=sx+1;
web[sx]=link[s];
}

}

webnumber=sx;


}

}
最終更新:2011年07月19日 08:28