Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ class YouTubeDownloader:
|
|
6 |
def run():
|
7 |
st.header("YouTube Video Downloader")
|
8 |
url = st.text_input("Enter YouTube URL to download:")
|
9 |
-
|
10 |
|
11 |
-
if
|
12 |
-
|
13 |
-
|
14 |
-
st.video
|
15 |
-
|
16 |
YouTubeDownloader.cleanup()
|
17 |
file_ = YouTubeDownloader.download_video(url)
|
18 |
st.video(file_)
|
@@ -52,7 +52,7 @@ class YouTubeDownloader:
|
|
52 |
@classmethod
|
53 |
def helper_message(cls):
|
54 |
st.write(
|
55 |
-
"> To save the video to local computer, "
|
56 |
"click the vertical ... icon (aka hamburger button) in the bottom-right corner (in the video above) and click download."
|
57 |
)
|
58 |
|
|
|
6 |
def run():
|
7 |
st.header("YouTube Video Downloader")
|
8 |
url = st.text_input("Enter YouTube URL to download:")
|
9 |
+
start_button = st.button("Start Download")
|
10 |
|
11 |
+
if start_button:
|
12 |
+
if url:
|
13 |
+
YouTubeDownloader.validate_url(url)
|
14 |
+
with st.expander("preview video"):
|
15 |
+
st.video(url)
|
16 |
YouTubeDownloader.cleanup()
|
17 |
file_ = YouTubeDownloader.download_video(url)
|
18 |
st.video(file_)
|
|
|
52 |
@classmethod
|
53 |
def helper_message(cls):
|
54 |
st.write(
|
55 |
+
"> To save the video to the local computer, "
|
56 |
"click the vertical ... icon (aka hamburger button) in the bottom-right corner (in the video above) and click download."
|
57 |
)
|
58 |
|