Port to python3, fix ssl support
This commit is contained in:
@@ -10,7 +10,7 @@ modified from Wikipedia module
|
||||
author: mutantmonkey <mutantmonkey@gmail.com>
|
||||
"""
|
||||
|
||||
import re, urllib
|
||||
import re, urllib.request, urllib.parse, urllib.error
|
||||
import web
|
||||
import json
|
||||
|
||||
@@ -65,9 +65,9 @@ def awik(phenny, input):
|
||||
origterm = input.groups()[1]
|
||||
if not origterm:
|
||||
return phenny.say('Perhaps you meant ".awik dwm"?')
|
||||
origterm = origterm.encode('utf-8')
|
||||
origterm = origterm
|
||||
|
||||
term = urllib.unquote(origterm)
|
||||
term = urllib.parse.unquote(origterm)
|
||||
term = term[0].upper() + term[1:]
|
||||
term = term.replace(' ', '_')
|
||||
|
||||
@@ -84,4 +84,4 @@ awik.commands = ['awik']
|
||||
awik.priority = 'high'
|
||||
|
||||
if __name__ == '__main__':
|
||||
print __doc__.strip()
|
||||
print(__doc__.strip())
|
||||
|
||||
Reference in New Issue
Block a user