markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

fix: support YouTube short URLs and Shorts in YouTubeConverter

Open Jah-yee opened this issue 7 months ago • 1 comments

Jah-yee avatar Apr 14 '26 18:04 Jah-yee

Good day,

I've attached a patch with the fix for this issue. Here are the changes:

- extends accepts() to recognize youtu.be/ and youtube.com/shorts/ URLs
- extends convert() to extract video_id from all three URL formats
- fixes issue where youtu.be short URLs silently fell through to HTML converter

The patch file is available at: https://github.com/Jah-yee/RoomWithOutRoof-markitdown/blob/fix-youtube-short-url/packages/markitdown/src/markitdown/converters/_youtube_converter.py

Or simply view the diff here: https://github.com/Jah-yee/RoomWithOutRoof-markitdown/compare/upstream/main...fix-youtube-short-url

Thank you for your work on this project. I hope this small fix is helpful. Please let me know if there's anything to adjust.

Warmly, RoomWithOutRoof

Jah-yee avatar Apr 14 '26 18:04 Jah-yee