From f9ddea0669a5337f689107e8fc8980a4fb50ca65 Mon Sep 17 00:00:00 2001 From: trizen Date: Sat, 31 Oct 2020 13:50:31 +0200 Subject: - Mention "pipe-viewer" in README. - Allow channel usernames in YouTube URLs to contain encoded characters of the form "%FF". - Removed some dead code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- lib/WWW/FairViewer/RegularExpressions.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/WWW/FairViewer/RegularExpressions.pm') diff --git a/lib/WWW/FairViewer/RegularExpressions.pm b/lib/WWW/FairViewer/RegularExpressions.pm index 51e85cd..af61f94 100644 --- a/lib/WWW/FairViewer/RegularExpressions.pm +++ b/lib/WWW/FairViewer/RegularExpressions.pm @@ -27,9 +27,9 @@ our $non_digit_or_opt_re = qr{^(?!$range_num_re)(?>[0-9]{1,3}[^0-9]|[0-9]{4}|[^0 # Generic name my $generic_name_re = qr/[a-zA-Z0-9_.\-]{11,64}/; -our $valid_channel_id_re = qr{^(?:.*/channel/)?(?(?:\w+(?:[-.]++\w++)*|$generic_name_re))(?:/.*)?\z}; +our $valid_channel_id_re = qr{^(?:.*/(?:channel|c)/)?(?(?:[%\w]+(?:[-.]++[%\w]++)*|$generic_name_re))(?:/.*)?\z}; -our $get_channel_videos_id_re = qr{^.*/channel/(?(?:\w+(?:[-.]++\w++)*|$generic_name_re))}; +our $get_channel_videos_id_re = qr{^.*/(?:channel|c)/(?(?:[%\w]+(?:[-.]++[%\w]++)*|$generic_name_re))}; our $get_channel_playlists_id_re = qr{$get_channel_videos_id_re/playlists}; our $get_username_videos_re = qr{^.*/user/(?[-.\w]+)}; -- cgit v1.2.3