Ubuntu
commited on
Commit
·
834944f
1
Parent(s):
3244f42
split id
Browse files
app.py
CHANGED
@@ -92,6 +92,7 @@ def embed_youtube(youtube_url):
|
|
92 |
# video_id = YoutubeDL().extract_info(youtube_url, download=False)['id']\
|
93 |
video_id = youtube_url.split("v=")[1]
|
94 |
if 'short' in youtube_url:
|
|
|
95 |
video_id = video_id.split("/")[-1]
|
96 |
print(video_id)
|
97 |
embed_html = f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'
|
|
|
92 |
# video_id = YoutubeDL().extract_info(youtube_url, download=False)['id']\
|
93 |
video_id = youtube_url.split("v=")[1]
|
94 |
if 'short' in youtube_url:
|
95 |
+
print(video_id.split("/"))
|
96 |
video_id = video_id.split("/")[-1]
|
97 |
print(video_id)
|
98 |
embed_html = f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{video_id}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>'
|