diff options
author | trizen <trizen@protonmail.com> | 2020-10-31 13:50:31 +0200 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-11-09 17:33:57 -0500 |
commit | f9ddea0669a5337f689107e8fc8980a4fb50ca65 (patch) | |
tree | b381de8a4a838bfa8934921cc517b5a9375eafc8 /lib/WWW/FairViewer/RegularExpressions.pm | |
parent | e4e52ab83ac73a3e581905487865149cdaf02a17 (diff) | |
download | fair-viewer-f9ddea0669a5337f689107e8fc8980a4fb50ca65.tar.lz fair-viewer-f9ddea0669a5337f689107e8fc8980a4fb50ca65.tar.xz fair-viewer-f9ddea0669a5337f689107e8fc8980a4fb50ca65.zip |
- Mention "pipe-viewer" in README. - Allow channel usernames in YouTube URLs to contain encoded characters of the form "%FF". - Removed some dead code.
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'lib/WWW/FairViewer/RegularExpressions.pm')
-rw-r--r-- | lib/WWW/FairViewer/RegularExpressions.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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/)?(?<channel_id>(?:\w+(?:[-.]++\w++)*|$generic_name_re))(?:/.*)?\z}; +our $valid_channel_id_re = qr{^(?:.*/(?:channel|c)/)?(?<channel_id>(?:[%\w]+(?:[-.]++[%\w]++)*|$generic_name_re))(?:/.*)?\z}; -our $get_channel_videos_id_re = qr{^.*/channel/(?<channel_id>(?:\w+(?:[-.]++\w++)*|$generic_name_re))}; +our $get_channel_videos_id_re = qr{^.*/(?:channel|c)/(?<channel_id>(?:[%\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/(?<username>[-.\w]+)}; |