package bing;
import tool.*;
public class pro {
String data=new String[5000];
String phrase=new String[5000];
String word=new String[5000];
int s,sx,datanumber,creditnumber,wordnumber;
String urlx;
String str1,str,strx;
public static void main(String args) {
pro test=new pro();
}
pro(){
String sss;
sss="れな&SKE";
makeutf sub5=new makeutf();
sss=sub5.makedata(sss);
urlx="http://www.bing.com/search?q="+sss+"&go=&qs=n&form=QBLH&filt=all&pq="+sss+"&sc=0-6&sp=-1&sk=";
str1="件の検索結果";
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
str="";
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf(str1)>-1)str=data[s];
}
divide sub2=new divide();
sub2.makedata(str);
phrase=sub2.phrase;
creditnumber=sub2.creditnumber;
sx=0;
for(s=1;s<creditnumber+1;s++){
str=phrase[s];
if(str.length()>1)sx=sx+1;
if(str.length()>1)word[sx]=phrase[s];
}
wordnumber=sx;
strx="";
for(s=1;s<wordnumber+1;s++){
strx=strx+word[s];
}
System.out.println(count(strx,"松井玲奈"));
}
int count(String str,String sp){
int p1,c1;
c1=0;
p1=str.indexOf(sp);
if(p1>-1)c1=c1+1;
while(p1>-1){
p1=str.indexOf(sp,p1+1);
if(p1>-1)c1=c1+1;
}
return c1;
}
}