package com.chinada.dms.test.ysp;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
public class TestPicFZ {
public static void main(String[] args) throws IOException {
for(int a=10;a<99;a++){
String imageUrl="";
String aa=a+"";
/* if(aa.length()>=2){
// String str="http://img7x5.ddimg.cn/imgother10/72/3/1900717605_figure_0013_0001_epub.jpg";
imageUrl = "http://img7x5.ddimg.cn/imgother10/72/3/1900717605_figure_00"+a+"_0001_epub.jpg";
}*/
imageUrl = "http://img7x5.ddimg.cn/imgother10/72/3/1900717605_figure_00"+a+"_0001_epub.jpg";
/* else{
imageUrl = "http:///l/%E8%80%81%E5%A4%AB%E5%AD%90%E6%B0%B4%E6%B5%92%E4%BC%A0/%E7%AC%AC1%E5%9B%9E/0"+a+".png";
}*/
URL url = new URL(imageUrl);
DataInputStream dis = new DataInputStream(url.openStream());
String newImageName="D://image/"+a+".png";
FileOutputStream fos = new FileOutputStream(new File(newImageName));
byte[] buffer = new byte[1024];
int length;
while((length = dis.read(buffer))>0){
fos.write(buffer,0,length);
}
dis.close();
fos.close();
}
System.out.println("漫画数据抓取完毕!");
}
}
下载抓取-收费漫画-父与子
原创
©著作权归作者所有:来自51CTO博客作者小飞侠格鲁帅的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
















