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")