7 lines
243 B
Python
7 lines
243 B
Python
import time,urllib.request
|
|
for i in range(10):
|
|
try:
|
|
with urllib.request.urlopen('https://im.bchongw.com/healthz',timeout=5) as r: print(i,r.status,r.read().decode())
|
|
except Exception as e: print(i,type(e).__name__,str(e))
|
|
time.sleep(.5)
|