アットウィキロゴ

dぉおp@

package music;
 
import tool.*;
import java.io.*;
 
public class pro {
 
    int s,datanumber;
    String[] data=new String[5000];
    String urlx;
   String[] artist=new String[5000];
     String[] link=new String[5000];
int week,month;
 
 String[][] subdata=new String[500][20];
 int number;
 
    public static void main(String[] args) {
        pro test=new pro();
    }
 
   pro(){
 
 
       int m,w;
 
 
  readfile sub6=new readfile();
    sub6.makedata("ren.txt","SJIS");
        link=sub6.data;
        number=sub6.datanumber;
 
 
 
 
       int tr;
 
    for(tr=1;tr<number;tr++){
 int n;
 
       for(n=1;n<6;n++){    
 
           urlx=link[tr];
           if(n>1)urlx=link[tr]+"/p/"+n+"/";
 
 
           getdata sub=new getdata();
    sub.makedata(urlx,"SJIS");
        data=sub.data;
        datanumber=sub.datanumber;
 
 
 
 writexml("data/"+tr+"("+n+")"+".txt");
 
       }
 
    }
 
 
 
 
} 
 
 
 
    void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
for(s=1;s<datanumber;s++){    
pw.println(data[s]);  
} 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
String change(String str){
 
        int n;
        for(n=1;n<11;n++){
        str=rev(str);    
        }
 
        str=str.replace(" ","");
 
        return str;
    }
 
 String rev(String str){
 
        if(str==null)str="";
 
        int p1=str.indexOf("<");
        int p2=str.indexOf(">",p1);
        String strx="";
        if(p2>-1)strx=str.substring(p1,p2+1);
        str=str.replace(strx,"");
 
        return str;
    }    
 
 
 
}
最終更新:2016年07月06日 10:31