アットウィキロゴ

dlx4

package y;
 
import tool.*;
 
public class pro {
 
 
 
 
     int s,datanumber;
String[] data=new String[5000];
 
String[][] delta=new String[500][160];
String[] week=new String[500];
String[][] date=new String[500][160];
String[][] point=new String[500][160];
String[] title=new String[500];
String[] sta=new String[500];
 
int number;
String[] subdata=new String[5000];
 
    public static void main(String[] args) {
      pro t=new pro();
    }
 
    pro(){
 
        int tr;
    for(tr=1980;tr<2000;tr++){    
    String urlx="http://1st.geocities.jp/june_2007_taste/"+tr+"02.html";
 
 
   getdata sub2=new getdata();
   sub2.makedata(urlx,"EUC-JP");
   data=sub2.data;
   datanumber=sub2.datanumber;
 
    String str="";
   for(s=1;s<datanumber+1;s++){
   str=str+data[s];
   } 
 
   String[] x=str.split("</TR>");
 
   int sx;
   for(s=0;s<x.length;s++){
 
   String[] y=x[s].split("</TD>");
   for(sx=0;sx<100;sx++){
   delta[s][sx]="";    
   }
   for(sx=0;sx<y.length;sx++){
   y[sx]=y[sx].replace("<TD>", "");
   y[sx]=y[sx].replace("<br>", "");
   y[sx]=y[sx].replace("<TD WIDTH=30>", "");
    delta[s][sx]=y[sx];  
   }
   }
 
 
   for(s=0;s<x.length;s++){
   int p1=delta[s][0].indexOf("<BIG>");   
   int p2=delta[s][0].indexOf("</BIG>");
week[s]="";
   if(p1>-1)week[s]=delta[s][0].substring(p1+5,p2);
   title[s]="";
   sta[s]="";
   if(week[s].length()<1)title[s]=delta[s][1];
    if(week[s].length()<1)sta[s]=delta[s][0];
   for(sx=0;sx<28;sx++){
   if(week[s].length()<1)date[s][sx]="";
   if(week[s].length()>0)date[s][sx]=delta[s][sx];
   if(week[s].length()<1)point[s][sx]=delta[s][sx];
   }
   }
 
   for(s=0;s<x.length;s++){
   if(title[s].length()>0)week[s]=week[s-1];
   for(sx=2;sx<28;sx++){
   if(title[s].length()>0)date[s][sx]=date[s-1][sx];
   }
   }
 
   int h;
   number=0;
   for(s=1;s<x.length;s++){
   for(sx=2;sx<28;sx++){
   h=0;
   if(title[s].length()>0)h=h+1;
   if(date[s][sx].length()>0)h=h+1;
   if(h==2)number=number+1;
   if(h==2)subdata[number]=title[s]+","+sta[s]+","+week[s]+","+date[s][sx]+","+point[s][sx];
   }  
   }
 
 
   writefile sub3=new writefile();
   sub3.data=subdata;
   sub3.datanumber=number;
   sub3.makedata("data/"+tr+".txt");
 
    }
 
 
 
 
 
    }
 
 
 
}
 
最終更新:2016年07月23日 10:03