class makedate{
String[] article=new String[50000];
String[] date=new String[50000];
int s,articlenumber;
String str;
int p1;
void makedata(String urlx){
article ar=new article();
ar.makedata(urlx);
article=ar.article;
articlenumber=ar.articlenumber;
for(s=1;s<articlenumber+1;s++){
str=edittime(article[s]);
str=edita(str);
str=editc(str);
date[s]=str;
}
}
String editc(String str){
String dx;
dx=str.replace("</font>","");
dx=dx.replace("</b>","");
dx=dx.replace("</a>","");
p1=dx.indexOf(":");
dx=dx.substring(p1+1,dx.length());
return dx;
}
String edita(String str){
int p1,p2;
String str1,word,dx;
p1=str.indexOf("</font>");
word="";
if(p1>0)word=str.substring(0,p1);
dx=str.replace(word,"");
p1=dx.indexOf("ID");
if(p1>0)dx=dx.substring(0,p1);
p1=dx.indexOf("</b>");
if(p1>0)dx=dx.substring(p1,dx.length());
return dx;
}
String edittime(String str){
String str1,str2,str3,dx;
int h,p1,p2,p3;
str1="<dt> ";
str2="</dt>";
p1=str.indexOf(str1);
p2=str.indexOf(str2,p1);
dx=str.substring(p1+4,p2);
return dx;
}
}
最終更新:2011年07月17日 15:28