Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -148,7 +148,7 @@ class SuperSmartAgent:
|
|
| 148 |
match = re.search(youtube_regex, text)
|
| 149 |
if match:
|
| 150 |
# Reconstruct the standard YouTube watch URL from the video ID
|
| 151 |
-
video_id = match.group(
|
| 152 |
return f"https://www.youtube.com/watch?v={video_id}"
|
| 153 |
return None
|
| 154 |
|
|
|
|
| 148 |
match = re.search(youtube_regex, text)
|
| 149 |
if match:
|
| 150 |
# Reconstruct the standard YouTube watch URL from the video ID
|
| 151 |
+
video_id = match.group(3) # The 11-character video ID
|
| 152 |
return f"https://www.youtube.com/watch?v={video_id}"
|
| 153 |
return None
|
| 154 |
|