Skip to main content

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

Project description

# pydouyu

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

# Installation

pip install fitz-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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fitz-douyu, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size fitz-douyu-0.0.1.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page