We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Greetings,
First of all, thank you for your module.
It seems that this type of link is not being detected by the module: https://youtu.be/FdeioVndUhs
See : https://youtube.googleblog.com/2009/12/make-way-for-youtube-links.html
I've hacked this modification : } elsif ( $arg =~ m!\Ahttps?://youtu.be! && $arg =~ /($re)(?:&|\#|\z)/ ) {
} elsif ( $arg =~ m!\Ahttps?://youtu.be! && $arg =~ /($re)(?:&|\#|\z)/ ) {
In this sub:
sub extract_youtube_video_id { my $arg = shift; my $re = $Regexp::Pattern::YouTube::RE{video_id}{pat}; if ($arg =~ /\A$re\z/) { return $arg; } elsif ($arg =~ m!\Ahttps?://.+/embed/! && $arg =~ m!/embed/($re)(?:\?|\#|\z)!) { return $1; } elsif ($arg =~ m!\Ahttps?://! && $arg =~ /=($re)(?:&|\#|\z)/) { return $1; } elsif ( $arg =~ m!\Ahttps?://youtu.be! && $arg =~ /($re)(?:&|\#|\z)/ ) { return $1; } else { # assume it's a filename like that generated by youtube-dl if ($arg =~ /-($re)(?:\.\w+)+(?:\s|\z)/) { return $1; } } undef; }
I'm pretty sure my regex could be improved.
We now have a modified module for our project. But I would much rather use yours.
If you may include this proposition or improve on it?
Thank you,
Charles-William Roy
The text was updated successfully, but these errors were encountered:
Thanks, recognizing youtu.be links added.
Sorry, something went wrong.
No branches or pull requests
Greetings,
First of all, thank you for your module.
It seems that this type of link is not being detected by the module: https://youtu.be/FdeioVndUhs
See : https://youtube.googleblog.com/2009/12/make-way-for-youtube-links.html
I've hacked this modification :
} elsif ( $arg =~ m!\Ahttps?://youtu.be! && $arg =~ /($re)(?:&|\#|\z)/ ) {
In this sub:
I'm pretty sure my regex could be improved.
We now have a modified module for our project. But I would much rather use yours.
If you may include this proposition or improve on it?
Thank you,
Charles-William Roy
The text was updated successfully, but these errors were encountered: