发错了求删帖
本帖最后由 tianyamingyue 于 2020-6-15 06:12 编辑import requests
import re
import os
a='http://www.001photo.com/900/latest.asp'
header={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3314.0 Safari/537.36 SE 2.X MetaSr 1.0',
'Referer':'http://www.001photo.com/'}
b=requests.get(a,headers=header).content
c=b.decode('gb2312',errors = 'ignore')
d=set(re.findall(r'/900/photoshow.asp\?id=\d{6}',c))
print(d)
x=1
for e in d:
f='http://www.001photo.com/'+e
g=requests.get(f,headers=header).content
h=g.decode('gb2312',errors='ignore')
j=set(re.findall(r'/upload/img/small/2020/\d/\w*?-\d{12,13}-001photo.jpg',h))
print(j)
x+=1
i=1
for m in j:
k=m.replace('small/','')
z='http://www.001photo.com'+k
y=requests.get(z).content
filename='e:\ '+str(i)+'2020.6'+str(x)+'.jpg'
with open(filename,'wb')as f:
f.write(y)
print('正在打印第'+str(x)+str(i)+'张照片')
i+=1 请使用代码格式发送! Please send in code format! 求版主删帖,发错了,不知道怎么删。 tianyamingyue 发表于 2020-6-14 08:02
求版主删帖,发错了,不知道怎么删。
为啥要删帖呢?
(原帖子是可以直接编辑的,把标题改成“发错了,求版主删帖”,即可)
页:
[1]