def ajax_group_sentiment_weibo(): task_name = request.args.get('task_name', '') start_ts = request.args.get('start_ts', '') start_ts = int(start_ts) sentiment_type = request.args.get('sentiment', '') results = search_group_sentiment_weibo(task_name, start_ts, sentiment_type) if not results: results = [] return json.dumps(results)