home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Strip whitespace start/end from page title.
[plomlombot-irc.git]
/
plomlombot.py
diff --git
a/plomlombot.py
b/plomlombot.py
index 3e4734fa2ec2403aa093768623e1ca9b189d5cd8..2b59a0b9a5bc5331c21988dbc8997b8dbefefff6 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-114,12
+114,13
@@
def lineparser_loop(io, nickname):
r = requests.get(url, timeout=15)
except (requests.exceptions.TooManyRedirects,
requests.exceptions.ConnectionError,
r = requests.get(url, timeout=15)
except (requests.exceptions.TooManyRedirects,
requests.exceptions.ConnectionError,
+ requests.exceptions.InvalidURL,
requests.exceptions.InvalidSchema) as error:
notice("TROUBLE FOLLOWING URL: " + str(error))
continue
title = bs4.BeautifulSoup(r.text).title
if title:
requests.exceptions.InvalidSchema) as error:
notice("TROUBLE FOLLOWING URL: " + str(error))
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")
else:
notice("PAGE HAS NO TITLE TAG")