Skip to content

Conversation

@ashvini8
Copy link
Contributor

@ashvini8 ashvini8 commented Nov 29, 2024

Description

(This PR has contributions from @khushiDesai, @anushak18, and @ssumaiyaahmed).

This PR addresses Issue #27988 which addresses the bug where YoutubeLoader fails when attempting to load videos that require login credentials. The issue seemed to occur due to the lack of OAuth support in the pytube integration.

This pull request adds the following:

  • Added use_oauth and allow_oauth_cache as optional arguments to YoutubeLoader.from_youtube_url in youtube.py

Issues

Issue #27988: Youtube requires login to view videoDetails

Testing

We added the following tests in test_youtube.py:

  • def test_from_youtube_url checks that the from_youtube_url method correctly creates a YoutubeLoader and extracts the correct video information from various YouTube URL formats while also checks the OAuth settings
  • def test_oauth_cache checks that the OAuth caching works properly and prevents unnecessary login prompts when loading a video using the YoutubeLoader

@dosubot dosubot bot added the size:M label Nov 29, 2024
@vercel
Copy link

vercel bot commented Nov 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2024 1:45am

@dosubot dosubot bot added community bug Related to a bug, vulnerability, unexpected error with an existing feature labels Nov 29, 2024
@ashvini8 ashvini8 marked this pull request as draft November 29, 2024 22:13
@ashvini8 ashvini8 marked this pull request as ready for review November 29, 2024 22:16
transcript_format: TranscriptFormat = TranscriptFormat.TEXT,
continue_on_failure: bool = False,
chunk_size_seconds: int = 120,
use_oauth: bool = True,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting to True by default is a breaking change, lets set to False

@ccurme
Copy link
Collaborator

ccurme commented Dec 18, 2024

Closing as author is unresponsive but happy to re-open if we want to keep iterating on this.

@ccurme ccurme closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Related to a bug, vulnerability, unexpected error with an existing feature

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants