python画像が存在するかどうかをテスト
2333 ワード
import requests;
import xlrd;
excel_data = xlrd.open_workbook('img_url.xls');
table = excel_data.sheets()[0];
nrows = table.nrows;
i=0;
while i
2.テストデータ
/upload/old_goods_img/201612/thumb_img/45380_thumb_G_1482778712042.jpg
/upload/old_goods_img/201612/source_img/45380_G_1482778712529.jpg
/upload/old_goods_img/201612/thumb_img/45351_thumb_G_1482705444363.jpg
/upload/old_goods_img/201612/source_img/45351_G_1482705444473.png
/upload/old_goods_img/201612/thumb_img/45325_thumb_G_1482536460716.jpg
/upload/old_goods_img/201612/source_img/45325_G_1482536460417.jpg
/upload/old_goods_img/201612/thumb_img/45299_thumb_G_1482373728832.jpg
/upload/old_goods_img/201612/source_img/45299_G_1482373728254.jpg
/upload/old_goods_img/201612/thumb_img/45296_thumb_G_1482362585652.jpg
/upload/old_goods_img/201612/source_img/45296_G_1482362585707.jpg
/upload/old_goods_img/201612/thumb_img/45295_thumb_G_1482362049477.jpg
/upload/old_goods_img/201612/source_img/45295_G_1482362049852.jpg
/upload/old_goods_img/201612/thumb_img/45294_thumb_G_1482361774835.jpg
/upload/old_goods_img/201612/source_img/45294_G_1482361774772.jpg
/upload/old_goods_img/201612/thumb_img/45293_thumb_G_1482361396435.jpg
/upload/old_goods_img/201612/source_img/45293_G_1482361396102.png
/upload/old_goods_img/201612/thumb_img/45292_thumb_G_1482361005500.jpg
/upload/old_goods_img/201612/source_img/45292_G_1482361005848.jpg
/upload/old_goods_img/201612/thumb_img/45292_thumb_G_1482361005500.jpg
/upload/old_goods_img/201612/source_img/45292_G_1482361005848.jpg
/upload/old_goods_img/201612/thumb_img/45291_thumb_G_1482360527593.jpg
/upload/old_goods_img/201612/source_img/45291_G_1482360527704.jpg
/upload/old_goods_img/201612/thumb_img/45290_thumb_G_1482359891562.jpg
/upload/old_goods_img/201612/source_img/45290_G_1482359891845.jpg
/upload/old_goods_img/201612/thumb_img/45290_thumb_G_1482359891562.jpg
/upload/old_goods_img/201612/source_img/45290_G_1482359891845.jpg