]> git.aero2k.de Git - urlbot-v3.git/commitdiff
fix stupid
authorThorsten <mail@aero2k.de>
Thu, 29 Jul 2021 17:11:50 +0000 (19:11 +0200)
committerThorsten <mail@aero2k.de>
Thu, 29 Jul 2021 17:11:50 +0000 (19:11 +0200)
distbot/plugins/url.py

index 802dee27a2015fd60fbece959f3a4b31653ac04a..2897ef050b898484ee85d6171081ca7df6ee8999 100644 (file)
@@ -96,8 +96,10 @@ class URLResolver(Worker):
                 logger.info('url blacklist match for ' + url)
                 break
             # brackets aren't allowed anyways... and repeatedly used.
-            if url.endswith(')'):
-                url = url.rstrip(')')
+            # commonly_appended_invalid_character
+            for stupid in (":", '"', "'", ",", ")"):
+                if url.endswith(stupid):
+                    url = url.rstrip(stupid)
             try:
                 title = extract_title(url)
             except UnicodeError as e: