Skip to content

Python Wrapper for DouyuTV APIs, including support for accessing ChatRoom, e.g. DanMu/弹幕.

License

Notifications You must be signed in to change notification settings

yingnansong/pydouyu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pydouyu

Python Wrapper for DouyuTV APIs, including support for accessing ChatRoom, e.g. DanMu/弹幕.

Installation

pip install douyu

Example Usage

from douyu.chat.room import ChatRoom

def on_chat_message(msg):
    print '[%s]:%s' % (msg.attr('nn'), msg.attr('txt'))

def run():
    room = ChatRoom('70068')
    room.on('chatmsg', on_chat_message)
    room.knock()

if __name__ == '__main__':
     run()

References

About

Python Wrapper for DouyuTV APIs, including support for accessing ChatRoom, e.g. DanMu/弹幕.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages