mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Add timeout to web title
command
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
This commit is contained in:
parent
9fe4abec48
commit
07f98d3619
@ -147,7 +147,9 @@ class Web(callbacks.PluginRegexp):
|
||||
|
||||
def getTitle(self, irc, url, raiseErrors):
|
||||
size = conf.supybot.protocols.http.peekSize()
|
||||
(target, text) = utils.web.getUrlTargetAndContent(url, size=size)
|
||||
timeout = self.registryValue('timeout')
|
||||
(target, text) = utils.web.getUrlTargetAndContent(url, size=size,
|
||||
timeout=timeout)
|
||||
try:
|
||||
text = text.decode(utils.web.getEncoding(text) or 'utf8',
|
||||
'replace')
|
||||
|
Loading…
Reference in New Issue
Block a user