def post(self):
body = json.loads(self.request.body)
response = {'code': 0}
if body.has_key('songId'):
search_result = BaiduMusicSearch().search_song_byid(body['songId'])
response['searchResult'] = search_result
else:
response['code'] = -1
response['error'] = "not found song id."
json_data = json.dumps(response, ensure_ascii=False)
log.info(json_data)
self.write(json_data)
评论列表
文章目录