Repository navigation
Support short YouTube URLs - #1882
Merged
Adam Fourney (afourney) merged 2 commits intoSep 3, 2026
Merged
Adam Fourney (afourney) merged 2 commits into
Adam Fourney (afourney) merged 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 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.
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 -qResult: 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.