package p3;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[5000];
String[] book=new String[5000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
String urlx="http://yanagibashi.blogspot.jp/search/label/%E8%AA%AD%E3%81%BF%E3%81%9F%E3%81%84%E6%9C%AC";
int tx=0;
int mode=0;
while(mode<50){
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf("post-title entry-title")>-1)tx=tx+1;
if(data[s].indexOf("post-title entry-title")>-1)book[tx]=data[s+1];
}
int h;
String web="";
for(s=1;s<datanumber+1;s++){
h=0;
if(data[s].indexOf("http://yanagibashi.blogspot.jp/")>-1)h=h+1;
if(data[s].indexOf("前の投稿")>-1)h=h+1;
if(h==2)web=data[s];
}
if(web.length()<4)mode=100;
if(web.length()>0){
int p1=web.indexOf("http");
int p2=web.indexOf("'",p1);
urlx=web.substring(p1,p2);
}
}
for(s=1;s<tx+1;s++){
int p1=book[s].indexOf(">");
int p2=book[s].indexOf("<",p1);
book[s]=book[s].substring(p1+1,p2);
System.out.println(book[s]);
}
}
}
最終更新:2016年11月25日 12:34