YoutubeLoader.from_youtube_url does not work when using hf space it does work when i am doing it on local machine

from langchain_community.document_loaders import YoutubeLoader


# Function to load YouTube details
def get_youtube_details(video_url):
    print(video_url)
    loader = YoutubeLoader.from_youtube_url(str(video_url), add_video_info=False)
    docs = loader.load()
    print(docs)
    print("Video transcripts loaded in DB")
    return docs, loader

When i run this function on local it works i get the results.
but when done the same of hf space it returns docs as =

I have tried doing the same version of libraries on local and hf spaces via requirements.txt

Does hf spaces blocks requests to youtube?

HF link of app