ccxccc commited on
Commit
1e5e18f
·
verified ·
1 Parent(s): 633125e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -6
app.py CHANGED
@@ -4,19 +4,29 @@ from pytube import YouTube
4
  class YouTubeDownloader:
5
  @staticmethod
6
  def run():
7
- st.header("YouTube Video Downloader")
 
 
 
 
 
 
 
 
 
 
 
8
  url = st.text_input("Enter YouTube URL to download:")
9
  if url:
10
  YouTubeDownloader.validate_url(url)
11
- with st.expander("preview video"):
12
  st.video(url)
13
  if st.button("Download"):
14
  YouTubeDownloader.cleanup()
15
  file_ = YouTubeDownloader.download_video(url)
16
  st.video(file_)
17
  YouTubeDownloader.helper_message()
18
- st.markdown(" App made by miles")
19
-
20
 
21
  @staticmethod
22
  def download_video(url):
@@ -54,6 +64,5 @@ class YouTubeDownloader:
54
  "click the vertical ... icon (aka hamburger button) in the bottom-right corner (in the video above) and click download."
55
  )
56
 
57
-
58
  if __name__ == "__main__":
59
- YouTubeDownloader.run()
 
4
  class YouTubeDownloader:
5
  @staticmethod
6
  def run():
7
+ st.title("YouTube Video Downloader")
8
+ st.write("")
9
+
10
+ # Navigation Bar
11
+ nav_option = st.sidebar.radio("Navigation", ["Login", "Sign Up"])
12
+ if nav_option == "Login":
13
+ # Login button functionality
14
+ st.sidebar.button("Login")
15
+ elif nav_option == "Sign Up":
16
+ # Sign Up button functionality
17
+ st.sidebar.button("Sign Up")
18
+
19
  url = st.text_input("Enter YouTube URL to download:")
20
  if url:
21
  YouTubeDownloader.validate_url(url)
22
+ with st.expander("Preview Video"):
23
  st.video(url)
24
  if st.button("Download"):
25
  YouTubeDownloader.cleanup()
26
  file_ = YouTubeDownloader.download_video(url)
27
  st.video(file_)
28
  YouTubeDownloader.helper_message()
29
+ st.markdown("App made by miles")
 
30
 
31
  @staticmethod
32
  def download_video(url):
 
64
  "click the vertical ... icon (aka hamburger button) in the bottom-right corner (in the video above) and click download."
65
  )
66
 
 
67
  if __name__ == "__main__":
68
+ YouTubeDownloader.run()