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()
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
def run(): room = ChatRoom(roomid) room.on('chatmsg', on_chat_message) room.on('dgb', on_gift_message) room.knock()
def run(): room = ChatRoom(sys.argv[1]) room.on('chatmsg', on_chat_message) room.knock()
def run(number): Number = number #print Number room=ChatRoom(Number) room.on('chatmsg',on_chat_message) room.knock()
def run(): room = ChatRoom('70068') room.on('chatmsg', on_chat_message) room.knock()
def run(): room = ChatRoom(str(conf.room_num)) room.on('chatmsg', on_chat_message) room.knock()
def run(): room = ChatRoom('67373') room.on('spbc', spbc) room.knock()