python--爬取网页存在某字符

from time import sleep
import requests
url="http://192.168.8.197:8084/shop?page="
for i in range(1,500):
    r=requests.get(url+str(i))
    sleep(0.1)
    if 'lv6.png' in r.text:
        print(i)
        break
    else:
        print(url+str(i)+"| no")

 

posted @ 2021-01-13 09:44  包子TT  阅读(254)  评论(0编辑  收藏  举报