package seiyu;
import tool.*;
public class select{
int s,datanumber;
String[] data=new String[5000];
String[] codex=new String[5000];
String[] code=new String[5000];
String[] name=new String[5000];
String[] y=new String[500];
String[] m=new String[500];
String[] d=new String[500];
String[] a=new String[500];
String[] namex=new String[5000];
String[] yx=new String[500];
String[] mx=new String[500];
String[] dx=new String[500];
int number;
void makedata(){
String str1="%20";
String id="1m8oymVzwk9rFX0738qyt8NBh_NV7W8i2acizXwcE";
String urlx="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT";
urlx=urlx+str1+"*"+str1+"FROM"+str1+id;
urlx=urlx+"&key=AIzaSyAH0WCAXRIdHdbI-6bnMSN4kVDDZZmGyqY";
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
String str="";
for(s=1;s<datanumber+1;s++){
str=str+data[s];
}
int p1=str.indexOf("rows");
p1=str.indexOf(":",p1);
str=str.substring(p1,str.length());
int sx;
int tx=0;
String[] x=str.split("],");
for(s=0;s<x.length;s++){
code[s+1]="";
String[] y1=x[s].split(",");
for(sx=0;sx<y1.length;sx++){
if(sx==0)code[s+1]=y1[sx];
}
}
number=x.length;
for(s=1;s<number+1;s++){
code[s]=cg(code[s]);
}
}
String cg(String c){
int p1=c.indexOf("\"");
int p2=c.indexOf("\"",p1+1);
if(p1>-1)c=c.substring(p1+1,p2);
return c;
}
}
package seiyu;
import tool.*;
public class pro {
int s,number;
String[] data=new String[5000];
String[] code=new String[5000];
String[] name=new String[5000];
String[] y=new String[500];
String[] m=new String[500];
String[] d=new String[500];
int datanumber;
int[][] point=new int[3000][11];
String[] dic_code=new String[5000];
String[] dic_name=new String[5000];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
int delta=0;
select sub=new select();
sub.makedata();
number=sub.number;
code=sub.code;
int tr=1;
for(tr=1;tr<number+1;tr++){
String urlx="http://lain.gr.jp"+code[tr];
getdata sub2=new getdata();
sub2.makedata(urlx,"UTF-8");
data=sub2.data;
datanumber=sub2.datanumber;
String pp=code[tr].replace("/mediadb/media/","");
writefile sub3=new writefile();
sub3.data=data;
sub3.datanumber=datanumber;
sub3.makedata("data/"+pp+".txt");
}
}
}
最終更新:2016年09月13日 17:36