Пример #1
0
def ajax_sentiment_trend():
    uid = request.args.get('uid', '')
    uid = str(uid)
    time_type = request.args.get('time_type', SENTIMENT_TREND_DEFAULT_TYPE)
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time - DAY
    results = search_sentiment_trend(uid, time_type, now_ts)
    if not results:
        results = {}
    return json.dumps(results)
Пример #2
0
def ajax_sentiment_trend():
    uid = request.args.get('uid', '')
    uid = str(uid)
    time_type = request.args.get('time_type', SENTIMENT_TREND_DEFAULT_TYPE)
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time - DAY
    results = search_sentiment_trend(uid, time_type, now_ts)
    if not results:
        results = {}
    return json.dumps(results)