def ajax_influence_trend(): uid = request.args.get('uid', '') uid = str(uid) time_segment = request.args.get('time_segment', '30') #time_segment=7/30 time_segment = int(time_segment) #results = get_influence_trend(uid, time_segment) results = new_get_influence_trend(uid) if not results: results = {} return json.dumps(results)