Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No valid video or playlist found.. ❌ #6

Closed
MohdFahd opened this issue Mar 16, 2024 · 1 comment
Closed

No valid video or playlist found.. ❌ #6

MohdFahd opened this issue Mar 16, 2024 · 1 comment

Comments

@MohdFahd
Copy link

Dear Omar..

  if (!/^(https?\:\/\/)?((www\.)?youtube\.com|youtu\.be)\/.+$/.test(link)) {
    term.red("\n  - enter a valid youtube URL! ❌");
    return null;
  }

The current regular expression used for validating YouTube URLs in the application only matches URLs in a specific format

https://www.youtube.com/watch?v=UdTzq4pnB6o

However, it fails to recognize alternative formats such as share links

https://youtu.be/UdTzq4pnB6o?si=KrJctIhCDmllNu_N

resulting in an error message when users attempt to use these links.

Additional Information:

  • This issue affects user experience, as it prevents users from submitting valid YouTube links that are in a different format.
  • Providing support for various YouTube URL formats will enhance the usability and flexibility of the application.
@Veraellyunjie
Copy link

In addition to alternative link formats,
I'd also favor downloading by just video IDs like UdTzq4pnB6o
instead of link https://www.youtube.com/watch?v=UdTzq4pnB6o of any format

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

No branches or pull requests

3 participants