import requests
from lxml import etree  
import osi=0  
headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36"}
for x in range(1,11):html="https://www.zerochan.net/Yukinoshita+Yukino?p="+str(x)   r=requests.get(html,headers=headers)  html=etree.HTML(r.text)root="F://z yukinoshita/"  if not os.path.exists(root):    os.mkdir(root)  	 url=html.xpath('//*[@id="thumbs2"]/li/a/img/@src')  z=len(url)for y in range(0,z):html_1="https://static.zerochan.net/Yukinoshita.Yukino.full."+url[y].split('/')[-1]image_name=html_1.split('/')[-1]    path=root+image_name     try:if not os.path.exists(path):       with open(path,'wb') as f:   con=requests.get(html_1)    f.write(con.content)	 i=i+1print("爬取成功"+str(i))else:i=i+1print("文件已存在"+str(i))		except:    i=i+1print("爬取失败"+str(i))