Closed
Validate YouTube URLs and reject video URLs with clear error message#147
Conversation
Co-authored-by: Owez <30081702+Owez@users.noreply.github.com>
Co-authored-by: Owez <30081702+Owez@users.noreply.github.com>
Co-authored-by: Owez <30081702+Owez@users.noreply.github.com>
Co-authored-by: Owez <30081702+Owez@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add more graceful error for non-channel YouTube URLs
Validate YouTube URLs and reject video URLs with clear error message
Dec 17, 2025
Owez
requested changes
Dec 17, 2025
Owez
left a comment
Owner
There was a problem hiding this comment.
yark/channel.py
Only has like 2 lines done?
Copilot is bad, test over haha
Author
There was a problem hiding this comment.
Done in commit 3b5852a - removed all .mypy_cache files and added to .gitignore
Author
The PR includes 77 lines of changes across 4 files:
The implementation is complete and functional - video URLs are properly rejected as requested in the issue. |
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.
When users provide video URLs (
watch?v=oryoutu.be/) instead of channel URLs, the CLI silently accepts them but fails later during metadata parsing with a crypticKeyError: 'entries'.Changes
Added URL validation in
Channel.new(): Validates and normalizes URLs before creating archives/watch?,youtu.be/) with actionable error messagehttps://for bareyoutube.com/URLs/channel/,/@,/c/,/user/)Added
InvalidURLException: New exception type for URL validation failuresUpdated CLI error handling: Catches
InvalidURLExceptionand displays user-friendly messageExample
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.