home · contact · privacy
Strip whitespace start/end from page title.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 19 Jan 2016 23:32:14 +0000 (00:32 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 19 Jan 2016 23:32:14 +0000 (00:32 +0100)
plomlombot.py

index 767d1f71a156c5a744c8d80ed08802ad97af0127..2b59a0b9a5bc5331c21988dbc8997b8dbefefff6 100755 (executable)
@@ -120,7 +120,7 @@ def lineparser_loop(io, nickname):
                     continue
                 title = bs4.BeautifulSoup(r.text).title
                 if title:
-                    notice("PAGE TITLE FOR URL: " + title.string)
+                    notice("PAGE TITLE FOR URL: " + title.string.strip())
                 else:
                     notice("PAGE HAS NO TITLE TAG")