Add 'handle' support for new subscriptions
These are not logged in the database, but will be added to the new version
This commit is contained in:
parent
6d2d8169a6
commit
e3dc3578a4
|
@ -27,7 +27,7 @@ if ($ARGV[0] =~ m%^UC[a-zA-Z0-9\-\_]{22}$%) {
|
|||
#print "Found raw channelId " . $params{channelId} . "\n";
|
||||
} elsif ($ARGV[0] =~ m%^(?:(?:https://)?(?:www\.|m\.)?youtube\.com/)?\@([^\/]+)%) {
|
||||
$params{channelHandle} = $1;
|
||||
die("Handles are not yet supported. Found \@$params{channelHandle}\n");
|
||||
#die("Handles are not yet supported. Found \@$params{channelHandle}\n");
|
||||
} elsif ($ARGV[0] =~ m%^(https://)?(www\.|m\.)?youtube\.com/channel/UC[a-zA-Z0-9\-\_]{22}%) {
|
||||
$params{channelId} = $ARGV[0];
|
||||
$params{channelId} =~ s%(https://)?(www\.|m\.)?youtube\.com/channel/(UC[^/]{22})(/.*)?%$3%;
|
||||
|
|
|
@ -52,6 +52,11 @@ sub get_videos_page {
|
|||
$get = $self->{location} . '/' .
|
||||
'channel/' . $params{channelId} .
|
||||
'/videos';
|
||||
} elsif (defined $params{channelHandle}) {
|
||||
$target = $params{channelHandle};
|
||||
$get = $self->{location} . '/' .
|
||||
'@' . $params{channelHandle} .
|
||||
'/videos';
|
||||
} elsif (defined $params{channelName}) {
|
||||
$target = $params{channelName};
|
||||
$get = $self->{location} . '/' .
|
||||
|
|
Loading…
Reference in New Issue