arnabbumba077
commited on
Update app.py
Browse files
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 |
-
|
|
|
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}")
|