mirror of
https://github.com/tcsenpai/youlama.git
synced 2025-06-06 19:25:39 +00:00
support for youtu.be
This commit is contained in:
parent
071f887bd2
commit
c6855d27f0
@ -313,6 +313,10 @@ def main():
|
|||||||
else:
|
else:
|
||||||
st.error("Please enter a valid YouTube video URL.")
|
st.error("Please enter a valid YouTube video URL.")
|
||||||
return
|
return
|
||||||
|
# Support short urls as well
|
||||||
|
if "https://youtu.be/" in video_url:
|
||||||
|
video_id = video_url.split("youtu.be/")[-1]
|
||||||
|
video_url = f"https://www.youtube.com/watch?v={video_id}"
|
||||||
|
|
||||||
if st.button("Summarize"):
|
if st.button("Summarize"):
|
||||||
if video_url:
|
if video_url:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user