{ "info": { "author": "LittleCoder", "author_email": "i7meavnktqegm1b@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "danmu\r\n=====\r\n\r\n|py2| |py3| `Chinese Version `_\r\n\r\ndanmu is Chinese translation of chat message.\r\n\r\nIt is an open source chat message api for live platforms like douyu, panda, huya, zhanqi.\r\n\r\nUsing this, even without programming basis, you will have an easy access to chat messages.\r\n\r\nWith less than 30 lines of code, you may develop further with chat messages.\r\n\r\nDouyu, panda, Zhanqi, Quanmin, bilibili are all supported.\r\n\r\nIt supports multi versions of python and platforms, making it available for all developers and amateurs.\r\n\r\nOnce started, it will auto connect when anchor showed up and re-connect when anchor connect again.\r\n\r\nWith good optimization and abstract structure, almost all chat messages will be catched and the whole program is easy to be modified.\r\n\r\nDocuments\r\n>>>>>>>>>\r\n\r\nYou may find document `here `_.\r\n\r\nInstallation\r\n>>>>>>>>>>>>\r\n\r\nYou may use this script to install danmu:\r\n\r\n.. code:: bash\r\n\r\n pip install danmu\r\n\r\nSimple uses\r\n>>>>>>>>>>>\r\n\r\nThe following is a simple demo of how to use danmu.\r\n\r\n.. code:: python\r\n\r\n import time, sys\r\n\r\n from danmu import DanMuClient\r\n\r\n def pp(msg):\r\n print(msg.encode(sys.stdin.encoding, 'ignore').\r\n decode(sys.stdin.encoding))\r\n\r\n dmc = DanMuClient('http://www.douyu.com/lslalala')\r\n if not dmc.isValid(): print('Url not valid')\r\n\r\n @dmc.danmu\r\n def danmu_fn(msg):\r\n pp('[%s] %s' % (msg['NickName'], msg['Content']))\r\n\r\n @dmc.gift\r\n def gift_fn(msg):\r\n pp('[%s] sent a gift!' % msg['NickName'])\r\n\r\n @dmc.other\r\n def other_fn(msg):\r\n pp('Other message received')\r\n\r\n dmc.start(blockThread = True)\r\n\r\nAdvanced uses\r\n>>>>>>>>>>>>>\r\n\r\n**Set default chat message dealer**\r\n\r\nMessages are split into three types to be registered: danmu, gift, other.\r\n\r\nWhich means: ordinary chat messages, gift messages, other messages.\r\n\r\n.. code:: python\r\n\r\n from danmu import DanMuClient\r\n\r\n dmc = DanMuClient('http://www.douyu.com/lslalala')\r\n\r\n @dmc.default\r\n def default_fn(msg):\r\n pp('[%s] %s' % (msg['NickName'], msg['Content']))\r\n\r\n**Cancel message dealer registered**\r\n\r\nUsing the following codes, you can cancel a message dealer registered.\r\n\r\n.. code:: python\r\n\r\n from danmu import DanMuClient\r\n\r\n dmc = DanMuClient('http://www.douyu.com/lslalala')\r\n dmc.default(None)\r\n dmc.gift(None)\r\n\r\nFAQ\r\n>>>\r\n\r\nQ: What's the message type of chat messages?\r\n\r\nA: A dictionary with at least three keys, NickName, Content, MsgType.\r\n\r\nComments\r\n>>>>>>>>\r\n\r\nIf you have any problem or suggestion, feel free to contact me through this `Issue `_.\r\n\r\nOr through gitter: |gitter|_\r\n\r\n.. |py2| image:: https://img.shields.io/badge/python-2.7-ff69b4.svg\r\n.. |py3| image:: https://img.shields.io/badge/python-3.5-red.svg\r\n.. _chinese_version: https://github.com/littlecodersh/danmu/blob/master/README.md\r\n.. _document: https://danmu.readthedocs.org/zh/latest/\r\n.. |screenshot| image:: http://7xrip4.com1.z0.glb.clouddn.com/danmu/demo.png?imageView/2/w/400/\r\n.. _issue#2: https://github.com/littlecodersh/danmu/issues/2\r\n.. |gitter| image:: https://badges.gitter.im/littlecodersh/danmu.svg\r\n.. _gitter: https://gitter.im/littlecodersh/danmu?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge\r\n\r\n\r\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/littlecodersh/danmu", "keywords": "danmu douyu panda zhanqi quanmin", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "danmu", "package_url": "https://pypi.org/project/danmu/", "platform": "", "project_url": "https://pypi.org/project/danmu/", "project_urls": { "Homepage": "https://github.com/littlecodersh/danmu" }, "release_url": "https://pypi.org/project/danmu/1.0.5/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A live danmu package", "version": "1.0.5" }, "last_serial": 2555395, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "abd754f7c66f1f8f9d9f6202727bc7bf", "sha256": "ffe3ba374a7e44d96dfe08d932ffe4c6d6c64943b116ba101390f0dff5145d52" }, "downloads": -1, "filename": "danmu-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "abd754f7c66f1f8f9d9f6202727bc7bf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12481, "upload_time": "2016-08-04T12:33:57", "url": "https://files.pythonhosted.org/packages/d5/f4/292c343943f188ee879d0d7e24bcf9c9287a939847d0c8cd85dfa063da9a/danmu-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f495b0ac985a61f34aa192c35cd5820", "sha256": "4f3d746b59dab2d50b4ba12c333aec2f0d5e6656c435483c8947dff69d0d3747" }, "downloads": -1, "filename": "danmu-1.0.0.zip", "has_sig": false, "md5_digest": "4f495b0ac985a61f34aa192c35cd5820", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14354, "upload_time": "2016-08-04T12:34:04", "url": "https://files.pythonhosted.org/packages/f6/c7/ae94032452850d74bc7a65a0b245cfe7e20c61fdd9c0c2d71a3b3ee67741/danmu-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "0d21403865c52c1c776e414bb5237cc6", "sha256": "f7f01cda44f86940c3274191c6176c62aa04cd8a90a4a42609387512046a3b6e" }, "downloads": -1, "filename": "danmu-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d21403865c52c1c776e414bb5237cc6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12487, "upload_time": "2016-08-04T12:36:40", "url": "https://files.pythonhosted.org/packages/61/d6/f6769079052744335ddba977274360dcd490450bba11f9426070862db14b/danmu-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c21fa6abaad50fd7a0a1225a2a6b2bb", "sha256": "218323445946afd86d989270701ff36e2bddd9862870b3c593d6cdf787af332e" }, "downloads": -1, "filename": "danmu-1.0.1.zip", "has_sig": false, "md5_digest": "6c21fa6abaad50fd7a0a1225a2a6b2bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14350, "upload_time": "2016-08-04T12:36:46", "url": "https://files.pythonhosted.org/packages/44/07/29b965e45fa7676480da88b4f03ea1a87b11c65ac76a7b346218718f105a/danmu-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "a4a5266fe028a8f9e9af9a47eb19b201", "sha256": "ab83525813102b73535a1312e1d32c9e7dc4ad231d5cfb8fec4e44688af75a64" }, "downloads": -1, "filename": "danmu-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a4a5266fe028a8f9e9af9a47eb19b201", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13814, "upload_time": "2016-08-04T15:08:27", "url": "https://files.pythonhosted.org/packages/20/8d/4c9f8e86b12e37e7c0a092e00b46da783cea284d395f4ca0fe07d94125db/danmu-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8aff0e030c95cb6087b9227896f61b73", "sha256": "5730b50e192f93b334671afdc8131a2fb9df1c3602d3f7e632115751543aaf48" }, "downloads": -1, "filename": "danmu-1.0.2.zip", "has_sig": false, "md5_digest": "8aff0e030c95cb6087b9227896f61b73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15758, "upload_time": "2016-08-04T15:08:31", "url": "https://files.pythonhosted.org/packages/53/26/675a2728017a9d6d8cd915f87d3b90fb6c5ca4e22d0a3c730eb551104642/danmu-1.0.2.zip" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "7857fe8fdd703aab4e6e05be48ab0481", "sha256": "9e598bc9dccf79d2668ff221c287a1ef6ad0f6422ec34f147ba95dc969d53e4d" }, "downloads": -1, "filename": "danmu-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7857fe8fdd703aab4e6e05be48ab0481", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13849, "upload_time": "2016-08-05T09:02:28", "url": "https://files.pythonhosted.org/packages/de/c8/bfe3b109fa8985961fa2d81b1715d27a1afef420262f7db2151fc9d3470b/danmu-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64bd404ab665e0ee03826b992aceb5e5", "sha256": "ff6d0657630437372e57525d477369cdd8135e17ae0a608502c479e8d692d095" }, "downloads": -1, "filename": "danmu-1.0.3.zip", "has_sig": false, "md5_digest": "64bd404ab665e0ee03826b992aceb5e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15803, "upload_time": "2016-08-05T09:02:30", "url": "https://files.pythonhosted.org/packages/85/00/f91fb5b90954d668a62005889c55aa25b697f90a494e740d2735527cd3ac/danmu-1.0.3.zip" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "240846e8dcb3d65bf2f94bebd8163f3d", "sha256": "fe71d296e615d31bfeb9f35e7a2d038d05169e20d3a7c39af36f08041f432ecd" }, "downloads": -1, "filename": "danmu-1.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "240846e8dcb3d65bf2f94bebd8163f3d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15532, "upload_time": "2016-11-13T08:59:40", "url": "https://files.pythonhosted.org/packages/6b/73/aa990c9d39ea70c1c8fc908cadc46950db42ec99189d99a1148a7d37a79b/danmu-1.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cdd7337784e344a380bc9742b714e663", "sha256": "4ee51ea4169346c38f9e94ff685453e7330692d32a1243ab128b4dbabdf6393b" }, "downloads": -1, "filename": "danmu-1.0.4.tar.gz", "has_sig": false, "md5_digest": "cdd7337784e344a380bc9742b714e663", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9100, "upload_time": "2016-11-13T08:59:44", "url": "https://files.pythonhosted.org/packages/e9/7a/2860c31169f770faeacc924f7d28526c04ec02487c0fa9f84d418703e9c7/danmu-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "a7b15834fb029e194d6dc09439900827", "sha256": "a5d29f18952e4b75d00c1ddfa94b72da182525bb2979eae56e476dcd3d07ae76" }, "downloads": -1, "filename": "danmu-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a7b15834fb029e194d6dc09439900827", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16051, "upload_time": "2017-01-05T10:12:04", "url": "https://files.pythonhosted.org/packages/a3/c7/b242b3eb93136bbf07e0ea86395df73f5d600e94cac06b3f1ccd33bde821/danmu-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e82aef71c33083058fb994929e231272", "sha256": "9fa8bc8d6f1feeeb24c52fafd99e464f8f5b7872ba299f5cd674ae3bd6679ca7" }, "downloads": -1, "filename": "danmu-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e82aef71c33083058fb994929e231272", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9472, "upload_time": "2017-01-05T10:12:06", "url": "https://files.pythonhosted.org/packages/17/d8/697364c28dfbe8bcd5f2cadf6819e337662c3dcc6377a3ac2ec1beac03a8/danmu-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a7b15834fb029e194d6dc09439900827", "sha256": "a5d29f18952e4b75d00c1ddfa94b72da182525bb2979eae56e476dcd3d07ae76" }, "downloads": -1, "filename": "danmu-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a7b15834fb029e194d6dc09439900827", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16051, "upload_time": "2017-01-05T10:12:04", "url": "https://files.pythonhosted.org/packages/a3/c7/b242b3eb93136bbf07e0ea86395df73f5d600e94cac06b3f1ccd33bde821/danmu-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e82aef71c33083058fb994929e231272", "sha256": "9fa8bc8d6f1feeeb24c52fafd99e464f8f5b7872ba299f5cd674ae3bd6679ca7" }, "downloads": -1, "filename": "danmu-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e82aef71c33083058fb994929e231272", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9472, "upload_time": "2017-01-05T10:12:06", "url": "https://files.pythonhosted.org/packages/17/d8/697364c28dfbe8bcd5f2cadf6819e337662c3dcc6377a3ac2ec1beac03a8/danmu-1.0.5.tar.gz" } ] }