Exemplo n.º 1
0
def getData(handle):
	data = []
	handle_id=getId(handle)
	for p in NPostsdatanew.objects.raw("select * from N_Postsdatanew where pageid='"+handle+"' && fromid!='"+handle_id+"'"):
		# print p.__dict__
		# print type(p)
		data.append(p.__dict__)
	return data
Exemplo n.º 2
0
def getData(handle):
    data = []
    handle_id = getId(handle)
    # for p in NPostsdatanew.objects.raw("select * from N_Postsdatanew where pageid='"+handle+"' && fromid!='"+handle_id+"'"):
    for p in NPostsdatanew.objects.raw(
            "select * from N_Postsdatanew where pageid='" + handle + "'"):
        # print p.__dict__
        # print type(p)
        data.append(p.__dict__)
    return data
Exemplo n.º 3
0
def getUniqueDataSentiment(handle):
	data = []
	handle_id=getId(handle)
	# for p in NPostsdatanew.objects.raw("select * from N_Postsdatanew where pageid='"+handle+"'"):
	for p in NPostsdatanew.objects.raw("select * from N_Postsdatanew where pageid='"+handle+"' && sentiment=-1"):
		# print p.__dict__
		# print type(p)
		if "message" not in p.__dict__.keys():
				continue
		if p.__dict__["message"]=="not found":
			continue
		data.append(p.__dict__)
	return data
Exemplo n.º 4
0
def getUniqueDataSentiment(handle):
    data = []
    handle_id = getId(handle)
    # for p in NPostsdatanew.objects.raw("select * from N_Postsdatanew where pageid='"+handle+"'"):
    for p in NPostsdatanew.objects.raw(
            "select * from N_Postsdatanew where pageid='" + handle +
            "' && sentiment=-1"):
        # print p.__dict__
        # print type(p)
        if "message" not in p.__dict__.keys():
            continue
        if p.__dict__["message"] == "not found":
            continue
        data.append(p.__dict__)
    return data