commit f3609fac601b54d2d303f2588e6ec35858bbaa00 from: noodle date: Thu Sep 25 17:13:20 2025 UTC fix edge case where yt vid id starting with a - always fails to get a title commit - 2663f4a88905a632336b826779343e60765999d3 commit + f3609fac601b54d2d303f2588e6ec35858bbaa00 blob - 037499a55a5b756cb1006229a9bb96e642bd5bf4 blob + 85bce57dcc1bc20c421341c0f614290892159bf9 --- mata_bot.pl +++ mata_bot.pl @@ -153,7 +153,7 @@ sub respond { } elsif ($message =~ m,watch\?v=([a-zA-Z0-9_-]+),) { # post youtube video titles from video ID my $video_id = $1; - my $response = HTTP::Tiny->new->get("https://fuyt.lab8.cz/?s=${video_id}&o=relevance"); + my $response = HTTP::Tiny->new->get("https://fuyt.lab8.cz/?s=https%3A//www.youtube.com/watch%3Fv%3D${video_id}&o=relevance"); unless ($response->{success}) { $reply = "failed to get title of youtube video ${video_id} ${MATA_DEAD} ($response->{status} $response->{reason}!)"; return $message, $reply;