mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Web: Fix encoding in @title.
This commit is contained in:
parent
f438d0a0c2
commit
9ef83f70cf
@ -187,8 +187,10 @@ class Web(callbacks.PluginRegexp):
|
|||||||
"""
|
"""
|
||||||
size = conf.supybot.protocols.http.peekSize()
|
size = conf.supybot.protocols.http.peekSize()
|
||||||
text = utils.web.getUrl(url, size=size)
|
text = utils.web.getUrl(url, size=size)
|
||||||
if sys.version_info[0] >= 3:
|
try:
|
||||||
text = text.decode('utf8', 'replace')
|
text = text.decode('utf8', 'replace')
|
||||||
|
except:
|
||||||
|
pass
|
||||||
parser = Title()
|
parser = Title()
|
||||||
try:
|
try:
|
||||||
parser.feed(text)
|
parser.feed(text)
|
||||||
|
Loading…
Reference in New Issue
Block a user