package iju;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[40000];
String[] name=new String[40000];
String[] code=new String[40000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
readfile sub7=new readfile();
sub7.makedata("2016.csv","UTF-8");
data=sub7.data;
datanumber=sub7.datanumber;
String str="";
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
name[s-1]=x[5];
code[s-1]="";
if(x.length>9)code[s-1]=x[9];
}
int delta=datanumber-1;
int tr=1;
for(tr=1;tr<delta+1;tr++){
String word="moviewalker"+" "+name[tr];
makeutf sub6=new makeutf();
String d=sub6.makedata(word);
if(code[tr].length()<1){
String urlx="https://www.bing.com/search?q=";
urlx=urlx+d;
getdata sub47=new getdata();
sub47.makedata(urlx,"UTF-8");
data=sub47.data;
datanumber=sub47.datanumber;
String ss="aria-label=\"検索結果";
str="";
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf(ss)>-1)str=data[s];
}
String[] x=str.split(">");
String d2="movie.walkerplus.com/mv";
String pp="";
for(s=0;s<x.length;s++){
int h=0;
if(x[s].indexOf(d2)>-1)h=h+1;
if(pp.length()==0)h=h+1;
if(h==2)pp=x[s];
}
int p1=pp.indexOf("/mv");
int p2=pp.indexOf("/",p1+1);
if(p1>-1)pp=pp.substring(p1+1,p2);
code[tr]=pp;
}
System.out.println(tr+","+code[tr]);
}
}
}
最終更新:2016年08月11日 09:30