package sei;
import tool.*;
public class pro {
int s,datanumber,number;
String[] data=new String[6000];
String[] name=new String[6000];
String[] rank=new String[6000];
String[] subdata=new String[6000];
String[] link=new String[6000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
readfile sub8=new readfile();
sub8.makedata("memo.txt","UTF-8");
link=sub8.data;
number=sub8.datanumber;
int tr;
for(tr=1;tr<number+1;tr++){
String urlx=link[tr];
getdata sub7=new getdata();
sub7.makedata(urlx,"UTF-8");
data=sub7.data;
datanumber=sub7.datanumber;
String str="";
for(s=1;s<datanumber+1;s++){
str=str+data[s];
}
int sx;
String[] x=str.split("</tr>");
for(s=1;s<x.length-1;s++){
String[] y=x[s].split("</td>");
name[s]="";
rank[s]="";
for(sx=0;sx<y.length;sx++){
if(sx==1)name[s]=change(y[sx]);
if(sx==0)rank[s]=change(y[sx]);
}
subdata[s]=rank[s]+","+name[s];
}
datanumber=x.length;
subdata[datanumber]=link[tr];
writefile sub2=new writefile();
sub2.data=subdata;
sub2.datanumber=datanumber;
sub2.makedata("data/"+tr+".txt");
}
}
String change(String str){
int n;
for(n=1;n<11;n++){
str=rev(str);
}
return str;
}
String rev(String str){
if(str==null)str="";
int p1=str.indexOf("<");
int p2=-1;
if(p1>-1)p2=str.indexOf(">",p1);
String strx="";
if(p2>-1)strx=str.substring(p1,p2+1);
if(p2>-1) str=str.replace(strx,"△");
return str;
}
}
最終更新:2016年08月24日 15:43