commit 4f491dc8ed86f2039773c076fc52928121e18b97
parent cde208a02d810ec84081ab5d18f2c2cd732ad002
Author: boredpasta <boredpasta@tutanota.com>
Date: Mon, 17 Mar 2025 03:10:30 +0200
add _ to the yt vid id regex allowed chars cause video ids supposedly use em
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mata_bot.pl b/mata_bot.pl
@@ -65,7 +65,7 @@ sub respond {
msg($sock, "${sender_nick} meant to say something but idk lol <[>~<]> (``$toreplace'' doesn't exist in their last message)");
}
return 1;
- } elsif ($message =~ m,watch\?v=([a-zA-Z0-9-]+),) {
+ } 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");