Commit 7b76ccf2 by lichenggang

unquote

parent e1f97998
Showing with 2 additions and 2 deletions
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding:utf-8 -*- # -*- coding:utf-8 -*-
import json import json
from urllib.parse import quote from urllib.parse import unquote
import tornado.web import tornado.web
import tornado.ioloop import tornado.ioloop
...@@ -19,7 +19,7 @@ class BaseHandler(tornado.web.RequestHandler): ...@@ -19,7 +19,7 @@ class BaseHandler(tornado.web.RequestHandler):
class KwHandler(BaseHandler): class KwHandler(BaseHandler):
async def get(self): async def get(self):
target = quote(self.get_argument('keyword')) target = unquote(self.get_argument('keyword'))
res = self.predictorfac.predict(target) res = self.predictorfac.predict(target)
res['status'] = 1 res['status'] = 1
self.write(res) self.write(res)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment