vimeo-download icon indicating copy to clipboard operation
vimeo-download copied to clipboard

Http Error 410 Code

Open wollie83 opened this issue 4 years ago • 0 comments

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)

wollie83 avatar Nov 04 '20 22:11 wollie83