Beispiel #1
0
def run():
    room = ChatRoom('134000')
    room.on('chatmsg', on_chat_message)  #chatmsg指的是弹幕消息 类型的信息
    #callback_list.append(on_chat_message)
    #callback_list=[<function on_chat_message at 0x0065E2B8>]
    #callbacks={'chatmsg': [on_chat_message]}
    room.knock()
Beispiel #2
0
def run(roomnumber):
    #roomnumber = "1164160"
    try:
        # 将主播信息插入总表
        # 获取主播名字
        get1 = getname.getNum()
        name = get1.start(roomnumber)
        #
        print name
        print roomnumber
        print table
        sql = "select Aname from artable where Aname='" + str(name) + "'"
        cursor.execute(sql)
        result = cursor.fetchall()
        if not result:
            if (setable(roomnumber)):
                try:
                    cursor.execute(
                        "insert into artable values('%s','%s','%s');" %
                        (str(name), str(roomnumber), str(table)))
                    db.commit()
                except Exception as e:
                    print "Exception======>", e
                room = ChatRoom(roomnumber)
                room.on('chatmsg', on_chat_message)
                room.knock()
    except Exception as e:
        print "Exception table exist ======>", e
Beispiel #3
0
def run():
    room = ChatRoom(roomid)
    room.on('chatmsg', on_chat_message)
    room.on('dgb', on_gift_message)
    room.knock()
Beispiel #4
0
def run():
    room = ChatRoom(sys.argv[1])
    room.on('chatmsg', on_chat_message)
    room.knock()
Beispiel #5
0
def run(number):
    Number = number
    #print Number
    room=ChatRoom(Number)
    room.on('chatmsg',on_chat_message)
    room.knock()
Beispiel #6
0
def run():
    room = ChatRoom('70068')
    room.on('chatmsg', on_chat_message)
    room.knock()
Beispiel #7
0
def run():
	room = ChatRoom(str(conf.room_num))
	room.on('chatmsg', on_chat_message)
	room.knock()
Beispiel #8
0
def run():
    room = ChatRoom('67373')
    room.on('spbc', spbc)
    room.knock()