Revert " modified: youtube-feed-to-rss.pl"
This reverts commit 4c89c08655
.
modified: youtube-feed-to-rss.pl
Custom channel URLs support too complex for now.
This commit is contained in:
parent
4c89c08655
commit
5a473f96b2
@ -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"; }
|
||||
|
Loading…
Reference in New Issue
Block a user