def newsemotion(): counthandle = countHandle() selecttime = datetime.datetime.now() - datetime.timedelta(days=1) data = counthandle.listcount('rss_results', 'remotion', 'rpublished', selecttime) data = data[0:6] countword = [] countvalue = [] maxvalue = data[0][1] for item in data: countvalue.append(item[1]) countword.append({'text': item[0], 'max': maxvalue}) return jsonify( countword=countword, countvalue=countvalue, )
def wechatemotion(): counthandle = countHandle() selecttime = datetime.date.today() - datetime.timedelta(days=1) selecttime = selecttime.isoformat() data = counthandle.listcount('wechat_results', 'emotion', 'date', selecttime) data = data[0:6] countword = [] countvalue = [] maxvalue = data[0][1] for item in data: countvalue.append(item[1]) countword.append({'text': item[0], 'max': maxvalue}) return jsonify( countword=countword, countvalue=countvalue, )
def newsemotion(): counthandle = countHandle() selecttime = datetime.datetime.now()-datetime.timedelta(days=1) data = counthandle.listcount('rss_results', 'remotion', 'rpublished', selecttime) data = data[0:6] countword = [] countvalue = [] maxvalue = data[0][1] for item in data: countvalue.append(item[1]) countword.append( {'text': item[0], 'max': maxvalue} ) return jsonify( countword=countword, countvalue=countvalue, )
def wechatemotion(): counthandle = countHandle() selecttime = datetime.date.today()-datetime.timedelta(days=1) selecttime = selecttime.isoformat() data = counthandle.listcount('wechat_results', 'emotion', 'date', selecttime) data = data[0:6] countword = [] countvalue = [] maxvalue = data[0][1] for item in data: countvalue.append(item[1]) countword.append( {'text': item[0], 'max': maxvalue} ) return jsonify( countword=countword, countvalue=countvalue, )
def newskeyword(): counthandle = countHandle() selecttime = datetime.datetime.now() - datetime.timedelta(days=1) data = counthandle.listcount('rss_results', 'rtitle_keyword', 'rpublished', selecttime) countnum = 0 countword = [] countvalue = [] for num in range(0, len(data)): countnum += data[num][1] for i in range(0, 9): if data[i][0].isdigit(): data.pop(i) data = data[0:9] for item in data: countvalue.append(item[1]) countword.append(item[0]) return jsonify(countword=countword, countvalue=countvalue, countnum=countnum)
def wechatkeyword(): counthandle = countHandle() selecttime = datetime.datetime.today() - datetime.timedelta(days=1) selecttime = selecttime.isoformat() data = counthandle.listcount('wechat_results', 'title_keyword', 'date', selecttime) countnum = 0 countword = [] countvalue = [] for num in range(0, len(data)): countnum += data[num][1] for i in range(0, 9): if data[i][0].isdigit(): data.pop(i) data = data[0:9] for item in data: countvalue.append(item[1]) countword.append(item[0]) return jsonify(countword=countword, countvalue=countvalue, countnum=countnum)
def newskeyword(): counthandle = countHandle() selecttime = datetime.datetime.now()-datetime.timedelta(days=1) data = counthandle.listcount('rss_results', 'rtitle_keyword', 'rpublished', selecttime) countnum = 0 countword = [] countvalue = [] for num in range(0, len(data)): countnum += data[num][1] for i in range(0, 9): if data[i][0].isdigit(): data.pop(i) data = data[0:9] for item in data: countvalue.append(item[1]) countword.append(item[0]) return jsonify( countword=countword, countvalue=countvalue, countnum=countnum )
def wechatkeyword(): counthandle = countHandle() selecttime = datetime.datetime.today()-datetime.timedelta(days=1) selecttime = selecttime.isoformat() data = counthandle.listcount('wechat_results', 'title_keyword', 'date', selecttime) countnum = 0 countword = [] countvalue = [] for num in range(0, len(data)): countnum += data[num][1] for i in range(0, 9): if data[i][0].isdigit(): data.pop(i) data = data[0:9] for item in data: countvalue.append(item[1]) countword.append(item[0]) return jsonify( countword=countword, countvalue=countvalue, countnum=countnum )