From 5a473f96b247e5a78a1cd8d472f6fb4fd14cf35f Mon Sep 17 00:00:00 2001 From: seasharp Date: Thu, 30 Jul 2020 20:54:34 -0400 Subject: [PATCH] Revert " modified: youtube-feed-to-rss.pl" This reverts commit 4c89c086551ea53d4310d61baf1973ad0449a830. modified: youtube-feed-to-rss.pl Custom channel URLs support too complex for now. --- youtube-feed-to-rss.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/youtube-feed-to-rss.pl b/youtube-feed-to-rss.pl index 826cffa..cbd78fd 100755 --- a/youtube-feed-to-rss.pl +++ b/youtube-feed-to-rss.pl @@ -61,15 +61,15 @@ my $PlaylistFormat = "${YouTubeRSSFormat}playlist_id="; print "Please enter the YouTube Channel URL: ","\n"; while (<>) { - my $YouTubeURL = $_ if $_ =~ m[http[s]?:\/\/.*\.youtube\.com\/(channel|user|[a-zA-Z=?]*[?&]list=PL|c|u).*$]; + my $YouTubeURL = $_ if $_ =~ m[http[s]?:\/\/.*\.youtube\.com\/(channel|user|[a-zA-Z=?]*[?&]list=PL).*$]; my $OutputURL; - if ($YouTubeURL =~ m[/.*\/(c|channel)\/.*$/]) { + if ($YouTubeURL =~ /.*\/channel\/.*$/) { print "This is a Channel\n"; - $OutputURL = $YouTubeURL =~ s/\/c\//$ChannelFormat/r - } elsif ($YouTubeURL =~ m[/.*\/(u|user)\/.*$/]) { + $OutputURL = $YouTubeURL =~ s/\/channel\//$ChannelFormat/r + } elsif ($YouTubeURL =~ /.*\/user\/.*$/) { print "This is a User\n"; - $OutputURL = $YouTubeURL =~ s/\/u\//$UserFormat/r - } elsif ($YouTubeURL =~ m[/.*\/[a-zA-Z?=]*[?&]list=PL.*$/]) { + $OutputURL = $YouTubeURL =~ s/\/user\//$UserFormat/r + } elsif ($YouTubeURL =~ /.*\/[a-zA-Z?=]*[?&]list=PL.*$/) { print "This is a Playlist\n"; $OutputURL = $YouTubeURL =~ s/\/[a-zA-Z=?]*[?&]list=/$PlaylistFormat/r } else { print "No idea what this is.\n"; }