find()函数
def find_imgs(url):html =url_open(url).decode('gbk')
img_addrs = []
a = html.find('高清图片" src="') + 11
print(a)
while a != -1:
b = html.find('.jpg',a) + 4
if b != -1:
img_addrs.append(html)
print(html)
else:
b = a + 5
a = html.find('高清图片" src="',b) + 11
print(a)
return img_addrs
find()查找html文档索引到10000多怎么突然又变到10了 噢,我知道了。。。。它到-1后我又给它+了11{:10_269:}
页:
[1]