import requests

def exists(path):
r = requests.head(path)
return r.status_code == requests.codes.ok

url='url='https://static01.nyt.com/images/2021/08/25/us/politics/25dc-lawmakers1/merlin_158041143_78d36ee5-264a-4431-b384-13d19ae386ec-superJumbo.jpg'
if (exists(url)):
print ('OK')
else:
print ('not exists:'+url)