I've got a this simple function, that checks if a website exists:
def try_site(url):
request = requests.get(url)
return request.status_code == 200
The issue is, that for youtube urls, that don't have videos, there still exists a page -- it doesn't return 404, or anything like that. So my code obviously thinks the page exists. How would I go about checking if a video exists?