vimeo-download
vimeo-download copied to clipboard
Http Error 410 Code
my code for manage the 410 http error:
get the content
resp = requests.get(master_json_url)
if resp.status_code != 200:
if resp.status_code == 410:
print('HTTP error (410 Gone)')
quit(0)
else:
match = re.search('<TITLE>(.+)<\/TITLE>', resp.content, re.IGNORECASE)
title = match.group(1)
print('HTTP error (' + str(resp.status_code) + '): ' + title)
quit(0)