]> git.aero2k.de Git - urlbot-v3.git/commitdiff
fix tube
authorThorsten <mail@aero2k.de>
Fri, 12 Feb 2021 16:12:55 +0000 (17:12 +0100)
committerThorsten <mail@aero2k.de>
Fri, 12 Feb 2021 16:12:55 +0000 (17:12 +0100)
distbot/plugins/youtube.py

index 4ea3aa03052fe909bba524d956452bda1c033f41..4407a0f834a6014ac8078b238ea842e4a740c58a 100644 (file)
@@ -34,7 +34,7 @@ class Youtube(Worker):
 
     def parse_body(self, msg):
 
-        result = re.findall(r'(https?://youtu[^\s>]+)', msg["body"])
+        result = re.findall(r'(https?://(www\.)?youtu[^\s>]+)', msg["body"])
         if not result or "(nospoiler)" in msg["body"]:
             return