Geek7 commited on
Commit
6392793
·
1 Parent(s): 6be5e98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
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
- go_button = st.button("Go")
10
 
11
- if go_button:
12
- YouTubeDownloader.validate_url(url)
13
- with st.expander("preview video"):
14
- st.video(url)
15
- if st.button("Download"):
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