arnabbumba077 commited on
Commit
5477c4b
·
verified ·
1 Parent(s): 939d4ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ def download_video(url, title):
9
  st.write("Video Title:", title)
10
  st.write("Downloading...")
11
  stream = yt.streams.filter(progressive=True, file_extension='mp4').first()
12
- stream.download(output_path=os.path.expanduser("~\Downloads"))
 
13
  st.success("Download completed successfully!")
14
  except Exception as e:
15
  st.error(f"An error occurred: {e}")
 
9
  st.write("Video Title:", title)
10
  st.write("Downloading...")
11
  stream = yt.streams.filter(progressive=True, file_extension='mp4').first()
12
+ download_path = os.path.join(os.path.expanduser("~\Downloads"), f"{title}.mp4")
13
+ stream.download(output_path=download_path)
14
  st.success("Download completed successfully!")
15
  except Exception as e:
16
  st.error(f"An error occurred: {e}")