Spaces:
Sleeping
Sleeping
import requests | |
def check_video_url(video_url): | |
try: | |
response = requests.head(video_url) # מבצע בקשת HEAD לבדוק את ה-URL | |
if response.status_code == 200: | |
print("The video URL is valid and accessible.") | |
else: | |
print(f"Received status code: {response.status_code}. The video may not be accessible.") | |
except requests.exceptions.RequestException as e: | |
print(f"An error occurred: {e}") | |
# קישור לסרטון לבדיקה | |
video_url = "https://cdn-uploads.huggingface.co/production/uploads/66d6f1b3b50e35e1709bfdf7/x7Ud8PO9QPfmrTvBVcCKE.mp4" | |
check_video_url(video_url) | |