Skip to content

Commit

Permalink
Support YouTube "shorts" video URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
trizen committed Mar 19, 2022
1 parent 47c12bd commit 253edc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/WWW/YoutubeViewer/RegularExpressions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ our $get_username_playlists_re = qr{$get_username_videos_re/playlists};
# Video ID
my $video_id_re = qr/[0-9A-Za-z_\-]{11}/;
our $valid_video_id_re = qr{^$video_id_re\z};
our $get_video_id_re = qr{(?:%3F|%2F|\b)(?>v|embed|youtu(?:\\)?[.]be)(?>(?:\\)?[=/]|%3D|%2F)(?<video_id>$video_id_re)};
our $get_video_id_re = qr{(?:%3F|%2F|\b)(?>v|embed|shorts|youtu(?:\\)?[.]be)(?>(?:\\)?[=/]|%3D|%2F)(?<video_id>$video_id_re)};

# Playlist ID
our $valid_playlist_id_re = qr{^$generic_name_re\z};
Expand Down

0 comments on commit 253edc4

Please sign in to comment.