After Running Code White screen Showing iam getting mad

Summary

Share a clear and concise description of the issue. Aim for 2-3 sentences.

Steps to reproduce

Code snippet:

import streamlit as st
from pytube import YouTube

st.title("YouTube Video Downloader")

# Get video URL input from user
url = st.text_input("Enter the YouTube video URL:")

# Download the video if URL is valid and download button is clicked
if st.button("Download"):
    try:
        # Create YouTube object and get the highest resolution stream
        yt = YouTube(url)
        stream = yt.streams.get_highest_resolution()

        # Download the video
        st.write("Downloading video...")
        stream.download()
        st.write("Video downloaded successfully!")
    except:
        st.write("Invalid URL or some error occurred.")

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Explain what you expect to happen when you run the code above.

Explain the undesired behavior or error you see when you run the code above.
If youโ€™re seeing an error message, share the full contents of the error message here.

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python version 3.11)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version: windows 10

Requirements file added

If needed, add any other context about the problem here.Anyone Please solve this issues with live examples

Hey @Ganesh_Kumar,

I wasnโ€™t able to reproduce the issue you described with that code snippet. Can you share a screen recording of the behavior youโ€™re trying to fix?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.