ccxccc commited on
Commit
7773f6f
1 Parent(s): cb7758f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -23
app.py CHANGED
@@ -4,36 +4,19 @@ from pytube import YouTube
4
  class YouTubeDownloader:
5
  @staticmethod
6
  def run():
7
- st.title("YouTube Video Downloader")
8
-
9
- # Header Layout
10
- header_container = st.container()
11
- with header_container:
12
- st.write("")
13
- st.write("## Welcome to our YouTube Downloader")
14
- st.write("")
15
- st.write("")
16
- col1, col2 = st.columns(2)
17
- if col1.button("Login", key="login_button"):
18
- # Login button functionality
19
- st.write("Redirecting to login page...")
20
- if col2.button("Sign Up", key="signup_button"):
21
- # Sign Up button functionality
22
- st.write("Redirecting to sign up page")
23
- st.write("")
24
- st.write("")
25
-
26
  url = st.text_input("Enter YouTube URL to download:")
27
  if url:
28
  YouTubeDownloader.validate_url(url)
29
- with st.expander("Preview Video"):
30
  st.video(url)
31
  if st.button("Download"):
32
  YouTubeDownloader.cleanup()
33
  file_ = YouTubeDownloader.download_video(url)
34
  st.video(file_)
35
  YouTubeDownloader.helper_message()
36
- st.markdown("App made by miles")
 
37
 
38
  @staticmethod
39
  def download_video(url):
@@ -67,9 +50,10 @@ class YouTubeDownloader:
67
  @classmethod
68
  def helper_message(cls):
69
  st.write(
70
- "> To save the video to the local computer, "
71
  "click the vertical ... icon (aka hamburger button) in the bottom-right corner (in the video above) and click download."
72
  )
73
 
 
74
  if __name__ == "__main__":
75
- YouTubeDownloader.run()
 
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):
 
50
  @classmethod
51
  def helper_message(cls):
52
  st.write(
53
+ "> To save the video to local computer, "
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()