Spaces:
Sleeping
Sleeping
Create נ
Browse files
נ
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
|
| 3 |
+
def check_video_url(video_url):
|
| 4 |
+
try:
|
| 5 |
+
response = requests.head(video_url) # מבצע בקשת HEAD לבדוק את ה-URL
|
| 6 |
+
if response.status_code == 200:
|
| 7 |
+
print("The video URL is valid and accessible.")
|
| 8 |
+
else:
|
| 9 |
+
print(f"Received status code: {response.status_code}. The video may not be accessible.")
|
| 10 |
+
except requests.exceptions.RequestException as e:
|
| 11 |
+
print(f"An error occurred: {e}")
|
| 12 |
+
|
| 13 |
+
# קישור לסרטון לבדיקה
|
| 14 |
+
video_url = "https://cdn-uploads.huggingface.co/production/uploads/66d6f1b3b50e35e1709bfdf7/x7Ud8PO9QPfmrTvBVcCKE.mp4"
|
| 15 |
+
check_video_url(video_url)
|