アットウィキロゴ

k6

package allc;
 
import tool.*;
import java.io.*;
 
public class pro {
 int s,datanumber;
String[] data=new String[5000];
String[] name=new String[5000];
int number;
String str="";    
 
 
    public static void main(String[] args) {
        pro r=new pro();
    }
    pro(){
 
 
        int tr;
 
           readfile sub4=new readfile();
        sub4.makedata("moc.txt","UTF-8");
        data=sub4.data;
        datanumber=sub4.datanumber; 
 
        for(s=2;s<datanumber+1;s++){
        String[] y=data[s].split(",");
        if(y.length>1)name[s-1]=y[1];
 
        }
 
        number=datanumber-1;
 
        for(tr=1;tr<number+1;tr++){
 
        String urlx=name[tr];
 
 
 
        getdata sub47=new getdata();
        sub47.makedata(urlx,"EUC-JP");
        data=sub47.data;
        datanumber=sub47.datanumber; 
 
        str="";
        for(s=1;s<datanumber+1;s++){
        if(data[s].indexOf("allcinema ONLINE オールシネマ 映画&DVDデータベース")>-1)str=data[s];
 
        }
 
 
 
        writexml("data/"+tr+".txt");
 
    }
 
 
    }
 
 
       void writexml(String file){ 
 
    int s,sx;
 
try{ 
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file))); 
 
 
   pw.println(str); 
 
 
 
 
 
System.out.println("ファイルに書きこみました。"); 
pw.close(); 
} catch(IOException ep){ System.out.println("入出力エラーです。"); } 
 
 
} 
 
 
}
 
最終更新:2016年08月20日 22:45