merge-requests/18/head
Bob Mottram 2021-02-14 14:05:51 +00:00
parent 783711b46f
commit e321cbd0e5
1 changed files with 4 additions and 1 deletions

View File

@ -72,10 +72,13 @@ def urlExists(session, url: str, timeoutSec=3,
result = session.get(url, headers=sessionHeaders,
params=sessionParams,
timeout=timeoutSec)
if result:
if result:
if result.status_code == 200 or \
result.status_code == 304:
return True
else:
print('urlExists for ' + url + ' returned ' +
str(result.status_code))
except BaseException:
pass
return False