package c2;
import dpic.dpic;
import dpic.piccheck;
public class pro {
String urlx,str;
String pic[]=new String[10000];
String link[]=new String[10000];
int s,datanumber,linknumber;
public static void main(String[] args) {
pro test=new pro();
}
pro(){
urlx="http://yesmanga.co/gekkan-shonen-magazine/gekkan-shonen-magazine-chapter-01-2014/33129-14-mangaraw.html";
link sub2=new link();
sub2.makedata(urlx);
link=sub2.link;
linknumber=sub2.linknumber;
System.out.println(linknumber);
int page;
for(page=1;page<linknumber+1;page++){
pic sub=new pic();
pic[page]=sub.makedata(link[page]);
}
String file;
int ch;
for(page=1;page<linknumber+1;page++){
file="comic/"+page+".jpg";
piccheck sub5=new piccheck();
sub5.makedata(pic[page]);
ch=sub5.ch;
dpic sub6=new dpic();
if(ch<50)sub6.makedata(pic[page],file);
}
}
}
package c2;
import tool.*;
public class pic{
String str;
String data[]=new String[10000];
int s,datanumber;
String makedata(String urlx){
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
int s1,s2;
int h;
s1=0;
for(s=1;s<datanumber+1;s++){
h=0;
if(data[s].indexOf("</option>")>-1)h=h+1;
if(s1==0)h=h+1;
if(h==2)s1=s;
}
s2=0;
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf("</option>")>-1)s2=s;
}
str="";
for(s=s1;s<s2;s++){
if(data[s].indexOf("imageviewer")>-1)str=data[s];
}
int p1,p2;
p1=str.indexOf("imageviewer");
p1=str.indexOf("src=",p1);
p1=str.indexOf("http",p1);
p2=str.indexOf("\"",p1);
if(p2>0)str=str.substring(p1,p2);
return str;
}
}
package c2;
import tool.*;
public class link {
String data[]=new String[10000];
String subdata[]=new String[10000];
String link[]=new String[10000];
int s,datanumber;
int h,sx,subnumber,linknumber;
String str1,str2;
void makedata(String urlx){
getdata sub=new getdata();
sub.makedata(urlx,"UTF-8");
data=sub.data;
datanumber=sub.datanumber;
str1="</option>";
str2="<option value=\"http://yesmanga";
sx=0;
for(s=1;s<datanumber+1;s++){
h=0;
if(data[s].indexOf(str1)>-1)h=h+1;
if(data[s].indexOf(str2)>-1)h=h+1;
if(h==2)sx=sx+1;
if(h==2)subdata[sx]=data[s];
}
subnumber=sx;
int p1,p2;
for(s=1;s<subnumber+1;s++){
p1=subdata[s].indexOf("http");
p2=subdata[s].indexOf("\"",p1);
subdata[s]=subdata[s].substring(p1,p2);
}
linknumber=0;
for(s=1;s<subnumber+1;s++){
h=0;
for(sx=1;sx<linknumber+1;sx++){
if(subdata[s].equals(link[sx]))h=100;
}
if(h<50)linknumber=linknumber+1;
if(h<50)link[linknumber]=subdata[s];
}
}
}
最終更新:2013年12月06日 14:56