package tv8;
import tool.*;
public class pro {
int number;
String[] name=new String[600];
String[] namex=new String[6000];
String[] namey=new String[6000];
int s;
String[] t=new String[4000];
String[] year=new String[4000];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
String id="1mP7sXTO9wnsJo-eejPGeKCiFkw7_QsNoFfgnAGmz";
rate sub2=new rate();
sub2.makedata(id);
t=sub2.t;
year=sub2.year;
int tr;
for(tr=1;tr<761;tr++){
id="1gkjWRqcnG7qnrHAUxilFFx0n5SOELqHYfQ3lwe5R";
drama sub=new drama();
sub.makedata(id,""+tr);
name=sub.name;
number=sub.number;
namex[tr]=name[1];
namey[tr]=name[2];
System.out.println(year[tr]+","+t[tr]+","+namex[tr]+","+namey[tr]);
}
}
}
package tv8;
import tool.*;
public class rate{
int s,datanumber;
String[] data=new String[4000];
String[] t=new String[4000];
String[] year=new String[4000];
int number;
void makedata(String id){
String str1="%20";
String urlx="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT";
urlx=urlx+str1+"*"+str1+"FROM"+str1+id+str1;
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];
}
str=str.replace("\"rows\": ","");
String[] x=str.split("],");
for(s=1;s<x.length;s++){
String[] y=x[s].split(",");
t[s]=y[2];
year[s]=y[0];
}
for(s=1;s<x.length;s++){
t[s]=cg(t[s]);
year[s]=cg(year[s]);
}
number=x.length-1;
}
String cg(String c){
int p1=c.indexOf("\"");
int p2=c.indexOf("\"",p1+1);
c=c.substring(p1+1,p2);
return c;
}
}
package tv8;
import tool.*;
public class drama{
int s,datanumber;
String[] data=new String[4000];
String[] name=new String[4000];
int number;
void makedata(String id,String code){
String str1="%20";
String urlx="https://www.googleapis.com/fusiontables/v1/query?sql=SELECT";
urlx=urlx+str1+"*"+str1+"FROM"+str1+id+str1;
urlx=urlx+str1+"where"+str1+"n="+code;
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];
}
str=str.replace("\"rows\": ","");
String[] x=str.split("],");
for(s=1;s<x.length;s++){
String[] y=x[s].split(",");
name[s]=y[2];
}
for(s=1;s<x.length;s++){
name[s]=cg(name[s]);
}
number=x.length-1;
}
String cg(String c){
int p1=c.indexOf("\"");
int p2=c.indexOf("\"",p1+1);
c=c.substring(p1+1,p2);
return c;
}
}
最終更新:2016年09月07日 10:22