package or;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[6000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
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;
}
System.out.println(delta);
}
}
最終更新:2016年08月15日 08:13