アットウィキロゴ

データ処理う

package calx;
 
import tool.*;
import java.util.Calendar;
 
public class pro {
 
    int s,datanumber;
String[] data=new String[5000];
String[] subdata=new String[5000];
    int y1,m1,d1,w1;
 int y2,m2,d2;
 
    public static void main(String[] args) {
        pro te=new pro();
    }
    pro(){
 
        int tr=200;
 
        for(tr=51;tr<2528;tr++){
 
        readfile sub=new readfile();
        sub.makedata("data/"+tr+".txt","UTF-8");
        data=sub.data;
        datanumber=sub.datanumber;
 
        int s1=0;
        for(s=1;s<datanumber+1;s++){
        int h=0;
        if(data[s].indexOf("<BR><BR>")>-1)h=h+1;
        if(s1==0)h=h+1;
        if(h==2)s1=s;    
        }
 
        if(s1>0){
 
        int s2=0;
        for(s=s1;s<datanumber+1;s++){
        int h=0;
        if(data[s].indexOf("<script async src=")>-1)h=h+1;
        if(s2==0)h=h+1;
        if(h==2)s2=s;        
        }
 
        String str="";
        str="";
        for(s=s1+1;s<s2;s++){
        str=str+data[s]; 
        }
        str=str.replace("<br />","△");
 
 
        String[] x=str.split("△");
 
        int sx=0;
        for(s=0;s<x.length;s++){
        sx=sx+1;
        subdata[sx]=x[s];    
        }
 
           writefile sub5=new writefile();
     sub5.data=subdata;
     sub5.datanumber=sx;
     sub5.makedata("tv/"+tr+".txt");
        }
 
 
        }
 
 
    }
 
 
 
 
 
 
}
 
最終更新:2016年07月20日 04:51