Skip to content

Support short YouTube URLs - #1882

Merged
Adam Fourney (afourney) merged 2 commits into
microsoft:mainfrom
MukundaKatta:codex/markitdown-youtube-short-urls
Sep 3, 2026
Merged

Adam Fourney (afourney) merged 2 commits into
microsoft:mainfrom
MukundaKatta:codex/markitdown-youtube-short-urls

Conversation

@MukundaKatta

Copy link
Copy Markdown
Contributor

Summary

Support short YouTube URLs (youtu.be/...) in the YouTube converter.

The converter already handles standard YouTube URL shapes. This adds support for short links and coverage for those URL variants so transcript conversion can resolve the video ID consistently.

Validation

Attempted:

  • uv run --python 3.12 --project packages/markitdown --extra youtube-transcription --with pytest python -m pytest packages/markitdown/tests/test_module_misc.py -q

Result: 13 passed, 2 skipped, 6 failed due unrelated optional converter dependencies / remote speech/PDF coverage in the broad misc module (docx, pptx, pdf, speech transcription). The new YouTube short URL coverage is in the committed test file.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused implementation and tests correctly cover the intended URL variants.

Pull request overview

Adds consistent video ID extraction for standard, short, Shorts, and embed YouTube URLs.

Changes:

  • Centralized YouTube video ID parsing.
  • Reused parsing for converter acceptance and transcript retrieval.
  • Added parameterized URL coverage.
File summaries
File Description
_youtube_converter.py Supports additional YouTube URL formats.
test_module_misc.py Tests ID extraction and URL acceptance.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants