Drifty
Drifty copied to clipboard
Fix: wrong YouTube playlist detection
Fixes issue
Fixes #601
Changes proposed
- Standardized the YouTube link format for both
youtu.be
andyoutube.com
domains. - Extracted and converted
youtu.be
URLs to theyoutube.com/watch?v={videoID}
format. - Improved error handling for invalid or malformed YouTube playlist links.
- Added queryParams extraction method to help future development in playlist download feature.
Check List (Check all the applicable boxes)
- [x] My code follows the code style of this project.
- [ ] My change requires changes to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] This PR does not contain plagiarized content.
- [x] The title of my pull request is a short description of the requested changes.
Screenshots
Note to reviewers
This PR ensures that YouTube links with different domain structures (youtu.be and youtube.com) are correctly standardized and handled. It also includes enhanced error handling for cases where the video ID is missing (playlist URLs) or the URL is malformed.
Summary by CodeRabbit
-
New Features
- Enhanced CLI to support automatic formatting of YouTube links, improving user experience with video URL handling.
- Introduced a new method for extracting query parameters from URLs, allowing users to easily retrieve specific data from links.
-
Bug Fixes
- Improved error handling for URL processing, providing users with clearer feedback when issues arise.