アットウィキロゴ

5LDK2

package music;
import java.io.*;
 
public class pro {
 
       int s,datanumber;
    String[] data=new String[3600];
 
  String[] name=new String[3600];
      String[] memo=new String[5000];
 int[] point=new int[6000];
 
 
    public static void main(String[] args) {
       pro te=new pro();
    }
    pro(){
 
readx("data.csv");        
 
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
String[] z=x[2].split("、");
int sx;
for(sx=0;sx<z.length;sx++){
bing sub=new bing();
String n=sub.makedata(z[sx]);
chevk sub2=new chevk();
String n1=sub2.makedata(n);
System.out.println(data[s]+","+z[sx]+","+n+","+n1); 
}
}
 
 
 
 
}
 
     void readx(String file){
 
String str;
BufferedReader br;  
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));  
while((str = br.readLine()) != null) {  
s=s+1;
data[s]=str;  
}
br.close();
} catch (IOException e) {System.out.println(e);}  
 
datanumber=s;
 
} 
 
 
 
}
 
 
 
package music;
 
import tool.*;
 
public class bing {
 
    int s,datanumber;
    String[] data=new String[6000];
 
 
 
 
    String makedata(String w2){
 
        String word=w2+" site:oricon.co.jp/prof/";
 
        makeutf sub6=new makeutf();
        String d=sub6.makedata(word);
 
 
           String urlx="https://www.bing.com/search?q=";
           urlx=urlx+d;
 
 
        getdata sub7=new getdata();
        sub7.makedata(urlx,"UTF-8");
        data=sub7.data;
        datanumber=sub7.datanumber; 
 
        String ss="aria-label=\"検索結果";
 
        String str="";
 
        for(s=1;s<datanumber+1;s++){
 
        if(data[s].indexOf(ss)>-1)str=data[s];
 
        } 
 
 
 
 
         String[] x=str.split(">");
 
        String d2="http://www.oricon.co.jp/";
        String pp="";
 
        String[] ps=new String[500];
 
        int sx=0;
     for(s=0;s<x.length;s++){   
     int h=0;
    if(x[s].indexOf(d2)>-1)h=h+1;
    if(x[s].indexOf("/prof/")>-1)h=h+1;
     if(h==2)sx=sx+1;
    if(h==2)ps[sx]=x[s];
 
     }
 int number=sx; 
     for(s=1;s<number+1;s++){
     int p1=ps[s].indexOf("http");
      int p2=ps[s].indexOf("\"",p1);
      ps[s]=ps[s].substring(p1,p2);
    }
 
     String delta="";
 
     String mm="";
    for(s=1;s<number+1;s++){
     ps[s]=ps[s].replace("/artist","");
        int p1=ps[s].indexOf("prof/");
    p1=ps[s].indexOf("/",p1);
   int p2=ps[s].indexOf("/",p1+1);
   if(p2>-1)mm=ps[s].substring(p1+1,p2);
 
   int h=0;
    if(delta.length()<1)h=h+1;
    if(mm.length()>2)h=h+1;
    if(h==2)delta=mm;
    } 
 
 return delta;
 
 
 
    }   }
 
package music;
 
import tool.getdata;
 
 
public class chevk {
 
     int s,datanumber;
    String[] data=new String[6000];
 
    String makedata(String gid){
 
 
           String urlx="http://www.oricon.co.jp/prof/";
           urlx=urlx+gid+"/";
 
 
        getdata sub7=new getdata();
        sub7.makedata(urlx,"SJIS");
        data=sub7.data;
        datanumber=sub7.datanumber; 
 
        String de="";
     for(s=1;s<datanumber+1;s++){
     if(data[s].indexOf("artist-link")>-1)de=data[s];    
     }
 
     int p1=de.indexOf(">");
        int p2=de.indexOf("<",p1); 
        if(p1>-1)de=de.substring(p1+1,p2);
 
 return de;       
    }
 
}
 
最終更新:2016年08月18日 08:24