def ajax_activity_weibo(): results = {} uid = str(request.args.get('uid', '')) time_type = str(request.args.get('type', '')) # type = day or week start_ts = int(request.args.get('start_ts', '')) results = get_activity_weibo(uid, time_type, start_ts) if not results: results = [] return json.dumps(results)