HTTPS title support, and a minor encoding fix.
parent
5ebe01386d
commit
01cebd1ccc
|
@ -168,7 +168,7 @@ def noteuri(phenny, input):
|
||||||
if not hasattr(phenny.bot, 'last_seen_uri'):
|
if not hasattr(phenny.bot, 'last_seen_uri'):
|
||||||
phenny.bot.last_seen_uri = {}
|
phenny.bot.last_seen_uri = {}
|
||||||
phenny.bot.last_seen_uri[input.sender] = uri
|
phenny.bot.last_seen_uri[input.sender] = uri
|
||||||
noteuri.rule = r'.*(http://[^<> "\x01]+)[,.]?'
|
noteuri.rule = r'.*(http[s]?://[^<> "\x01]+)[,.]?'
|
||||||
noteuri.priority = 'low'
|
noteuri.priority = 'low'
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
@ -46,6 +46,8 @@ def tr(phenny, context):
|
||||||
|
|
||||||
if input != output:
|
if input != output:
|
||||||
msg = translate(phrase, input, output)
|
msg = translate(phrase, input, output)
|
||||||
|
if isinstance(msg, str):
|
||||||
|
msg = msg.decode('utf-8')
|
||||||
if msg:
|
if msg:
|
||||||
msg = web.decode(msg) # msg.replace(''', "'")
|
msg = web.decode(msg) # msg.replace(''', "'")
|
||||||
msg = '"%s" (%s to %s, translate.google.com)' % (msg, input, output)
|
msg = '"%s" (%s to %s, translate.google.com)' % (msg, input, output)
|
||||||
|
|
Loading…
Reference in New Issue