アットウィキロゴ

besuto10

package best;
 
import tool.*;
 
public class pro {
 
 
    String[] data=new String[5000];
    int datanumber;
      String[] artist=new String[5000];
         String[] title=new String[5000];
 
 
 
    public static void main(String[] args) {
        pro t=new pro();
    }
    pro(){
 
 String urlx="http://www.north-tt.com/01_record/01_bestten.php?rb=0&re_rk=bt&re_ymd=http://www.north-tt.com/01_record/01_bestten.php?rb=0&re_rk=bt&re_ymd=19780112";
 
   getdata sub=new getdata();
   sub.makedata(urlx,"UTF-8");
   data=sub.data;
   datanumber=sub.datanumber;
 
 
   int s;
 
   String pp="BSテレビ ザ・ベストテン";
 
 
   int s1=0;
   for(s=1;s<datanumber+1;s++){
   if(data[s].indexOf(pp)>-1)s1=s;    
   System.out.println(data[s]);
   }
 
 
   int s2=0;
   for(s=s1;s<datanumber+1;s++){
   int h=0;
  if(data[s].indexOf("</table>")>-1)h=h+1;
  if(s2==0)h=h+1;
  if(h==2)s2=s; 
   }
 
   String str="";
   for(s=s1;s<s2;s++){
  str=str+data[s];
   }
 
   String[] x=str.split("</tr>");
 
   int sx;
 
   for(s=1;s<11;s++){
       String[] y=x[s].split("</td>");
   artist[s]=y[2];
   title[s]=y[1];
   System.out.println(artist[s]+"△"+title[s]);
 
   }
 
 
 
 
 
 
 
    }
 
 
 
 
}
 
最終更新:2016年02月08日 19:06