Skip to content

Conversation

@Swiftyos
Copy link
Contributor

Youtube can blocks cloud ips causing the youtube transcribe blocks to not work. This PR adds webshare proxy to get around this issue

Changes 🏗️

  • add webshare proxy to youtube transcribe block

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • I have tested this works locally using the proxy

@Swiftyos Swiftyos requested a review from a team as a code owner November 26, 2025 10:18
@Swiftyos Swiftyos requested review from Bentlybro and Pwuts and removed request for a team November 26, 2025 10:18
@github-project-automation github-project-automation bot moved this to 🆕 Needs initial review in AutoGPT development kanban Nov 26, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 26, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch swiftyos/open-2822-blockunknownerror-could-not-retrieve-a-transcript-for-the

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit a6d1545
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs-dev/deploys/6926d40c0d302d0009ffe132

@netlify
Copy link

netlify bot commented Nov 26, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit a6d1545
🔍 Latest deploy log https://app.netlify.com/projects/auto-gpt-docs/deploys/6926d40cd4093d0007a0b923

@qodo-merge-pro
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 Security concerns

Sensitive information handling:
Ensure that SecretStr values are never logged. The current code logs only the video_id, which is fine, but double-check that Webshare credentials are not exposed via exception messages or repr in tests. Also validate that adding default webshare credentials from settings to DEFAULT_CREDENTIALS does not inadvertently grant proxy access to all users; confirm appropriate scoping/authorization when exposing these credentials through get_all_creds.

⚡ Recommended focus areas for review

Type Hints

The return type of get_transcript is annotated as FetchedTranscript, but youtube_transcript_api.fetch typically returns a list of transcript entries; confirm this type matches actual return to avoid runtime/type assumptions elsewhere.

def get_transcript(
    self, video_id: str, credentials: WebshareProxyCredentials
) -> FetchedTranscript:
    """
    Get transcript for a video, preferring English but falling back to any available language.

    :param video_id: The YouTube video ID
    :param credentials: The Webshare proxy credentials
    :return: The fetched transcript
    :raises: Any exception except NoTranscriptFound for requested languages
    """
    logger.warning(
        "Using Webshare proxy for YouTube transcript fetch (video_id=%s)",
        video_id,
    )
    proxy_config = WebshareProxyConfig(
        proxy_username=credentials.username.get_secret_value(),
        proxy_password=credentials.password.get_secret_value(),
    )

    api = YouTubeTranscriptApi(proxy_config=proxy_config)
    try:
        # Try to get English transcript first (default behavior)
        return api.fetch(video_id=video_id)
    except NoTranscriptFound:
        # If English is not available, get the first available transcript
Logging Level

Using logger.warning for routine proxy usage may generate noisy logs; consider info/debug unless it indicates an actual fallback or error.

logger.warning(
    "Using Webshare proxy for YouTube transcript fetch (video_id=%s)",
    video_id,
)
Credential Requirement

run now requires proxy credentials; ensure upstream caller always provides them or define a sensible default path when credentials are missing to avoid unexpected failures.

async def run(
    self,
    input_data: Input,
    *,
    credentials: WebshareProxyCredentials,
    **kwargs,
) -> BlockOutput:
    video_id = self.extract_video_id(input_data.youtube_url)
    yield "video_id", video_id

    transcript = self.get_transcript(video_id, credentials)
    transcript_text = self.format_transcript(transcript=transcript)

    yield "transcript", transcript_text

@deepsource-io
Copy link

deepsource-io bot commented Nov 26, 2025

Here's the code health analysis summary for commits 1851264..a6d1545. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
❗ 2 occurences introduced
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🆕 Needs initial review

Development

Successfully merging this pull request may close these issues.

2 participants