[
  {
    "path": ".gitattributes",
    "content": "*.js linguist-language=python\n"
  },
  {
    "path": ".gitignore",
    "content": "# Byte-compiled / optimized / DLL files\n__pycache__/\n.idea/*\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\nwheels/\npip-wheel-metadata/\nshare/python-wheels/\n*.egg-info/\n.installed.cfg\n*.egg\nMANIFEST\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.nox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*.cover\n.hypothesis/\n.pytest_cache/\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\nlocal_settings.py\ndb.sqlite3\n\n# Flask stuff:\ninstance/\n.webassets-cache\n\n# Scrapy stuff:\n.scrapy\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# Jupyter Notebook\n.ipynb_checkpoints\n\n# IPython\nprofile_default/\nipython_config.py\n\n# pyenv\n.python-version\n\n# pipenv\n#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.\n#   However, in case of collaboration, if having platform-specific dependencies or dependencies\n#   having no cross-platform support, pipenv may install dependencies that don't work, or not\n#   install all needed dependencies.\n#Pipfile.lock\n\n# celery beat schedule file\ncelerybeat-schedule\n\n# SageMath parsed files\n*.sage.py\n\n# Environments\n.env\n.venv\nenv/\nvenv/\nENV/\nenv.bak/\nvenv.bak/\n\n# Spyder project settings\n.spyderproject\n.spyproject\n\n# Rope project settings\n.ropeproject\n\n# mkdocs documentation\n/site\n\n# mypy\n.mypy_cache/\n.dmypy.json\ndmypy.json\n\n# Pyre type checker\n.pyre/\n"
  },
  {
    "path": "173.py",
    "content": "# 艺气山直播：http://www.173.com/room/category?categoryId=11\n\nimport requests\n\n\nclass YQS:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        params = f'roomId={self.rid}'\n        with requests.Session() as s:\n            res = s.post('https://www.173.com/room/getVieoUrl', params=params).json()\n        data = res['data']\n        if data:\n            status = data['status']\n            if status == 2:\n                return data['url']\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        yqs = YQS(rid)\n        return yqs.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入艺气山直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "17live.py",
    "content": "# 获取17直播的真实流媒体地址，可能需要挂国外代理才行。\n# 17直播间链接形式：https://17.live/live/276480\n\nimport requests\n\n\nclass Live17:\n\n    def __init__(self, rid):\n        \"\"\"\n        # 可能需要挂代理。\n        # self.proxies = {\n        #     \"http\": \"http://xxxx:1080\",\n        #     \"https\": \"http://xxxx:1080\",\n        # }\n        Args:\n            rid:\n        \"\"\"\n        self.rid = rid\n        self.BASE_URL = 'https://api-dsa.17app.co/api/v1/lives/'\n\n    def get_real_url(self):\n        try:\n            # res = requests.get(f'{self.BASE_URL}{self.rid}', proxies=self.proxies).json()\n            res = requests.get(f'{self.BASE_URL}{self.rid}').json()\n            real_url_default = res.get('rtmpUrls')[0].get('url')\n            real_url_modify = real_url_default.replace('global-pull-rtmp.17app.co', 'china-pull-rtmp-17.tigafocus.com')\n            real_url = [real_url_modify, real_url_default]\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        live17 = Live17(rid)\n        return live17.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入17直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "2cq.py",
    "content": "# 棉花糖直播：https://www.2cq.com/rank\n\nimport requests\n\n\nclass MHT:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://www.2cq.com/proxy/room/room/info?roomId={self.rid}&appId=1004')\n        res = res.json()\n        if res['status'] == 1:\n            result = res['result']\n            if result['liveState'] == 1:\n                real_url = result['pullUrl']\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间可能不存在')\n\n\ndef get_real_url(rid):\n    try:\n        mht = MHT(rid)\n        return mht.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入棉花糖直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "51lm.py",
    "content": "# 羚萌直播：https://live.51lm.tv/programs/Hot\n\nfrom urllib.parse import urlencode\nimport requests\nimport time\nimport hashlib\n\n\nclass LM:\n\n    def __init__(self, rid):\n        self.rid = rid\n        self.BASE_URL = 'https://www.51lm.tv/live/room/info/basic'\n\n    def get_real_url(self):\n        roominfo = {'programId': self.rid}\n\n        def g(d):\n            return hashlib.md5(f'{d}#{urlencode(roominfo)}#Ogvbm2ZiKE'.encode('utf-8')).hexdigest()\n\n        lminfo = {\n            'h': int(time.time()) * 1000,\n            'i': -246397986,\n            'o': 'iphone',\n            's': 'G_c17a64eff3f144a1a48d9f02e8d981c2',\n            't': 'H',\n            'v': '4.20.43',\n            'w': 'a710244508d3cc14f50d24e9fecc496a'\n        }\n        u = g(urlencode(lminfo))\n        lminfo = f'G={u}&{urlencode(lminfo)}'\n        with requests.Session() as s:\n            res = s.post(self.BASE_URL, json=roominfo, headers={'lminfo': lminfo}).json()\n        code = res['code']\n        if code == 200:\n            status = res['data']['isLiving']\n            if status == 'True':\n                real_url = res['data']['playUrl']\n                return real_url\n            else:\n                raise Exception('未开播')\n        elif code == -1:\n            raise Exception('输入错误')\n        elif code == 1201:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        lm = LM(rid)\n        return lm.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入羚萌直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "95xiu.py",
    "content": "# 95秀：http://www.95.cn/\n\nimport requests\nimport re\n\n\nclass JWXiu:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://www.95.cn/{self.rid}.html').text\n        try:\n            uid = re.search(r'\"uid\":(\\d+),', res).group(1)\n            status = re.search(r'\"is_offline\":\"(\\d)\"', res).group(1)\n        except AttributeError:\n            raise Exception('没有找到直播间')\n        if status == '0':\n            real_url = f'https://play1.95xiu.com/app/{uid}.flv'\n            return real_url\n        else:\n            raise Exception('未开播')\n\n\ndef get_real_url(rid):\n    try:\n        jwx = JWXiu(rid)\n        return jwx.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入95秀房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "9xiu.py",
    "content": "# 九秀直播：https://www.9xiu.com/other/classify?tag=all&index=all\n\nimport requests\n\n\nclass JXiu:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            url = f'https://h5.9xiu.com/room/live/enterRoom?rid={self.rid}'\n            headers = {\n                'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) '\n                              'AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'\n            }\n            res = s.get(url, headers=headers).json()\n        if res['code'] == 200:\n            status = res['data']['status']\n            if status == 0:\n                raise Exception('未开播')\n            elif status == 1:\n                live_url = res['data']['live_url']\n                return live_url\n        else:\n            raise Exception('直播间可能不存在')\n\n\ndef get_real_url(rid):\n    try:\n        jx = JXiu(rid)\n        return jx.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入九秀直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n"
  },
  {
    "path": "README.md",
    "content": "# Real-Url\n\n## 说明\n\n没想到还有这么多朋友发 issue 和邮件咨询问题，感谢大家的支持🎈！因为有时很忙，回复和提交代码的周期会有点长，抱歉哦😋\n\n这个仓库存放的是：获取一些直播平台真实流媒体地址（直播源）和弹幕的 Python 代码实现。获取的地址经测试，均可在 PotPlayer、VLC、DPlayer(flv.js + hls.js)等播放器中播放。\n\n>  🤘👌🤙🙏🐉👉 ：如果该项目能帮助到您，欢迎 star 和 pr；或在您的项目中标注 Real-Url 为参考来源。\n\n目前已实现：\n\n **59** 个直播平台的直播源获取：斗鱼直播、虎牙直播、哔哩哔哩直播、战旗直播、网易 CC 直播、火猫直播、企鹅电竞、YY 直播、一直播、快手直播、花椒直播、映客直播、西瓜直播、触手直播（已倒闭）、NOW 直播、抖音直播，爱奇艺直播、酷狗直播、龙珠直播、PPS 奇秀直播、六间房、17 直播、来疯直播、优酷轮播台、网易 LOOK 直播、千帆直播、陌陌直播、小米直播、迅雷直播、京东直播、企鹅体育、人人直播、棉花糖直播、九秀直播、羚萌直播、95秀、新浪疯播、红人直播、艾米直播、KK直播、酷我聚星、乐嗨直播、秀色直播、星光直播、我秀直播、热猫直播、艺气山直播、AcFun 直播、猫耳FM、畅秀阁、Twitch、TikTok、央视频、PP体育、zhibotv、腾讯体育直播、爱奇艺体育直播、liveU、bigolive、咪咕视频体育。\n\n **18** 个直播平台的弹幕获取：斗鱼直播、虎牙直播、哔哩哔哩直播、快手直播、火猫直播、企鹅电竞、花椒直播、映客直播、网易 CC 直播、酷狗直播、龙珠直播、PPS 奇秀、搜狐千帆、战旗直播、来疯直播、网易 LOOK 直播、AcFun 直播、艺气山直播。\n\n## 运行\n\n1. 项目使用了很简单的 Python 代码，仅在 Python 3 环境运行测试。\n2. 具体所需模块请查看 requirements.txt\n3. 获取斗鱼和爱奇艺的直播源，需 JavaScript 环境，可使用 node.js。爱奇艺直播里有个参数是加盐的 MD5，由仓库中的 iqiyi.js 生成。\n4. 每个平台的直播源和弹幕获取功能相互独立，以后再整合。弹幕食用：python main.py\n\n## 反馈\n\n有直播平台失效或新增其他平台解析的，可发 [issue](https://github.com/wbt5/real-url/issues/new)。\n\n## 更新\n2021.11.7：:sparkles:新增咪咕体育。\n\n2021.8.15：:sparkles:新增 liveU、bigolive。\n\n2021.7.4：:art:更新哔哩哔哩直播源；:bug:修复Acfun直播弹幕；:bug:修复企鹅电竞弹幕。\n\n2021.6.20：:sparkles:新增爱奇艺体育直播。\n\n2021.6.13：:bug:修复腾讯体育。\n\n2021.6.12：:bug:修复斗鱼直播。\n\n2021.05.22：:sparkles:新增腾讯体育直播。\n\n2021.05.15：:art:更新爱奇艺、:bug:修复战旗直播。\n\n2021.05.13： :sparkles:新增 zhibotv。\n\n2021.05.05：:sparkles:新增 PP体育。\n\n2021.05.03：:sparkles:新增 央视频。\n\n2021.05.02：:sparkles:新增 Twitch、TikTok。\n\n2021.05.01：:sparkles:新增畅秀阁、猫耳FM。\n\n2020.12.20：修复直播源：抖音、艺气山、花椒、快手、来疯、龙珠、PPS、人人直播、17live 可能需要挂代理。\n\n2020.10.17：修复：西瓜直播、YY直播。\n\n2020.09.26：更新：虎牙直播源；注释掉未完成的 YY 直播弹幕功能。\n\n2020.09.12：新增：斗鱼添加一个从PC网页端获取直播源的方法，可选线路和清晰度；新增requirements.txt文件；更新代码。\n\n2020.08.18：更新快手直播源，现在播放链接需要带参数；更新快手直播弹幕，直接用 protobuf 序列化；新增 AcFun、艺气山两个平台的弹幕功能。\n\n2020.08.08：新增 AcFun 直播、艺气山直播；更新：哔哩哔哩直播、虎牙直播、红人直播；优化：斗鱼直播。\n\n2020.07.31：新增 19 个直播平台，详见上面说明；更新YY直播，现在可以获取最高画质；优化战旗直播、优酷直播代码；\n\n2020.07.25：新增网易 LOOK 直播弹幕获取；修复斗鱼直播源；新增陌陌直播源。\n\n2020.07.19：新增来疯直播弹幕获取\n\n2020.07.18：新增酷狗、龙珠、PPS奇秀、搜狐千帆、战旗直播等5个平台的弹幕获取\n\n2020.07.11：新增网易CC直播弹幕获取\n\n2020.07.05：新增花椒直播、映客直播弹幕获取；更新虎牙直播源\n\n2020.06.25：新增🐧企鹅电竞弹幕获取\n\n2020.06.19：新增火猫直播弹幕获取\n\n2020.06.18：新增弹幕功能\n\n- 添加斗鱼、虎牙、哔哩哔哩和快手 4 个平台的弹幕获取。后续添加其他平台。\n- 实现弹幕功能的代码和思路主要来自：[danmaku](https://github.com/IsoaSFlus/danmaku) 和 [ks_barrage](https://github.com/py-wuhao/ks_barrage)，感谢两位大佬！\n\n2020.05.30：更新虎牙直播。\n\n2020.05.25：更新哔哩哔哩直播。\n\n- 默认获取最高画质，不同清晰度取决于请求参数中的 qn。\n- 增加 .m3u8 格式播放链接的获取方法。\n\n2020.05.23：更新17直播、虎牙直播\n\n2020.05.19：更新火猫、快手、酷狗、PPS\n\n2020.05.08：新增优酷轮播台、look 直播、千帆直播；\n\n- 新增优酷轮播台：优酷轮播台是优酷直播下的一个子栏目，轮播一些经典电影电视剧，个人感觉要比其他直播平台影视区的画质要好，而且没有平台水印和主播自己贴的乱七八糟的字幕遮挡。\n- 新增 LOOK 直播：LOOK 直播是网易云音乐旗下的直播平台。\n- 新增千帆直播：千帆直播是搜狐旗下的直播平台。\n\n2020.05.01：新增优酷的来疯直播。\n\n2020.04.30：新增17直播。\n\n2020.04.24：修复虎牙、哔哩哔哩、快手、爱奇艺。\n\n2020.02.26：更新一直播。\n\n2020.01.18：更新抖音直播。\n\n2020.01.10：新增酷狗直播、龙珠直播、PPS奇秀直播、六间房。\n\n2020.01.09：新增爱奇艺直播。\n\n2020.01.07：新增抖音直播；删除一个直播平台。\n\n2020.01.03：修复快手直播，请求移动网页版。 \n\n2019.12.31：修复快手直播。 \n\n2019.12.07：修复哔哩哔哩直播。\n\n2019.12.04：更新斗鱼直播，新增一种获取方式。\n\n2019.11.24：新增收米直播。\n\n2019.11.18：新增西瓜直播；触手直播；NOW直播。\n\n2019.11.18：新增一直播；快手直播；花椒直播；映客直播。\n\n2019.11.17：新增火猫直播；新增企鹅电竞；新增YY直播。\n\n2019.11.16：新增战旗tv直播源；新增网易CC直播。\n\n2019.11.09：新增哔哩哔哩直播源。\n\n2019.11.03：新增虎牙直播源。\n\n2019.11.02：修复斗鱼预览地址获取的方法；新增未开播房间的判断。\n\n## 鸣谢\n\n感谢 [JetBrains](https://www.jetbrains.com/?from=real-url) 提供的 free JetBrains Open Source license\n\n[![JetBrains-logo](https://i.loli.net/2020/10/03/E4h5FZmSfnGIgap.png)](https://www.jetbrains.com/?from=real-url)\n\n"
  },
  {
    "path": "acfun.py",
    "content": "# AcFun直播：https://live.acfun.cn/\n# 默认最高画质\n\nimport requests\nimport json\n\n\nclass AcFun:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'content-type': 'application/x-www-form-urlencoded',\n            'cookie': '_did=H5_',\n            'referer': 'https://m.acfun.cn/'\n        }\n        url = 'https://id.app.acfun.cn/rest/app/visitor/login'\n        data = 'sid=acfun.api.visitor'\n        with requests.Session() as s:\n            res = s.post(url, data=data, headers=headers).json()\n        userid = res['userId']\n        visitor_st = res['acfun.api.visitor_st']\n\n        url = 'https://api.kuaishouzt.com/rest/zt/live/web/startPlay'\n        params = {\n            'subBiz': 'mainApp',\n            'kpn': 'ACFUN_APP',\n            'kpf': 'PC_WEB',\n            'userId': userid,\n            'did': 'H5_',\n            'acfun.api.visitor_st': visitor_st\n        }\n        data = f'authorId={self.rid}&pullStreamType=FLV'\n        res = s.post(url, params=params, data=data, headers=headers).json()\n        if res['result'] == 1:\n            data = res['data']\n            videoplayres = json.loads(data['videoPlayRes'])\n            liveadaptivemanifest, = videoplayres['liveAdaptiveManifest']\n            adaptationset = liveadaptivemanifest['adaptationSet']\n            representation = adaptationset['representation'][-1]\n            real_url = representation['url']\n            return real_url\n        else:\n            raise Exception('直播已关闭')\n\n\ndef get_real_url(rid):\n    try:\n        acfun = AcFun(rid)\n        return acfun.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入AcFun直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "bigo.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/8/15 16:00\n# @Project: my-spiders\n# @Author: wbt5\n# @Blog: https://wbt5.com\n# BIGO LIVE:https://www.bigo.tv/cn/\n\nimport requests\n\n\nclass Bigo:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            url = f'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo'\n            res = s.post(url, data={'siteId': self.rid}).json()\n            hls_src = res['data']['hls_src']\n            play_url = hls_src if hls_src else '不存在或未开播'\n            return play_url\n\n\ndef get_real_url(rid):\n    try:\n        url = Bigo(rid)\n        return url.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入bigo直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "bilibili.py",
    "content": "# 获取哔哩哔哩直播的真实流媒体地址，默认获取直播间提供的最高画质\n# qn=150高清\n# qn=250超清\n# qn=400蓝光\n# qn=10000原画\nimport requests\n\n\nclass BiliBili:\n\n    def __init__(self, rid):\n        \"\"\"\n        有些地址无法在PotPlayer播放，建议换个播放器试试\n        Args:\n            rid:\n        \"\"\"\n        rid = rid\n        self.header = {\n            'User-Agent': 'Mozilla/5.0 (iPod; CPU iPhone OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) CriOS/87.0.4280.163 Mobile/15E148 Safari/604.1',\n        }\n        # 先获取直播状态和真实房间号\n        r_url = 'https://api.live.bilibili.com/room/v1/Room/room_init'\n        param = {\n            'id': rid\n        }\n        with requests.Session() as self.s:\n            res = self.s.get(r_url, headers=self.header, params=param).json()\n        if res['msg'] == '直播间不存在':\n            raise Exception(f'bilibili {rid} {res[\"msg\"]}')\n        live_status = res['data']['live_status']\n        if live_status != 1:\n            raise Exception(f'bilibili {rid} 未开播')\n        self.real_room_id = res['data']['room_id']\n\n    def get_real_url(self, current_qn: int = 10000) -> dict:\n        url = 'https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo'\n        param = {\n            'room_id': self.real_room_id,\n            'protocol': '0,1',\n            'format': '0,1,2',\n            'codec': '0,1',\n            'qn': current_qn,\n            'platform': 'h5',\n            'ptype': 8,\n        }\n        res = self.s.get(url, headers=self.header, params=param).json()\n        stream_info = res['data']['playurl_info']['playurl']['stream']\n        qn_max = 0\n\n        for data in stream_info:\n            accept_qn = data['format'][0]['codec'][0]['accept_qn']\n            for qn in accept_qn:\n                qn_max = qn if qn > qn_max else qn_max\n        if qn_max != current_qn:\n            param['qn'] = qn_max\n            res = self.s.get(url, headers=self.header, params=param).json()\n            stream_info = res['data']['playurl_info']['playurl']['stream']\n\n        stream_urls = {}\n        # flv流无法播放，暂修改成获取hls格式的流，\n        for data in stream_info:\n            format_name = data['format'][0]['format_name']\n            if format_name == 'ts':\n                base_url = data['format'][-1]['codec'][0]['base_url']\n                url_info = data['format'][-1]['codec'][0]['url_info']\n                for i, info in enumerate(url_info):\n                    host = info['host']\n                    extra = info['extra']\n                    stream_urls[f'线路{i + 1}'] = f'{host}{base_url}{extra}'\n                break\n        return stream_urls\n\n\ndef get_real_url(rid):\n    try:\n        bilibili = BiliBili(rid)\n        return bilibili.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入bilibili直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "cc.py",
    "content": "# 获取网易CC的真实流媒体地址。\n# 默认为最高画质\n\nimport requests\n\n\nclass CC:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        room_url = f'https://api.cc.163.com/v1/activitylives/anchor/lives?anchor_ccid={self.rid}'\n        response = requests.get(url=room_url).json()\n        data = response.get('data', 0)\n        if data:\n            channel_id = data.get(f'{self.rid}').get('channel_id', 0)\n            if channel_id:\n                response = requests.get(f'https://cc.163.com/live/channel/?channelids={channel_id}').json()\n                real_url = response.get('data')[0].get('sharefile')\n            else:\n                raise Exception('直播间不存在')\n        else:\n            raise Exception('输入错误')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        cc = CC(rid)\n        return cc.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入网易CC直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "changyou.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/1 17:40\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport json\n\nimport requests\n\n\nclass ChangYou:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 '\n        }\n        url = 'http://cxg.changyou.com/landingpage/getstreamname.action?roomid={}'.format(self.rid)\n        with requests.Session() as s:\n            res = s.get(url, headers=headers).json()\n        try:\n            code = res['code']\n            if code == 'error':\n                return res['msg']\n            else:\n                stream = res['obj']['stream']\n                url = 'http://pull.wscdn.cxg.changyou.com/show/{}.flv'.format(stream)\n                return url\n        except json.decoder.JSONDecodeError:\n            return '输入错误'\n\n\ndef get_real_url(rid):\n    try:\n        cxg = ChangYou(rid)\n        return cxg.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入畅秀阁roomid：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "danmu/danmaku/__init__.py",
    "content": "import asyncio\nimport re\n\nimport aiohttp\n\nfrom .yqs import YiQiShan\nfrom .acfun import AcFun\nfrom .bilibili import Bilibili\nfrom .cc import CC\nfrom .douyu import Douyu\nfrom .egame import eGame\nfrom .huajiao import HuaJiao\nfrom .huomao import HuoMao\nfrom .huya import Huya\nfrom .inke import Inke\nfrom .kuaishou import KuaiShou\nfrom .kugou import KuGou\nfrom .laifeng import LaiFeng\nfrom .longzhu import LongZhu\nfrom .look import Look\nfrom .pps import QiXiu\nfrom .qf import QF\nfrom .zhanqi import ZhanQi\n# from .yy import YY\n\n__all__ = ['DanmakuClient']\n\n\nclass DanmakuClient:\n    def __init__(self, url, q):\n        self.__url = ''\n        self.__site = None\n        self.__hs = None\n        self.__ws = None\n        self.__stop = False\n        self.__dm_queue = q\n        self.__link_status = True\n        if 'http://' == url[:7] or 'https://' == url[:8]:\n            self.__url = url\n        else:\n            self.__url = 'http://' + url\n        for u, s in {'douyu.com': Douyu,\n                     'live.bilibili.com': Bilibili,\n                     'huya.com': Huya,\n                     'huomao.com': HuoMao,\n                     'kuaishou.com': KuaiShou,\n                     'egame.qq.com': eGame,\n                     'huajiao.com': HuaJiao,\n                     'inke.cn': Inke,\n                     'cc.163.com': CC,\n                     'fanxing.kugou.com': KuGou,\n                     'zhanqi.tv': ZhanQi,\n                     'longzhu.com': LongZhu,\n                     'pps.tv': QiXiu,\n                     'qf.56.com': QF,\n                     'laifeng.com': LaiFeng,\n                     'look.163.com': Look,\n                     'acfun.cn': AcFun,\n                     '173.com': YiQiShan,\n                     'yy.com': ''}.items():\n            if re.match(r'^(?:http[s]?://)?.*?%s/(.+?)$' % u, url):\n                self.__site = s\n                self.__u = u\n                break\n        if self.__site is None:\n            print('Invalid link!')\n            exit()\n        self.__hs = aiohttp.ClientSession()\n\n    async def init_ws(self):\n        ws_url, reg_datas = await self.__site.get_ws_info(self.__url)\n        self.__ws = await self.__hs.ws_connect(ws_url)\n        if reg_datas:\n            for reg_data in reg_datas:\n                if self.__u == 'qf.56.com' or self.__u == 'laifeng.com' or self.__u == 'look.163.com':\n                    await self.__ws.send_str(reg_data)\n                else:\n                    await self.__ws.send_bytes(reg_data)\n\n    async def heartbeats(self):\n        while not self.__stop and self.__site.heartbeat:\n            await asyncio.sleep(self.__site.heartbeatInterval)\n            try:\n                if self.__u == 'qf.56.com' or self.__u == 'laifeng.com' or self.__u == 'look.163.com':\n                    await self.__ws.send_str(self.__site.heartbeat)\n                else:\n                    await self.__ws.send_bytes(self.__site.heartbeat)\n            except:\n                pass\n\n    async def fetch_danmaku(self):\n        while not self.__stop:\n            async for msg in self.__ws:\n                self.__link_status = True\n                ms = self.__site.decode_msg(msg.data)\n                for m in ms:\n                    await self.__dm_queue.put(m)\n            await asyncio.sleep(1)\n            await self.init_ws()\n            await asyncio.sleep(1)\n\n    async def init_ws_huajiao(self):\n        rid = re.search(r'\\d+', self.__url).group(0)\n        s = self.__site(rid)\n        self.__ws = await self.__hs.ws_connect(self.__site.ws_url)\n        await self.__ws.send_bytes(s.sendHandshakePack())\n        count = 0\n        async for msg in self.__ws:\n            if count == 0:\n                await self.__ws.send_bytes(s.sendLoginPack(msg.data))\n            elif count == 1:\n                await self.__ws.send_bytes(s.sendJoinChatroomPack(msg.data))\n            elif count > 2:\n                ms = s.decode_msg(msg.data)\n                for m in ms:\n                    await self.__dm_queue.put(m)\n            count += 1\n\n    async def init_ws_acfun(self):\n        self.__ws = await self.__hs.ws_connect(self.__site.ws_url)\n        await self.__ws.send_bytes(self.__s.encode_packet('register'))\n\n    async def ping_acfun(self):\n        while True:\n            await asyncio.sleep(1)\n            await self.__ws.send_bytes(self.__s.encode_packet('ping'))\n\n    async def keepalive_acfun(self):\n        while True:\n            await asyncio.sleep(50)\n            await self.__ws.send_bytes(self.__s.encode_packet('keepalive'))\n\n    async def heartbeat_acfun(self):\n        while True:\n            await asyncio.sleep(10)\n            await self.__ws.send_bytes(self.__s.encode_packet('ztlivecsheartbeat'))\n\n    async def fetch_danmaku_acfun(self):\n        count = 0\n        async for msg in self.__ws:\n            self.__link_status = True\n            ms = self.__s.decode_packet(msg.data)\n            if count == 0:\n                await self.__ws.send_bytes(self.__s.encode_packet('ztlivecsenterroom'))\n                count += 1\n            for m in ms:\n                await self.__dm_queue.put(m)\n\n    async def init_ws_173(self):\n        self.__ws = await self.__hs.ws_connect(self.__site.ws_url)\n        await self.__ws.send_bytes(self.__s.pack('startup'))\n        await asyncio.sleep(1)\n        await self.__ws.send_bytes(self.__s.pack('enterroomreq'))\n\n    async def tcphelloreq_173(self):\n        while True:\n            await asyncio.sleep(10)\n            await self.__ws.send_bytes(self.__s.pack('tcphelloreq'))\n\n    async def roomhelloreq_173(self):\n        while True:\n            await asyncio.sleep(5)\n            await self.__ws.send_bytes(self.__s.pack('roomhelloreq'))\n\n    async def fetch_danmaku_173(self):\n        async for msg in self.__ws:\n            self.__link_status = True\n            ms = self.__s.unpack(msg.data)\n            for m in ms:\n                await self.__dm_queue.put(m)\n\n    async def init_ws_yy(self):\n        self.__ws = await self.__hs.ws_connect(self.__site.ws_url)\n        await self.__ws.send_bytes(self.__s.LoginUDB())\n\n    async def heartbeat_yy(self):\n        while True:\n            await asyncio.sleep(10)\n            await self.__ws.send_bytes(self.__s.pingAp())\n\n    async def fetch_danmaku_yy(self):\n        count = 0\n        async for msg in self.__ws:\n            self.__link_status = True\n            ms = self.__s.onProto(msg.data)\n            if count == 0:\n                await self.__ws.send_bytes(self.__s.loginAp())\n                await self.__ws.send_bytes(self.__s.joinServiceBc())\n                count += 1\n            for m in ms:\n                await self.__dm_queue.put(m)\n\n    async def start(self):\n        if self.__u == 'huajiao.com':\n            await self.init_ws_huajiao()\n        elif self.__u == 'acfun.cn':\n            rid = re.search(r'\\d+', self.__url).group(0)\n            self.__s = self.__site(rid)\n            await self.init_ws_acfun()\n            await asyncio.gather(\n                self.ping_acfun(),\n                self.fetch_danmaku_acfun(),\n                self.keepalive_acfun(),\n                self.heartbeat_acfun(),\n            )\n        elif self.__u == '173.com':\n            rid = self.__url.split('/')[-1]\n            self.__s = self.__site(rid)\n            await self.init_ws_173()\n            await asyncio.gather(\n                self.fetch_danmaku_173(),\n                self.tcphelloreq_173(),\n                self.roomhelloreq_173(),\n            )\n        elif self.__u == 'yy.com':\n            rid = self.__url.split('/')[-1]\n            self.__s = self.__site(int(rid))\n            await self.init_ws_yy()\n            await asyncio.gather(\n                self.fetch_danmaku_yy(),\n                self.heartbeat_yy()\n            )\n        else:\n            await self.init_ws()\n            await asyncio.gather(\n                self.heartbeats(),\n                self.fetch_danmaku(),\n            )\n\n    async def stop(self):\n        self.__stop = True\n        await self.__hs.close()\n"
  },
  {
    "path": "danmu/danmaku/acfun.proto",
    "content": "syntax = \"proto2\";\npackage AcFunPack;\n\nmessage RegisterRequest {\n    optional AppInfo appInfo = 1;\n    optional DeviceInfo deviceInfo = 2;\n    optional EnvInfo envInfo = 3;\n    optional PresenceStatus presenceStatus = 4;\n    optional ActiveStatus appActiveStatus = 5;\n    optional bytes appCustomStatus = 6;\n    optional PushServiceToken pushServiceToken = 7;\n    optional int64 instanceId = 8;\n    repeated PushServiceToken pushServiceTokenList = 9;\n    optional int32 keepaliveIntervalSec = 10;\n    optional ZtCommonInfo ztCommonInfo = 11;\n\n    enum PresenceStatus {\n        kPresenceOffline = 0;\n        kPresenceOnline = 1;\n    }\n\n    enum ActiveStatus {\n        kInvalid = 0;\n        kAppInForeground = 1;\n        kAppInBackground = 2;\n    }\n}\n\nmessage RegisterResponse {\n    optional AccessPointsConfig accessPointsConfig = 1;\n    optional bytes sessKey = 2;\n    optional int64 instanceId = 3;\n    optional SdkOption sdkOption = 4;\n    optional AccessPointsConfig accessPointsConfigIpv6 = 5;\n}\n\nmessage AccessPointsConfig {\n    repeated AccessPoint optimalAps = 1;\n    repeated AccessPoint backupAps = 2;\n    repeated uint32 availablePorts = 3;\n    optional AccessPoint forceLastConnectedAp = 4;\n}\n\nmessage AccessPoint {\n    optional AddressType addressType = 1;\n    optional uint32 port = 2;\n    optional fixed32 ipV4 = 3;\n    optional bytes ipV6 = 4;\n    optional string domain = 5;\n\n    enum AddressType {\n        kIPV4 = 0;\n        kIPV6 = 1;\n        kDomain = 2;\n    }\n}\n\nmessage SdkOption {\n    optional int32 reportIntervalSeconds = 1;\n    optional string reportSecurity = 2;\n    optional int32 lz4CompressionThresholdBytes = 3;\n    repeated string netCheckServers = 4;\n}\n\nmessage ZtLiveCsEnterRoom {\n\toptional bool isAuthor = 1;\n\toptional uint32 reconnectCount = 2;\n\toptional uint32 lastErrorCode = 3;\n\toptional string enterRoomAttach = 4;\n\toptional string clientLiveSdkVersion = 5;\n}\n\nmessage ZtLiveCsHeartbeat {\n\toptional uint64 clientTimestampMs = 1;\n\toptional bool sequence = 2;\n}\n\nmessage CsCmd {\n\toptional string cmdType = 1;\n\toptional bytes payload = 2;\n\toptional string ticket = 3;\n\toptional string liveId = 4;\n}\n\nmessage AppInfo {\n    optional string appName = 1;\n    optional string appVersion = 2;\n    optional string appChannel = 3;\n    optional string sdkVersion = 4;\n    map < string,\n    string > extensionInfo = 5;\n}\n\nmessage DeviceInfo {\n    optional PlatformType platformType = 1;\n    optional string osVersion = 2;\n    optional string deviceModel = 3;\n    optional bytes imeiMd5 = 4;\n    optional string deviceId = 5;\n    optional string softDid = 6;\n    optional string kwaiDid = 7;\n    optional string manufacturer = 8;\n    optional string deviceName = 9;\n\n    enum PlatformType {\n        kInvalid = 0;\n        kAndroid = 1;\n        kiOS = 2;\n        kWindows = 3;\n        WECHAT_ANDROID = 4;\n        WECHAT_IOS = 5;\n        H5 = 6;\n        H5_ANDROID = 7;\n        H5_IOS = 8;\n        H5_WINDOWS = 9;\n        H5_MAC = 10;\n        kPlatformNum = 11;\n    }\n}\n\nmessage EnvInfo {\n    optional NetworkType networkType = 1;\n    optional bytes apnName = 2;\n\n    enum NetworkType {\n        kInvalid = 0;\n        kWIFI = 1;\n        kCellular = 2;\n    }\n}\n\nmessage PushServiceToken {\n    optional PushType pushType = 1;\n    optional bytes token = 2;\n    optional bool isPassThrough = 3;\n\n    enum PushType {\n        kPushTypeInvalid = 0;\n        kPushTypeAPNS = 1;\n        kPushTypeXmPush = 2;\n        kPushTypeJgPush = 3;\n        kPushTypeGtPush = 4;\n        kPushTypeOpPush = 5;\n        kPushTypeVvPush = 6;\n        kPushTypeHwPush = 7;\n        kPushTypeFcm = 8;\n    }\n}\n\nmessage ZtCommonInfo {\n    optional string kpn = 1;\n    optional string kpf = 2;\n    optional int64 uid = 4;\n    optional string did = 5;\n}\n\nmessage PingResponse {\n    optional sfixed32 serverTimestamp = 1;\n    optional fixed32 clientIp = 2;\n    optional fixed32 redirectIp = 3;\n    optional uint32 redirectPort = 4;\n}\n\nmessage PingRequest {\n    optional PingType pingType = 1;\n    optional uint32 pingRound = 2;\n\n    enum PingType {\n        kInvalid = 0;\n        kPriorRegister = 1;\n        kPostRegister = 2;\n    }\n}\n\nmessage UpstreamPayload {\n    optional string command = 1;\n    optional int64 seqId = 2;\n    optional uint32 retryCount = 3;\n    optional bytes payloadData = 4;\n    optional UserInstance userInstance = 5;\n    optional int32 errorCode = 6;\n    optional SettingInfo settingInfo = 7;\n    optional RequsetBasicInfo requestBasicInfo = 8;\n    optional string subBiz = 9;\n    optional FrontendInfo frontendInfo = 10;\n    optional string kpn = 11;\n    optional bool anonymouseUser = 12;\n}\n\nmessage DownstreamPayload {\n    optional string command = 1;\n    optional int64 seqId = 2;\n    optional int32 errorCode = 3;\n    optional bytes payloadData = 4;\n    optional string errorMsg = 5;\n    optional bytes errorData = 6;\n    optional string subBiz = 7;\n}\n\nmessage UserInstance {\n    optional User user = 1;\n    optional int64 instanceId = 2;\n}\n\nmessage User {\n    optional int32 appId = 1;\n    optional int64 uid = 2;\n}\n\nmessage SettingInfo {\n    optional string locale = 1;\n    optional sint32 timezone = 2;\n}\n\nmessage RequsetBasicInfo {\n    optional DeviceInfo.PlatformType clientType = 1;\n    optional string deviceId = 2;\n    optional string clientIp = 3;\n    optional string appVersion = 4;\n    optional string channel = 5;\n    optional AppInfo appInfo = 6;\n    optional DeviceInfo deviceInfo = 7;\n    optional EnvInfo envInfo = 8;\n    optional int32 clientPort = 9;\n    optional string location = 10;\n    optional string kpf = 11;\n}\n\nmessage FrontendInfo {\n    optional string ip = 1;\n    optional int32 port = 2;\n}\n\nmessage PacketHeader {\n    optional int32 appId = 1;\n    optional int64 uid = 2;\n    optional int64 instanceId = 3;\n    optional uint32 flags = 4;\n    optional EncodingType encodingType = 6;\n    optional uint32 decodedPayloadLen = 7;\n    optional EncryptionMode encryptionMode = 8;\n    optional TokenInfo tokenInfo = 9;\n    optional int64 seqId = 10;\n    repeated Feature features = 11;\n    optional string kpn = 12;\n\n    enum Flags {\n        option allow_alias = true;\n        kDirUpstream = 0;\n        kDirDownstream = 1;\n        kDirMask = 1;\n    }\n\n    enum EncodingType {\n        kEncodingNone = 0;\n        kEncodingLz4 = 1;\n    }\n\n    enum EncryptionMode {\n        kEncryptionNone = 0;\n        kEncryptionServiceToken = 1;\n        kEncryptionSessionKey = 2;\n    }\n\n    enum Feature {\n        kReserve = 0;\n        kCompressLz4 = 1;\n    }\n}\n\nmessage TokenInfo {\n    optional TokenType tokenType = 1;\n    optional bytes token = 2;\n\n    enum TokenType {\n        kInvalid = 0;\n        kServiceToken = 1;\n    }\n}\n\nmessage KeepAliveRequest {\n    optional RegisterRequest.PresenceStatus presenceStatus = 1;\n    optional RegisterRequest.ActiveStatus appActiveStatus = 2;\n    optional PushServiceToken pushServiceToken = 3;\n    repeated PushServiceToken pushServiceTokenList = 4;\n    repeated int32 keepaliveIntervalSec = 5;\n}\n\nmessage ZtLiveScMessage {\n    optional string messageType = 1;\n    optional int32 compressionType = 2;\n    optional bytes payload = 3;\n    optional string liveId = 4;\n    optional string ticket = 5;\n    optional uint64 serverTimestampMs = 6;\n}\n\nmessage ZtLiveScNotifySignal {\n    repeated ZtLiveNotifySignalItem item = 1;\n\n    message ZtLiveNotifySignalItem {\n        optional string signalType = 1;\n        repeated bytes payload = 2;\n    }\n}\n\nmessage ZtLiveScActionSignal {\n    repeated ZtLiveActionSignalItem item = 1;\n\n    message ZtLiveActionSignalItem {\n        optional string signalType = 1;\n        repeated bytes payload = 2;\n    }\n}\n\nmessage ZtLiveScStateSignal {\n    repeated ZtLiveStateSignalItem item = 1;\n\n    message ZtLiveStateSignalItem {\n        optional string signalType = 1;\n        repeated bytes payload = 2;\n    }\n}\n\nmessage ZtLiveScStatusChanged {\n    optional int32 type = 1;\n    optional uint64 maxRandomDelayMs = 2;\n    optional BannedInfo bannedInfo = 3;\n\n    message BannedInfo {\n        optional string banReason = 1;\n    }\n}\n\nmessage CommonActionSignalComment {\n    optional string content = 1;\n    optional uint64 sendTimeMs = 2;\n    optional ZtLiveUserInfo userInfo = 3;\n}\n\nmessage CommonActionSignalLike {\n    optional ZtLiveUserInfo userInfo = 1;\n    optional uint64 sendTimeMs = 2;\n}\n\nmessage CommonActionSignalGift {\n    optional ZtLiveUserInfo userInfo = 1;\n    optional uint64 sendTimeMs = 2;\n    optional uint64 giftId = 3;\n    optional uint32 batchSize = 4;\n    optional uint32 comboCount = 5;\n    optional uint64 rank = 6;\n    optional string comboKey = 7;\n    optional uint64 slotDisplayDurationMs = 8;\n    optional uint64 expireDurationMs = 9;\n}\n\nmessage CommonStateSignalDisplayInfo {\n    optional string watchingCount = 1;\n    optional string likeCount = 2;\n    optional uint32 likeDelta = 3;\n}\n\nmessage CommonStateSignalTopUsers {\n    repeated TopUser topUser = 1;\n\n    message TopUser {\n        optional ZtLiveUserInfo userInfo = 1;\n        optional string customWatchingListData = 2;\n        optional string displaySendAmount = 3;\n        optional bool anonymousUser = 4;\n    }\n}\n\nmessage CommonActionSignalUserEnterRoom {\n    optional ZtLiveUserInfo userInfo = 1;\n    optional uint64 sendTimeMs = 2;\n}\n\nmessage CommonActionSignalUserFollowAuthor {\n    optional ZtLiveUserInfo userInfo = 1;\n    optional uint64 sendTimeMs = 2;\n}\n\nmessage CommonActionSignalRichText {\n    optional UserInfoSegment userInfo = 1;\n    optional PlainSegment plain = 2;\n    optional ImageSegment image = 3;\n}\n\nmessage UserInfoSegment {\n\toptional ZtLiveUserInfo user = 1;\n\toptional string color = 2;\n}\n\nmessage PlainSegment {\n\toptional string text = 1;\n\toptional string color = 2;\n}\n\nmessage ImageSegment {\n\toptional ImageCdnNode cdnNode = 1;\n\toptional string alternativeText = 2;\n\toptional string alternativeColor = 3;\n}\n\nmessage CommonNotifySignalKickedOut {\n    optional string reason = 1;\n}\n\nmessage CommonNotifySignalViolationAlert {\n    optional string violationContent = 1;\n}\n\nmessage CommonStateSignalCurrentRedpackList {\n\t\n}\n\nmessage CommonStateSignalRecentComment {\n\toptional CommonActionSignalComment comment = 1;\n}\n\nmessage CommonStateSignalChatReady {\n\toptional string chatId = 1;\n\toptional ZtLiveUserInfo guestUserInfo = 2;\n\toptional int32 mediaType = 3;\n}\n\nmessage CommonStateSignalChatEnd {\n\toptional string chatId = 1;\n\toptional int32 endType = 2;\n}\n\nmessage AcfunActionSignalThrowBanana {\n    optional UserInfo visitor = 1;\n    optional int32 count = 2;\n    optional uint64 sendTimeMs = 3;\n}\n\nmessage AcfunStateSignalDisplayInfo {\n    optional string bananaCount = 1;\n}\n\nmessage AcfunActionSignalJoinClub {\n    optional UserInfo fansInfo = 1;\n    optional UserInfo uperInfo = 2;\n\toptional uint64 joinTimeMs = 3;\n}\n\nmessage ZtLiveUserInfo {\n    optional uint64 userId = 1;\n    optional string nickname = 2;\n    optional ImageCdnNode avatar = 3;\n}\n\nmessage ImageCdnNode {\n    optional string cdn = 1;\n    optional string url = 2;\n    optional string urlPattern = 3;\n}\n\nmessage UserInfo {\n    optional uint64 userId = 1;\n    optional string name = 2;\n}\n"
  },
  {
    "path": "danmu/danmaku/acfun.py",
    "content": "# AcFun直播现在属于快手旗下了，其JS源码中也可以看到很多名为'kuaishou'的变量，所以和快手直播弹幕的获取方法有点类似，都使用了protobuf压缩数据。\n# 在mplayer-live.xxx.js中可以看到所有websocket过程。奇怪的是，其序列化和反序列化时代码并不统一，可能有啥\"特殊意义\"我没看懂。\n# ws请求过程：Register--EnterRoom--Heartbeat,其中Register后返回的第一条数据里有sessionkey和instanceid。\n# 在Chrome调试时发现客户端一直会向服务器发送：每1秒一次ping；每10秒一次keepalive，模拟实现时，不发送也正常。\nimport base64\nimport gzip\nimport struct\nimport time\n\nimport requests\nfrom Crypto import Random\nfrom Crypto.Cipher import AES\nfrom Crypto.Util.Padding import pad\n\nfrom . import acfun_pb2 as pb\n\n\nclass AcFun:\n    ws_url = 'wss://link.xiatou.com/'\n\n    def __init__(self, rid):\n        self.encryptionmode = 0  # 加密模式，0不加密，1时key=ssecurity，2时key=sessionkey\n        self.seqId = 0  # 客户端发送请求时都会加1\n        self.payload_len = 0\n        self.sessionkey = b''\n        self.instanceid = 0  # 初始值0\n        self.gift = {  # 有些直播间的礼物编号不一样，实际打开直播间页面会有一次XHR请求\n            1: '香蕉',\n            17: '快乐水',\n            9: '告白',\n            35: '氧气瓶',\n            4: '牛啤',\n            33: '情书',\n            8: '星蕉雨',\n            31: '金坷垃',\n            34: '狗粮',\n            2: '吃瓜',\n            12: '打Call',\n            32: '变身腰带',\n            15: 'AC机娘',\n            16: '猴岛',\n            10: '666',\n            11: '菜鸡',\n            30: '鸽鸽',\n            13: '立FLAG',\n            6: '魔法棒',\n            7: '好人卡',\n            14: '窜天猴',\n            21: '生日快乐',\n            5: '手柄',\n            29: '大触'\n        }\n        # 下面获取一些加入房间所需注册参数\n        headers = {\n            'content-type': 'application/x-www-form-urlencoded',\n            'cookie': '_did=H5_',\n            'referer': 'https://m.acfun.cn/'\n        }\n        url = 'https://id.app.acfun.cn/rest/app/visitor/login'\n        form_data = 'sid=acfun.api.visitor'\n        with requests.Session() as s:\n            res = s.post(url, data=form_data, headers=headers).json()\n        status, *d = res.values()\n        if status == 0:\n            # 未登陆访客获取的3个参数\n            acsecurity, self.uid, visitor_st = d\n            self.ssecurity = base64.b64decode(acsecurity)\n            self.token = visitor_st.encode()\n        else:\n            raise Exception('token 获取错误')\n        url = 'https://api.kuaishouzt.com/rest/zt/live/web/startPlay'\n        params = {\n            'subBiz': 'mainApp',\n            'kpn': 'ACFUN_APP',\n            'kpf': 'OUTSIDE_IOS_H5',\n            'userId': self.uid,\n            'did': 'H5_',\n            'acfun.api.visitor_st': visitor_st\n        }\n        data = 'authorId={}&pullStreamType=SINGLE_HLS'.format(rid)\n        res = s.post(url, params=params, data=data, headers=headers).json()\n        if res['result'] == 1:\n            data = res['data']\n            # 获取直播间的几个参数\n            self.availabletickets, *_ = data['availableTickets']\n            self.enterroomattach = data['enterRoomAttach']\n            self.liveid = data['liveId']\n        else:\n            raise Exception('直播已关闭')\n\n    @staticmethod\n    # aes加密，iv随机；key值取决去encryptionmode\n    def aes_encode(t, key):\n        t = pad(t, AES.block_size)\n        iv = Random.new().read(AES.block_size)\n        mode = AES.MODE_CBC\n        c = AES.new(key, mode, iv)\n        res = c.encrypt(t)\n        return iv + res  # 把iv加到头部\n\n    @staticmethod\n    # 这里传入的待解密数据不用补全，一直都是16的整数倍。key值取决去encryptionmode。pkcs7模式去掉最后的填充padding。\n    def aes_decode(t, key):\n        iv = t[:16]\n        n = t[16:]\n        # n = pad(n, AES.block_size)\n        mode = AES.MODE_CBC\n        c = AES.new(key, mode, iv)\n        res = c.decrypt(n)\n        length = len(res)\n        padding = res[length - 1]\n        res = res[0:length - padding]\n        return res\n\n    def register(self):\n        # 注册\n        p = pb.RegisterRequest()\n        p.appActiveStatus = 1\n        p.appInfo.appName = 'link-sdk'\n        p.appInfo.sdkVersion = '1.2.1'\n        p.deviceInfo.deviceModel = 'h5'\n        p.deviceInfo.platformType = 6\n        p.instanceId = 0\n        p.presenceStatus = 1\n        p.ztCommonInfo.kpn = 'ACFUN_APP'\n        p.ztCommonInfo.kpf = 'OUTSIDE_IOS_H5'\n        p.ztCommonInfo.uid = self.uid\n        register_data = p.SerializeToString()\n        self.encryptionmode = 1\n        self.seqId = 1\n        return register_data\n\n    def keepalive(self):\n        # keepalive\n        p = pb.KeepAliveRequest()\n        p.appActiveStatus = 1\n        p.presenceStatus = 1\n        keepalive_data = p.SerializeToString()\n        self.encryptionmode = 2\n        self.seqId += 1\n        return keepalive_data\n\n    def ping(self):\n        # ping\n        p = pb.PingRequest()\n        # p.pingType = 2\n        ping_data = p.SerializeToString()\n        self.seqId += 1\n        self.encryptionmode = 2\n        return ping_data\n\n    def ztlivecsenterroom(self):\n        return self.cscmd('ZtLiveCsEnterRoom')\n\n    def ztlivecsheartbeat(self):\n        # 心跳数据\n        return self.cscmd('ZtLiveCsHeartbeat')\n\n    def cscmd(self, payload_type):\n        p = getattr(pb, payload_type)()\n\n        if payload_type == 'ZtLiveCsEnterRoom':\n            p.isAuthor = False\n            p.reconnectCount = 0\n            p.enterRoomAttach = self.enterroomattach\n            p.clientLiveSdkVersion = 'kwai-acfun-live-link'\n        elif payload_type == 'ZtLiveCsHeartbeat':\n            p.sequence = self.seqId\n            p.clientTimestampMs = int(time.time() * 1000)\n\n        payload = p.SerializeToString()\n        p = pb.CsCmd()\n        p.cmdType = payload_type\n        p.ticket = self.availabletickets\n        p.payload = payload\n        p.liveId = self.liveid\n        cscmd_data = p.SerializeToString()\n\n        self.seqId += 1\n        self.encryptionmode = 2\n        return cscmd_data\n\n    def encode_payload(self, payload_type):\n        # 要发送的原始数据都是先序列化再拼接\n        c = {\n            'keepalive': 'Basic.KeepAlive',\n            'register': 'Basic.Register',\n            'ping': 'Basic.Ping',\n            'ztlivecsenterroom': 'Global.ZtLiveInteractive.CsCmd',\n            'ztlivecsheartbeat': 'Global.ZtLiveInteractive.CsCmd'\n        }\n        p = pb.UpstreamPayload()\n        p.command = c[payload_type]\n        p.retryCount = 1\n        p.payloadData = getattr(self, payload_type)()\n        p.seqId = self.seqId\n        p.subBiz = 'mainApp'\n        e = p.SerializeToString()\n        key = self.ssecurity if self.encryptionmode == 1 else self.sessionkey\n        payload_data = AcFun.aes_encode(e, key) if self.encryptionmode != 0 else e\n        self.payload_len = len(e)\n        return payload_data\n\n    def encode_head(self):\n        # 头部数据,里面有原始数据长度\n        p = pb.PacketHeader()\n        p.appId = 13\n        p.decodedPayloadLen = self.payload_len\n        p.encryptionMode = self.encryptionmode\n        p.instanceId = self.instanceid\n        p.kpn = 'ACFUN_APP'\n        p.seqId = self.seqId\n        if self.encryptionmode == 1:\n            p.tokenInfo.tokenType = 1\n            p.tokenInfo.token = self.token\n        p.uid = self.uid\n        head = p.SerializeToString()\n        return head\n\n    def encode_packet(self, payload_type):\n        # 数据组成:固定数据 + 头部长度 + 原始数据长度 + 头部 + 原始数据\n        body = self.encode_payload(payload_type)\n        head = self.encode_head()\n        data = struct.pack('!HHII', 43981, 1, len(head), len(body))\n        data += head + body\n        return data\n\n    def decode_packet(self, data):\n        # 数据解包\n        msgs = [{'name': '', 'content': '', 'msg_type': 'other'}]\n\n        head_length, body_length = struct.unpack('!II', data[4:12])\n\n        if 12 + head_length + body_length != len(data):\n            raise Exception('downstream message size is not correct')\n\n        # 头部解包\n        e = data[12:head_length + 12]\n        c = pb.PacketHeader()\n        c.ParseFromString(e)\n        encryptionmode = c.encryptionMode  # 根据加密模式确定解密的key\n\n        # body解包\n        h = data[head_length + 12:]\n        key = self.ssecurity if encryptionmode == 1 else self.sessionkey\n        n = AcFun.aes_decode(h, key) if encryptionmode != 0 else h\n        u = pb.DownstreamPayload()\n        u.ParseFromString(n)\n\n        # header = c\n        # body = u\n        payload = u.payloadData\n        command = u.command  # 根据command确定返回数据类型\n        # print(command)\n\n        if command == 'Basic.Register':\n            # websocket第一次返回数据,确定sessKey和instanceId\n            p = pb.RegisterResponse()\n            p.ParseFromString(payload)\n            self.sessionkey = p.sessKey\n            self.instanceid = p.instanceId\n\n        elif command == 'Push.ZtLiveInteractive.Message':  # 'Push.ZtLiveInteractive.Message'\n            a = pb.ZtLiveScMessage()\n            a.ParseFromString(payload)\n            o = a.messageType\n            s = a.payload\n\n            if a.compressionType == 2:\n                s = gzip.decompress(s)\n\n            if o == 'ZtLiveScTicketInvalid':\n                raise Exception('ZtLiveScTicketInvalid')\n\n            # o可为'ZtLiveScNotifySignal' 'ZtLiveScActionSignal' 等,弹幕礼物入场点赞等在ZtLiveScActionSignal中\n            elif o == 'ZtLiveScActionSignal':\n                p = getattr(pb, o)()\n                p.ParseFromString(s)\n\n                for i in p.item:\n                    p = getattr(pb, i.signalType)()\n                    # signalType:\n                    # CommonActionSignalComment 评论\n                    # CommonActionSignalGift 礼物\n                    # CommonActionSignalUserEnterRoom 入场\n                    # CommonActionSignalLike 点赞\n                    # CommonActionSignalUserFollowAuthor 关注主播\n                    # 等等等\n                    u = {\n                        'CommonActionSignalUserEnterRoom': '进入直播间',\n                        'CommonActionSignalUserFollowAuthor': '关注了主播',\n                        'CommonActionSignalComment': '',\n                        'CommonActionSignalLike': '点赞了❤',\n                        'CommonActionSignalGift': ''\n                    }\n\n                    for a_payload in i.payload:  # i.payload 是 repeated 类型\n                        p.ParseFromString(a_payload)\n\n                        if i.signalType in u.keys():\n                            user = p.userInfo.nickname\n                            content = u[i.signalType]\n                            if i.signalType == 'CommonActionSignalComment':\n                                content = p.content\n                            elif i.signalType == 'CommonActionSignalGift':\n                                content = '送出 ' + self.gift.get(p.giftId, '')\n\n                            msg = {'name': user, 'content': content, 'msg_type': 'danmaku'}\n                            msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/acfun_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# source: acfun.proto\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom google.protobuf import reflection as _reflection\nfrom google.protobuf import symbol_database as _symbol_database\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor.FileDescriptor(\n  name='acfun.proto',\n  package='AcFunPack',\n  syntax='proto2',\n  serialized_options=None,\n  create_key=_descriptor._internal_create_key,\n  serialized_pb=b'\\n\\x0b\\x61\\x63\\x66un.proto\\x12\\tAcFunPack\\\"\\xfe\\x04\\n\\x0fRegisterRequest\\x12#\\n\\x07\\x61ppInfo\\x18\\x01 \\x01(\\x0b\\x32\\x12.AcFunPack.AppInfo\\x12)\\n\\ndeviceInfo\\x18\\x02 \\x01(\\x0b\\x32\\x15.AcFunPack.DeviceInfo\\x12#\\n\\x07\\x65nvInfo\\x18\\x03 \\x01(\\x0b\\x32\\x12.AcFunPack.EnvInfo\\x12\\x41\\n\\x0epresenceStatus\\x18\\x04 \\x01(\\x0e\\x32).AcFunPack.RegisterRequest.PresenceStatus\\x12@\\n\\x0f\\x61ppActiveStatus\\x18\\x05 \\x01(\\x0e\\x32\\'.AcFunPack.RegisterRequest.ActiveStatus\\x12\\x17\\n\\x0f\\x61ppCustomStatus\\x18\\x06 \\x01(\\x0c\\x12\\x35\\n\\x10pushServiceToken\\x18\\x07 \\x01(\\x0b\\x32\\x1b.AcFunPack.PushServiceToken\\x12\\x12\\n\\ninstanceId\\x18\\x08 \\x01(\\x03\\x12\\x39\\n\\x14pushServiceTokenList\\x18\\t \\x03(\\x0b\\x32\\x1b.AcFunPack.PushServiceToken\\x12\\x1c\\n\\x14keepaliveIntervalSec\\x18\\n \\x01(\\x05\\x12-\\n\\x0cztCommonInfo\\x18\\x0b \\x01(\\x0b\\x32\\x17.AcFunPack.ZtCommonInfo\\\";\\n\\x0ePresenceStatus\\x12\\x14\\n\\x10kPresenceOffline\\x10\\x00\\x12\\x13\\n\\x0fkPresenceOnline\\x10\\x01\\\"H\\n\\x0c\\x41\\x63tiveStatus\\x12\\x0c\\n\\x08kInvalid\\x10\\x00\\x12\\x14\\n\\x10kAppInForeground\\x10\\x01\\x12\\x14\\n\\x10kAppInBackground\\x10\\x02\\\"\\xda\\x01\\n\\x10RegisterResponse\\x12\\x39\\n\\x12\\x61\\x63\\x63\\x65ssPointsConfig\\x18\\x01 \\x01(\\x0b\\x32\\x1d.AcFunPack.AccessPointsConfig\\x12\\x0f\\n\\x07sessKey\\x18\\x02 \\x01(\\x0c\\x12\\x12\\n\\ninstanceId\\x18\\x03 \\x01(\\x03\\x12\\'\\n\\tsdkOption\\x18\\x04 \\x01(\\x0b\\x32\\x14.AcFunPack.SdkOption\\x12=\\n\\x16\\x61\\x63\\x63\\x65ssPointsConfigIpv6\\x18\\x05 \\x01(\\x0b\\x32\\x1d.AcFunPack.AccessPointsConfig\\\"\\xb9\\x01\\n\\x12\\x41\\x63\\x63\\x65ssPointsConfig\\x12*\\n\\noptimalAps\\x18\\x01 \\x03(\\x0b\\x32\\x16.AcFunPack.AccessPoint\\x12)\\n\\tbackupAps\\x18\\x02 \\x03(\\x0b\\x32\\x16.AcFunPack.AccessPoint\\x12\\x16\\n\\x0e\\x61vailablePorts\\x18\\x03 \\x03(\\r\\x12\\x34\\n\\x14\\x66orceLastConnectedAp\\x18\\x04 \\x01(\\x0b\\x32\\x16.AcFunPack.AccessPoint\\\"\\xb2\\x01\\n\\x0b\\x41\\x63\\x63\\x65ssPoint\\x12\\x37\\n\\x0b\\x61\\x64\\x64ressType\\x18\\x01 \\x01(\\x0e\\x32\\\".AcFunPack.AccessPoint.AddressType\\x12\\x0c\\n\\x04port\\x18\\x02 \\x01(\\r\\x12\\x0c\\n\\x04ipV4\\x18\\x03 \\x01(\\x07\\x12\\x0c\\n\\x04ipV6\\x18\\x04 \\x01(\\x0c\\x12\\x0e\\n\\x06\\x64omain\\x18\\x05 \\x01(\\t\\\"0\\n\\x0b\\x41\\x64\\x64ressType\\x12\\t\\n\\x05kIPV4\\x10\\x00\\x12\\t\\n\\x05kIPV6\\x10\\x01\\x12\\x0b\\n\\x07kDomain\\x10\\x02\\\"\\x81\\x01\\n\\tSdkOption\\x12\\x1d\\n\\x15reportIntervalSeconds\\x18\\x01 \\x01(\\x05\\x12\\x16\\n\\x0ereportSecurity\\x18\\x02 \\x01(\\t\\x12$\\n\\x1clz4CompressionThresholdBytes\\x18\\x03 \\x01(\\x05\\x12\\x17\\n\\x0fnetCheckServers\\x18\\x04 \\x03(\\t\\\"\\x8b\\x01\\n\\x11ZtLiveCsEnterRoom\\x12\\x10\\n\\x08isAuthor\\x18\\x01 \\x01(\\x08\\x12\\x16\\n\\x0ereconnectCount\\x18\\x02 \\x01(\\r\\x12\\x15\\n\\rlastErrorCode\\x18\\x03 \\x01(\\r\\x12\\x17\\n\\x0f\\x65nterRoomAttach\\x18\\x04 \\x01(\\t\\x12\\x1c\\n\\x14\\x63lientLiveSdkVersion\\x18\\x05 \\x01(\\t\\\"@\\n\\x11ZtLiveCsHeartbeat\\x12\\x19\\n\\x11\\x63lientTimestampMs\\x18\\x01 \\x01(\\x04\\x12\\x10\\n\\x08sequence\\x18\\x02 \\x01(\\x08\\\"I\\n\\x05\\x43sCmd\\x12\\x0f\\n\\x07\\x63mdType\\x18\\x01 \\x01(\\t\\x12\\x0f\\n\\x07payload\\x18\\x02 \\x01(\\x0c\\x12\\x0e\\n\\x06ticket\\x18\\x03 \\x01(\\t\\x12\\x0e\\n\\x06liveId\\x18\\x04 \\x01(\\t\\\"\\xca\\x01\\n\\x07\\x41ppInfo\\x12\\x0f\\n\\x07\\x61ppName\\x18\\x01 \\x01(\\t\\x12\\x12\\n\\nappVersion\\x18\\x02 \\x01(\\t\\x12\\x12\\n\\nappChannel\\x18\\x03 \\x01(\\t\\x12\\x12\\n\\nsdkVersion\\x18\\x04 \\x01(\\t\\x12<\\n\\rextensionInfo\\x18\\x05 \\x03(\\x0b\\x32%.AcFunPack.AppInfo.ExtensionInfoEntry\\x1a\\x34\\n\\x12\\x45xtensionInfoEntry\\x12\\x0b\\n\\x03key\\x18\\x01 \\x01(\\t\\x12\\r\\n\\x05value\\x18\\x02 \\x01(\\t:\\x02\\x38\\x01\\\"\\x98\\x03\\n\\nDeviceInfo\\x12\\x38\\n\\x0cplatformType\\x18\\x01 \\x01(\\x0e\\x32\\\".AcFunPack.DeviceInfo.PlatformType\\x12\\x11\\n\\tosVersion\\x18\\x02 \\x01(\\t\\x12\\x13\\n\\x0b\\x64\\x65viceModel\\x18\\x03 \\x01(\\t\\x12\\x0f\\n\\x07imeiMd5\\x18\\x04 \\x01(\\x0c\\x12\\x10\\n\\x08\\x64\\x65viceId\\x18\\x05 \\x01(\\t\\x12\\x0f\\n\\x07softDid\\x18\\x06 \\x01(\\t\\x12\\x0f\\n\\x07kwaiDid\\x18\\x07 \\x01(\\t\\x12\\x14\\n\\x0cmanufacturer\\x18\\x08 \\x01(\\t\\x12\\x12\\n\\ndeviceName\\x18\\t \\x01(\\t\\\"\\xb8\\x01\\n\\x0cPlatformType\\x12\\x0c\\n\\x08kInvalid\\x10\\x00\\x12\\x0c\\n\\x08kAndroid\\x10\\x01\\x12\\x08\\n\\x04kiOS\\x10\\x02\\x12\\x0c\\n\\x08kWindows\\x10\\x03\\x12\\x12\\n\\x0eWECHAT_ANDROID\\x10\\x04\\x12\\x0e\\n\\nWECHAT_IOS\\x10\\x05\\x12\\x06\\n\\x02H5\\x10\\x06\\x12\\x0e\\n\\nH5_ANDROID\\x10\\x07\\x12\\n\\n\\x06H5_IOS\\x10\\x08\\x12\\x0e\\n\\nH5_WINDOWS\\x10\\t\\x12\\n\\n\\x06H5_MAC\\x10\\n\\x12\\x10\\n\\x0ckPlatformNum\\x10\\x0b\\\"\\x86\\x01\\n\\x07\\x45nvInfo\\x12\\x33\\n\\x0bnetworkType\\x18\\x01 \\x01(\\x0e\\x32\\x1e.AcFunPack.EnvInfo.NetworkType\\x12\\x0f\\n\\x07\\x61pnName\\x18\\x02 \\x01(\\x0c\\\"5\\n\\x0bNetworkType\\x12\\x0c\\n\\x08kInvalid\\x10\\x00\\x12\\t\\n\\x05kWIFI\\x10\\x01\\x12\\r\\n\\tkCellular\\x10\\x02\\\"\\xb6\\x02\\n\\x10PushServiceToken\\x12\\x36\\n\\x08pushType\\x18\\x01 \\x01(\\x0e\\x32$.AcFunPack.PushServiceToken.PushType\\x12\\r\\n\\x05token\\x18\\x02 \\x01(\\x0c\\x12\\x15\\n\\risPassThrough\\x18\\x03 \\x01(\\x08\\\"\\xc3\\x01\\n\\x08PushType\\x12\\x14\\n\\x10kPushTypeInvalid\\x10\\x00\\x12\\x11\\n\\rkPushTypeAPNS\\x10\\x01\\x12\\x13\\n\\x0fkPushTypeXmPush\\x10\\x02\\x12\\x13\\n\\x0fkPushTypeJgPush\\x10\\x03\\x12\\x13\\n\\x0fkPushTypeGtPush\\x10\\x04\\x12\\x13\\n\\x0fkPushTypeOpPush\\x10\\x05\\x12\\x13\\n\\x0fkPushTypeVvPush\\x10\\x06\\x12\\x13\\n\\x0fkPushTypeHwPush\\x10\\x07\\x12\\x10\\n\\x0ckPushTypeFcm\\x10\\x08\\\"B\\n\\x0cZtCommonInfo\\x12\\x0b\\n\\x03kpn\\x18\\x01 \\x01(\\t\\x12\\x0b\\n\\x03kpf\\x18\\x02 \\x01(\\t\\x12\\x0b\\n\\x03uid\\x18\\x04 \\x01(\\x03\\x12\\x0b\\n\\x03\\x64id\\x18\\x05 \\x01(\\t\\\"c\\n\\x0cPingResponse\\x12\\x17\\n\\x0fserverTimestamp\\x18\\x01 \\x01(\\x0f\\x12\\x10\\n\\x08\\x63lientIp\\x18\\x02 \\x01(\\x07\\x12\\x12\\n\\nredirectIp\\x18\\x03 \\x01(\\x07\\x12\\x14\\n\\x0credirectPort\\x18\\x04 \\x01(\\r\\\"\\x94\\x01\\n\\x0bPingRequest\\x12\\x31\\n\\x08pingType\\x18\\x01 \\x01(\\x0e\\x32\\x1f.AcFunPack.PingRequest.PingType\\x12\\x11\\n\\tpingRound\\x18\\x02 \\x01(\\r\\\"?\\n\\x08PingType\\x12\\x0c\\n\\x08kInvalid\\x10\\x00\\x12\\x12\\n\\x0ekPriorRegister\\x10\\x01\\x12\\x11\\n\\rkPostRegister\\x10\\x02\\\"\\xe4\\x02\\n\\x0fUpstreamPayload\\x12\\x0f\\n\\x07\\x63ommand\\x18\\x01 \\x01(\\t\\x12\\r\\n\\x05seqId\\x18\\x02 \\x01(\\x03\\x12\\x12\\n\\nretryCount\\x18\\x03 \\x01(\\r\\x12\\x13\\n\\x0bpayloadData\\x18\\x04 \\x01(\\x0c\\x12-\\n\\x0cuserInstance\\x18\\x05 \\x01(\\x0b\\x32\\x17.AcFunPack.UserInstance\\x12\\x11\\n\\terrorCode\\x18\\x06 \\x01(\\x05\\x12+\\n\\x0bsettingInfo\\x18\\x07 \\x01(\\x0b\\x32\\x16.AcFunPack.SettingInfo\\x12\\x35\\n\\x10requestBasicInfo\\x18\\x08 \\x01(\\x0b\\x32\\x1b.AcFunPack.RequsetBasicInfo\\x12\\x0e\\n\\x06subBiz\\x18\\t \\x01(\\t\\x12-\\n\\x0c\\x66rontendInfo\\x18\\n \\x01(\\x0b\\x32\\x17.AcFunPack.FrontendInfo\\x12\\x0b\\n\\x03kpn\\x18\\x0b \\x01(\\t\\x12\\x16\\n\\x0e\\x61nonymouseUser\\x18\\x0c \\x01(\\x08\\\"\\x90\\x01\\n\\x11\\x44ownstreamPayload\\x12\\x0f\\n\\x07\\x63ommand\\x18\\x01 \\x01(\\t\\x12\\r\\n\\x05seqId\\x18\\x02 \\x01(\\x03\\x12\\x11\\n\\terrorCode\\x18\\x03 \\x01(\\x05\\x12\\x13\\n\\x0bpayloadData\\x18\\x04 \\x01(\\x0c\\x12\\x10\\n\\x08\\x65rrorMsg\\x18\\x05 \\x01(\\t\\x12\\x11\\n\\terrorData\\x18\\x06 \\x01(\\x0c\\x12\\x0e\\n\\x06subBiz\\x18\\x07 \\x01(\\t\\\"A\\n\\x0cUserInstance\\x12\\x1d\\n\\x04user\\x18\\x01 \\x01(\\x0b\\x32\\x0f.AcFunPack.User\\x12\\x12\\n\\ninstanceId\\x18\\x02 \\x01(\\x03\\\"\\\"\\n\\x04User\\x12\\r\\n\\x05\\x61ppId\\x18\\x01 \\x01(\\x05\\x12\\x0b\\n\\x03uid\\x18\\x02 \\x01(\\x03\\\"/\\n\\x0bSettingInfo\\x12\\x0e\\n\\x06locale\\x18\\x01 \\x01(\\t\\x12\\x10\\n\\x08timezone\\x18\\x02 \\x01(\\x11\\\"\\xbb\\x02\\n\\x10RequsetBasicInfo\\x12\\x36\\n\\nclientType\\x18\\x01 \\x01(\\x0e\\x32\\\".AcFunPack.DeviceInfo.PlatformType\\x12\\x10\\n\\x08\\x64\\x65viceId\\x18\\x02 \\x01(\\t\\x12\\x10\\n\\x08\\x63lientIp\\x18\\x03 \\x01(\\t\\x12\\x12\\n\\nappVersion\\x18\\x04 \\x01(\\t\\x12\\x0f\\n\\x07\\x63hannel\\x18\\x05 \\x01(\\t\\x12#\\n\\x07\\x61ppInfo\\x18\\x06 \\x01(\\x0b\\x32\\x12.AcFunPack.AppInfo\\x12)\\n\\ndeviceInfo\\x18\\x07 \\x01(\\x0b\\x32\\x15.AcFunPack.DeviceInfo\\x12#\\n\\x07\\x65nvInfo\\x18\\x08 \\x01(\\x0b\\x32\\x12.AcFunPack.EnvInfo\\x12\\x12\\n\\nclientPort\\x18\\t \\x01(\\x05\\x12\\x10\\n\\x08location\\x18\\n \\x01(\\t\\x12\\x0b\\n\\x03kpf\\x18\\x0b \\x01(\\t\\\"(\\n\\x0c\\x46rontendInfo\\x12\\n\\n\\x02ip\\x18\\x01 \\x01(\\t\\x12\\x0c\\n\\x04port\\x18\\x02 \\x01(\\x05\\\"\\xdc\\x04\\n\\x0cPacketHeader\\x12\\r\\n\\x05\\x61ppId\\x18\\x01 \\x01(\\x05\\x12\\x0b\\n\\x03uid\\x18\\x02 \\x01(\\x03\\x12\\x12\\n\\ninstanceId\\x18\\x03 \\x01(\\x03\\x12\\r\\n\\x05\\x66lags\\x18\\x04 \\x01(\\r\\x12:\\n\\x0c\\x65ncodingType\\x18\\x06 \\x01(\\x0e\\x32$.AcFunPack.PacketHeader.EncodingType\\x12\\x19\\n\\x11\\x64\\x65\\x63odedPayloadLen\\x18\\x07 \\x01(\\r\\x12>\\n\\x0e\\x65ncryptionMode\\x18\\x08 \\x01(\\x0e\\x32&.AcFunPack.PacketHeader.EncryptionMode\\x12\\'\\n\\ttokenInfo\\x18\\t \\x01(\\x0b\\x32\\x14.AcFunPack.TokenInfo\\x12\\r\\n\\x05seqId\\x18\\n \\x01(\\x03\\x12\\x31\\n\\x08\\x66\\x65\\x61tures\\x18\\x0b \\x03(\\x0e\\x32\\x1f.AcFunPack.PacketHeader.Feature\\x12\\x0b\\n\\x03kpn\\x18\\x0c \\x01(\\t\\\"?\\n\\x05\\x46lags\\x12\\x10\\n\\x0ckDirUpstream\\x10\\x00\\x12\\x12\\n\\x0ekDirDownstream\\x10\\x01\\x12\\x0c\\n\\x08kDirMask\\x10\\x01\\x1a\\x02\\x10\\x01\\\"3\\n\\x0c\\x45ncodingType\\x12\\x11\\n\\rkEncodingNone\\x10\\x00\\x12\\x10\\n\\x0ckEncodingLz4\\x10\\x01\\\"]\\n\\x0e\\x45ncryptionMode\\x12\\x13\\n\\x0fkEncryptionNone\\x10\\x00\\x12\\x1b\\n\\x17kEncryptionServiceToken\\x10\\x01\\x12\\x19\\n\\x15kEncryptionSessionKey\\x10\\x02\\\")\\n\\x07\\x46\\x65\\x61ture\\x12\\x0c\\n\\x08kReserve\\x10\\x00\\x12\\x10\\n\\x0ckCompressLz4\\x10\\x01\\\"{\\n\\tTokenInfo\\x12\\x31\\n\\ttokenType\\x18\\x01 \\x01(\\x0e\\x32\\x1e.AcFunPack.TokenInfo.TokenType\\x12\\r\\n\\x05token\\x18\\x02 \\x01(\\x0c\\\",\\n\\tTokenType\\x12\\x0c\\n\\x08kInvalid\\x10\\x00\\x12\\x11\\n\\rkServiceToken\\x10\\x01\\\"\\xa7\\x02\\n\\x10KeepAliveRequest\\x12\\x41\\n\\x0epresenceStatus\\x18\\x01 \\x01(\\x0e\\x32).AcFunPack.RegisterRequest.PresenceStatus\\x12@\\n\\x0f\\x61ppActiveStatus\\x18\\x02 \\x01(\\x0e\\x32\\'.AcFunPack.RegisterRequest.ActiveStatus\\x12\\x35\\n\\x10pushServiceToken\\x18\\x03 \\x01(\\x0b\\x32\\x1b.AcFunPack.PushServiceToken\\x12\\x39\\n\\x14pushServiceTokenList\\x18\\x04 \\x03(\\x0b\\x32\\x1b.AcFunPack.PushServiceToken\\x12\\x1c\\n\\x14keepaliveIntervalSec\\x18\\x05 \\x03(\\x05\\\"\\x8b\\x01\\n\\x0fZtLiveScMessage\\x12\\x13\\n\\x0bmessageType\\x18\\x01 \\x01(\\t\\x12\\x17\\n\\x0f\\x63ompressionType\\x18\\x02 \\x01(\\x05\\x12\\x0f\\n\\x07payload\\x18\\x03 \\x01(\\x0c\\x12\\x0e\\n\\x06liveId\\x18\\x04 \\x01(\\t\\x12\\x0e\\n\\x06ticket\\x18\\x05 \\x01(\\t\\x12\\x19\\n\\x11serverTimestampMs\\x18\\x06 \\x01(\\x04\\\"\\x9b\\x01\\n\\x14ZtLiveScNotifySignal\\x12\\x44\\n\\x04item\\x18\\x01 \\x03(\\x0b\\x32\\x36.AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem\\x1a=\\n\\x16ZtLiveNotifySignalItem\\x12\\x12\\n\\nsignalType\\x18\\x01 \\x01(\\t\\x12\\x0f\\n\\x07payload\\x18\\x02 \\x03(\\x0c\\\"\\x9b\\x01\\n\\x14ZtLiveScActionSignal\\x12\\x44\\n\\x04item\\x18\\x01 \\x03(\\x0b\\x32\\x36.AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem\\x1a=\\n\\x16ZtLiveActionSignalItem\\x12\\x12\\n\\nsignalType\\x18\\x01 \\x01(\\t\\x12\\x0f\\n\\x07payload\\x18\\x02 \\x03(\\x0c\\\"\\x97\\x01\\n\\x13ZtLiveScStateSignal\\x12\\x42\\n\\x04item\\x18\\x01 \\x03(\\x0b\\x32\\x34.AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem\\x1a<\\n\\x15ZtLiveStateSignalItem\\x12\\x12\\n\\nsignalType\\x18\\x01 \\x01(\\t\\x12\\x0f\\n\\x07payload\\x18\\x02 \\x03(\\x0c\\\"\\xa1\\x01\\n\\x15ZtLiveScStatusChanged\\x12\\x0c\\n\\x04type\\x18\\x01 \\x01(\\x05\\x12\\x18\\n\\x10maxRandomDelayMs\\x18\\x02 \\x01(\\x04\\x12?\\n\\nbannedInfo\\x18\\x03 \\x01(\\x0b\\x32+.AcFunPack.ZtLiveScStatusChanged.BannedInfo\\x1a\\x1f\\n\\nBannedInfo\\x12\\x11\\n\\tbanReason\\x18\\x01 \\x01(\\t\\\"m\\n\\x19\\x43ommonActionSignalComment\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x01 \\x01(\\t\\x12\\x12\\n\\nsendTimeMs\\x18\\x02 \\x01(\\x04\\x12+\\n\\x08userInfo\\x18\\x03 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\\"Y\\n\\x16\\x43ommonActionSignalLike\\x12+\\n\\x08userInfo\\x18\\x01 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\x12\\n\\nsendTimeMs\\x18\\x02 \\x01(\\x04\\\"\\xe9\\x01\\n\\x16\\x43ommonActionSignalGift\\x12+\\n\\x08userInfo\\x18\\x01 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\x12\\n\\nsendTimeMs\\x18\\x02 \\x01(\\x04\\x12\\x0e\\n\\x06giftId\\x18\\x03 \\x01(\\x04\\x12\\x11\\n\\tbatchSize\\x18\\x04 \\x01(\\r\\x12\\x12\\n\\ncomboCount\\x18\\x05 \\x01(\\r\\x12\\x0c\\n\\x04rank\\x18\\x06 \\x01(\\x04\\x12\\x10\\n\\x08\\x63omboKey\\x18\\x07 \\x01(\\t\\x12\\x1d\\n\\x15slotDisplayDurationMs\\x18\\x08 \\x01(\\x04\\x12\\x18\\n\\x10\\x65xpireDurationMs\\x18\\t \\x01(\\x04\\\"[\\n\\x1c\\x43ommonStateSignalDisplayInfo\\x12\\x15\\n\\rwatchingCount\\x18\\x01 \\x01(\\t\\x12\\x11\\n\\tlikeCount\\x18\\x02 \\x01(\\t\\x12\\x11\\n\\tlikeDelta\\x18\\x03 \\x01(\\r\\\"\\xe5\\x01\\n\\x19\\x43ommonStateSignalTopUsers\\x12=\\n\\x07topUser\\x18\\x01 \\x03(\\x0b\\x32,.AcFunPack.CommonStateSignalTopUsers.TopUser\\x1a\\x88\\x01\\n\\x07TopUser\\x12+\\n\\x08userInfo\\x18\\x01 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\x1e\\n\\x16\\x63ustomWatchingListData\\x18\\x02 \\x01(\\t\\x12\\x19\\n\\x11\\x64isplaySendAmount\\x18\\x03 \\x01(\\t\\x12\\x15\\n\\ranonymousUser\\x18\\x04 \\x01(\\x08\\\"b\\n\\x1f\\x43ommonActionSignalUserEnterRoom\\x12+\\n\\x08userInfo\\x18\\x01 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\x12\\n\\nsendTimeMs\\x18\\x02 \\x01(\\x04\\\"e\\n\\\"CommonActionSignalUserFollowAuthor\\x12+\\n\\x08userInfo\\x18\\x01 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\x12\\n\\nsendTimeMs\\x18\\x02 \\x01(\\x04\\\"\\x9a\\x01\\n\\x1a\\x43ommonActionSignalRichText\\x12,\\n\\x08userInfo\\x18\\x01 \\x01(\\x0b\\x32\\x1a.AcFunPack.UserInfoSegment\\x12&\\n\\x05plain\\x18\\x02 \\x01(\\x0b\\x32\\x17.AcFunPack.PlainSegment\\x12&\\n\\x05image\\x18\\x03 \\x01(\\x0b\\x32\\x17.AcFunPack.ImageSegment\\\"I\\n\\x0fUserInfoSegment\\x12\\'\\n\\x04user\\x18\\x01 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\r\\n\\x05\\x63olor\\x18\\x02 \\x01(\\t\\\"+\\n\\x0cPlainSegment\\x12\\x0c\\n\\x04text\\x18\\x01 \\x01(\\t\\x12\\r\\n\\x05\\x63olor\\x18\\x02 \\x01(\\t\\\"k\\n\\x0cImageSegment\\x12(\\n\\x07\\x63\\x64nNode\\x18\\x01 \\x01(\\x0b\\x32\\x17.AcFunPack.ImageCdnNode\\x12\\x17\\n\\x0f\\x61lternativeText\\x18\\x02 \\x01(\\t\\x12\\x18\\n\\x10\\x61lternativeColor\\x18\\x03 \\x01(\\t\\\"-\\n\\x1b\\x43ommonNotifySignalKickedOut\\x12\\x0e\\n\\x06reason\\x18\\x01 \\x01(\\t\\\"<\\n CommonNotifySignalViolationAlert\\x12\\x18\\n\\x10violationContent\\x18\\x01 \\x01(\\t\\\"%\\n#CommonStateSignalCurrentRedpackList\\\"W\\n\\x1e\\x43ommonStateSignalRecentComment\\x12\\x35\\n\\x07\\x63omment\\x18\\x01 \\x01(\\x0b\\x32$.AcFunPack.CommonActionSignalComment\\\"q\\n\\x1a\\x43ommonStateSignalChatReady\\x12\\x0e\\n\\x06\\x63hatId\\x18\\x01 \\x01(\\t\\x12\\x30\\n\\rguestUserInfo\\x18\\x02 \\x01(\\x0b\\x32\\x19.AcFunPack.ZtLiveUserInfo\\x12\\x11\\n\\tmediaType\\x18\\x03 \\x01(\\x05\\\";\\n\\x18\\x43ommonStateSignalChatEnd\\x12\\x0e\\n\\x06\\x63hatId\\x18\\x01 \\x01(\\t\\x12\\x0f\\n\\x07\\x65ndType\\x18\\x02 \\x01(\\x05\\\"g\\n\\x1c\\x41\\x63\\x66unActionSignalThrowBanana\\x12$\\n\\x07visitor\\x18\\x01 \\x01(\\x0b\\x32\\x13.AcFunPack.UserInfo\\x12\\r\\n\\x05\\x63ount\\x18\\x02 \\x01(\\x05\\x12\\x12\\n\\nsendTimeMs\\x18\\x03 \\x01(\\x04\\\"2\\n\\x1b\\x41\\x63\\x66unStateSignalDisplayInfo\\x12\\x13\\n\\x0b\\x62\\x61nanaCount\\x18\\x01 \\x01(\\t\\\"}\\n\\x19\\x41\\x63\\x66unActionSignalJoinClub\\x12%\\n\\x08\\x66\\x61nsInfo\\x18\\x01 \\x01(\\x0b\\x32\\x13.AcFunPack.UserInfo\\x12%\\n\\x08uperInfo\\x18\\x02 \\x01(\\x0b\\x32\\x13.AcFunPack.UserInfo\\x12\\x12\\n\\njoinTimeMs\\x18\\x03 \\x01(\\x04\\\"[\\n\\x0eZtLiveUserInfo\\x12\\x0e\\n\\x06userId\\x18\\x01 \\x01(\\x04\\x12\\x10\\n\\x08nickname\\x18\\x02 \\x01(\\t\\x12\\'\\n\\x06\\x61vatar\\x18\\x03 \\x01(\\x0b\\x32\\x17.AcFunPack.ImageCdnNode\\\"<\\n\\x0cImageCdnNode\\x12\\x0b\\n\\x03\\x63\\x64n\\x18\\x01 \\x01(\\t\\x12\\x0b\\n\\x03url\\x18\\x02 \\x01(\\t\\x12\\x12\\n\\nurlPattern\\x18\\x03 \\x01(\\t\\\"(\\n\\x08UserInfo\\x12\\x0e\\n\\x06userId\\x18\\x01 \\x01(\\x04\\x12\\x0c\\n\\x04name\\x18\\x02 \\x01(\\t'\n)\n\n\n\n_REGISTERREQUEST_PRESENCESTATUS = _descriptor.EnumDescriptor(\n  name='PresenceStatus',\n  full_name='AcFunPack.RegisterRequest.PresenceStatus',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kPresenceOffline', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPresenceOnline', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=532,\n  serialized_end=591,\n)\n_sym_db.RegisterEnumDescriptor(_REGISTERREQUEST_PRESENCESTATUS)\n\n_REGISTERREQUEST_ACTIVESTATUS = _descriptor.EnumDescriptor(\n  name='ActiveStatus',\n  full_name='AcFunPack.RegisterRequest.ActiveStatus',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kInvalid', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kAppInForeground', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kAppInBackground', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=593,\n  serialized_end=665,\n)\n_sym_db.RegisterEnumDescriptor(_REGISTERREQUEST_ACTIVESTATUS)\n\n_ACCESSPOINT_ADDRESSTYPE = _descriptor.EnumDescriptor(\n  name='AddressType',\n  full_name='AcFunPack.AccessPoint.AddressType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kIPV4', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kIPV6', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kDomain', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=1207,\n  serialized_end=1255,\n)\n_sym_db.RegisterEnumDescriptor(_ACCESSPOINT_ADDRESSTYPE)\n\n_DEVICEINFO_PLATFORMTYPE = _descriptor.EnumDescriptor(\n  name='PlatformType',\n  full_name='AcFunPack.DeviceInfo.PlatformType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kInvalid', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kAndroid', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kiOS', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kWindows', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='WECHAT_ANDROID', index=4, number=4,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='WECHAT_IOS', index=5, number=5,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='H5', index=6, number=6,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='H5_ANDROID', index=7, number=7,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='H5_IOS', index=8, number=8,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='H5_WINDOWS', index=9, number=9,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='H5_MAC', index=10, number=10,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPlatformNum', index=11, number=11,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=2102,\n  serialized_end=2286,\n)\n_sym_db.RegisterEnumDescriptor(_DEVICEINFO_PLATFORMTYPE)\n\n_ENVINFO_NETWORKTYPE = _descriptor.EnumDescriptor(\n  name='NetworkType',\n  full_name='AcFunPack.EnvInfo.NetworkType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kInvalid', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kWIFI', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kCellular', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=2370,\n  serialized_end=2423,\n)\n_sym_db.RegisterEnumDescriptor(_ENVINFO_NETWORKTYPE)\n\n_PUSHSERVICETOKEN_PUSHTYPE = _descriptor.EnumDescriptor(\n  name='PushType',\n  full_name='AcFunPack.PushServiceToken.PushType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeInvalid', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeAPNS', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeXmPush', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeJgPush', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeGtPush', index=4, number=4,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeOpPush', index=5, number=5,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeVvPush', index=6, number=6,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeHwPush', index=7, number=7,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPushTypeFcm', index=8, number=8,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=2541,\n  serialized_end=2736,\n)\n_sym_db.RegisterEnumDescriptor(_PUSHSERVICETOKEN_PUSHTYPE)\n\n_PINGREQUEST_PINGTYPE = _descriptor.EnumDescriptor(\n  name='PingType',\n  full_name='AcFunPack.PingRequest.PingType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kInvalid', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPriorRegister', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kPostRegister', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=2993,\n  serialized_end=3056,\n)\n_sym_db.RegisterEnumDescriptor(_PINGREQUEST_PINGTYPE)\n\n_PACKETHEADER_FLAGS = _descriptor.EnumDescriptor(\n  name='Flags',\n  full_name='AcFunPack.PacketHeader.Flags',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kDirUpstream', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kDirDownstream', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kDirMask', index=2, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=b'\\020\\001',\n  serialized_start=4427,\n  serialized_end=4490,\n)\n_sym_db.RegisterEnumDescriptor(_PACKETHEADER_FLAGS)\n\n_PACKETHEADER_ENCODINGTYPE = _descriptor.EnumDescriptor(\n  name='EncodingType',\n  full_name='AcFunPack.PacketHeader.EncodingType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kEncodingNone', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kEncodingLz4', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=4492,\n  serialized_end=4543,\n)\n_sym_db.RegisterEnumDescriptor(_PACKETHEADER_ENCODINGTYPE)\n\n_PACKETHEADER_ENCRYPTIONMODE = _descriptor.EnumDescriptor(\n  name='EncryptionMode',\n  full_name='AcFunPack.PacketHeader.EncryptionMode',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kEncryptionNone', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kEncryptionServiceToken', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kEncryptionSessionKey', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=4545,\n  serialized_end=4638,\n)\n_sym_db.RegisterEnumDescriptor(_PACKETHEADER_ENCRYPTIONMODE)\n\n_PACKETHEADER_FEATURE = _descriptor.EnumDescriptor(\n  name='Feature',\n  full_name='AcFunPack.PacketHeader.Feature',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kReserve', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kCompressLz4', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=4640,\n  serialized_end=4681,\n)\n_sym_db.RegisterEnumDescriptor(_PACKETHEADER_FEATURE)\n\n_TOKENINFO_TOKENTYPE = _descriptor.EnumDescriptor(\n  name='TokenType',\n  full_name='AcFunPack.TokenInfo.TokenType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='kInvalid', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='kServiceToken', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=4762,\n  serialized_end=4806,\n)\n_sym_db.RegisterEnumDescriptor(_TOKENINFO_TOKENTYPE)\n\n\n_REGISTERREQUEST = _descriptor.Descriptor(\n  name='RegisterRequest',\n  full_name='AcFunPack.RegisterRequest',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='appInfo', full_name='AcFunPack.RegisterRequest.appInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceInfo', full_name='AcFunPack.RegisterRequest.deviceInfo', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='envInfo', full_name='AcFunPack.RegisterRequest.envInfo', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='presenceStatus', full_name='AcFunPack.RegisterRequest.presenceStatus', index=3,\n      number=4, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appActiveStatus', full_name='AcFunPack.RegisterRequest.appActiveStatus', index=4,\n      number=5, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appCustomStatus', full_name='AcFunPack.RegisterRequest.appCustomStatus', index=5,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pushServiceToken', full_name='AcFunPack.RegisterRequest.pushServiceToken', index=6,\n      number=7, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='instanceId', full_name='AcFunPack.RegisterRequest.instanceId', index=7,\n      number=8, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pushServiceTokenList', full_name='AcFunPack.RegisterRequest.pushServiceTokenList', index=8,\n      number=9, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='keepaliveIntervalSec', full_name='AcFunPack.RegisterRequest.keepaliveIntervalSec', index=9,\n      number=10, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ztCommonInfo', full_name='AcFunPack.RegisterRequest.ztCommonInfo', index=10,\n      number=11, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _REGISTERREQUEST_PRESENCESTATUS,\n    _REGISTERREQUEST_ACTIVESTATUS,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=27,\n  serialized_end=665,\n)\n\n\n_REGISTERRESPONSE = _descriptor.Descriptor(\n  name='RegisterResponse',\n  full_name='AcFunPack.RegisterResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='accessPointsConfig', full_name='AcFunPack.RegisterResponse.accessPointsConfig', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sessKey', full_name='AcFunPack.RegisterResponse.sessKey', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='instanceId', full_name='AcFunPack.RegisterResponse.instanceId', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sdkOption', full_name='AcFunPack.RegisterResponse.sdkOption', index=3,\n      number=4, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='accessPointsConfigIpv6', full_name='AcFunPack.RegisterResponse.accessPointsConfigIpv6', index=4,\n      number=5, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=668,\n  serialized_end=886,\n)\n\n\n_ACCESSPOINTSCONFIG = _descriptor.Descriptor(\n  name='AccessPointsConfig',\n  full_name='AcFunPack.AccessPointsConfig',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='optimalAps', full_name='AcFunPack.AccessPointsConfig.optimalAps', index=0,\n      number=1, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='backupAps', full_name='AcFunPack.AccessPointsConfig.backupAps', index=1,\n      number=2, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='availablePorts', full_name='AcFunPack.AccessPointsConfig.availablePorts', index=2,\n      number=3, type=13, cpp_type=3, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='forceLastConnectedAp', full_name='AcFunPack.AccessPointsConfig.forceLastConnectedAp', index=3,\n      number=4, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=889,\n  serialized_end=1074,\n)\n\n\n_ACCESSPOINT = _descriptor.Descriptor(\n  name='AccessPoint',\n  full_name='AcFunPack.AccessPoint',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='addressType', full_name='AcFunPack.AccessPoint.addressType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='port', full_name='AcFunPack.AccessPoint.port', index=1,\n      number=2, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ipV4', full_name='AcFunPack.AccessPoint.ipV4', index=2,\n      number=3, type=7, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ipV6', full_name='AcFunPack.AccessPoint.ipV6', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='domain', full_name='AcFunPack.AccessPoint.domain', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _ACCESSPOINT_ADDRESSTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1077,\n  serialized_end=1255,\n)\n\n\n_SDKOPTION = _descriptor.Descriptor(\n  name='SdkOption',\n  full_name='AcFunPack.SdkOption',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='reportIntervalSeconds', full_name='AcFunPack.SdkOption.reportIntervalSeconds', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='reportSecurity', full_name='AcFunPack.SdkOption.reportSecurity', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='lz4CompressionThresholdBytes', full_name='AcFunPack.SdkOption.lz4CompressionThresholdBytes', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='netCheckServers', full_name='AcFunPack.SdkOption.netCheckServers', index=3,\n      number=4, type=9, cpp_type=9, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1258,\n  serialized_end=1387,\n)\n\n\n_ZTLIVECSENTERROOM = _descriptor.Descriptor(\n  name='ZtLiveCsEnterRoom',\n  full_name='AcFunPack.ZtLiveCsEnterRoom',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='isAuthor', full_name='AcFunPack.ZtLiveCsEnterRoom.isAuthor', index=0,\n      number=1, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='reconnectCount', full_name='AcFunPack.ZtLiveCsEnterRoom.reconnectCount', index=1,\n      number=2, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='lastErrorCode', full_name='AcFunPack.ZtLiveCsEnterRoom.lastErrorCode', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='enterRoomAttach', full_name='AcFunPack.ZtLiveCsEnterRoom.enterRoomAttach', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientLiveSdkVersion', full_name='AcFunPack.ZtLiveCsEnterRoom.clientLiveSdkVersion', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1390,\n  serialized_end=1529,\n)\n\n\n_ZTLIVECSHEARTBEAT = _descriptor.Descriptor(\n  name='ZtLiveCsHeartbeat',\n  full_name='AcFunPack.ZtLiveCsHeartbeat',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='clientTimestampMs', full_name='AcFunPack.ZtLiveCsHeartbeat.clientTimestampMs', index=0,\n      number=1, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sequence', full_name='AcFunPack.ZtLiveCsHeartbeat.sequence', index=1,\n      number=2, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1531,\n  serialized_end=1595,\n)\n\n\n_CSCMD = _descriptor.Descriptor(\n  name='CsCmd',\n  full_name='AcFunPack.CsCmd',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='cmdType', full_name='AcFunPack.CsCmd.cmdType', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payload', full_name='AcFunPack.CsCmd.payload', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ticket', full_name='AcFunPack.CsCmd.ticket', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='liveId', full_name='AcFunPack.CsCmd.liveId', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1597,\n  serialized_end=1670,\n)\n\n\n_APPINFO_EXTENSIONINFOENTRY = _descriptor.Descriptor(\n  name='ExtensionInfoEntry',\n  full_name='AcFunPack.AppInfo.ExtensionInfoEntry',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='key', full_name='AcFunPack.AppInfo.ExtensionInfoEntry.key', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='value', full_name='AcFunPack.AppInfo.ExtensionInfoEntry.value', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=b'8\\001',\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1823,\n  serialized_end=1875,\n)\n\n_APPINFO = _descriptor.Descriptor(\n  name='AppInfo',\n  full_name='AcFunPack.AppInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='appName', full_name='AcFunPack.AppInfo.appName', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appVersion', full_name='AcFunPack.AppInfo.appVersion', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appChannel', full_name='AcFunPack.AppInfo.appChannel', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sdkVersion', full_name='AcFunPack.AppInfo.sdkVersion', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='extensionInfo', full_name='AcFunPack.AppInfo.extensionInfo', index=4,\n      number=5, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_APPINFO_EXTENSIONINFOENTRY, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1673,\n  serialized_end=1875,\n)\n\n\n_DEVICEINFO = _descriptor.Descriptor(\n  name='DeviceInfo',\n  full_name='AcFunPack.DeviceInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='platformType', full_name='AcFunPack.DeviceInfo.platformType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='osVersion', full_name='AcFunPack.DeviceInfo.osVersion', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceModel', full_name='AcFunPack.DeviceInfo.deviceModel', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='imeiMd5', full_name='AcFunPack.DeviceInfo.imeiMd5', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceId', full_name='AcFunPack.DeviceInfo.deviceId', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='softDid', full_name='AcFunPack.DeviceInfo.softDid', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kwaiDid', full_name='AcFunPack.DeviceInfo.kwaiDid', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='manufacturer', full_name='AcFunPack.DeviceInfo.manufacturer', index=7,\n      number=8, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceName', full_name='AcFunPack.DeviceInfo.deviceName', index=8,\n      number=9, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _DEVICEINFO_PLATFORMTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1878,\n  serialized_end=2286,\n)\n\n\n_ENVINFO = _descriptor.Descriptor(\n  name='EnvInfo',\n  full_name='AcFunPack.EnvInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='networkType', full_name='AcFunPack.EnvInfo.networkType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='apnName', full_name='AcFunPack.EnvInfo.apnName', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _ENVINFO_NETWORKTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2289,\n  serialized_end=2423,\n)\n\n\n_PUSHSERVICETOKEN = _descriptor.Descriptor(\n  name='PushServiceToken',\n  full_name='AcFunPack.PushServiceToken',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='pushType', full_name='AcFunPack.PushServiceToken.pushType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='token', full_name='AcFunPack.PushServiceToken.token', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isPassThrough', full_name='AcFunPack.PushServiceToken.isPassThrough', index=2,\n      number=3, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _PUSHSERVICETOKEN_PUSHTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2426,\n  serialized_end=2736,\n)\n\n\n_ZTCOMMONINFO = _descriptor.Descriptor(\n  name='ZtCommonInfo',\n  full_name='AcFunPack.ZtCommonInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='kpn', full_name='AcFunPack.ZtCommonInfo.kpn', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kpf', full_name='AcFunPack.ZtCommonInfo.kpf', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uid', full_name='AcFunPack.ZtCommonInfo.uid', index=2,\n      number=4, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='did', full_name='AcFunPack.ZtCommonInfo.did', index=3,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2738,\n  serialized_end=2804,\n)\n\n\n_PINGRESPONSE = _descriptor.Descriptor(\n  name='PingResponse',\n  full_name='AcFunPack.PingResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='serverTimestamp', full_name='AcFunPack.PingResponse.serverTimestamp', index=0,\n      number=1, type=15, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientIp', full_name='AcFunPack.PingResponse.clientIp', index=1,\n      number=2, type=7, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='redirectIp', full_name='AcFunPack.PingResponse.redirectIp', index=2,\n      number=3, type=7, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='redirectPort', full_name='AcFunPack.PingResponse.redirectPort', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2806,\n  serialized_end=2905,\n)\n\n\n_PINGREQUEST = _descriptor.Descriptor(\n  name='PingRequest',\n  full_name='AcFunPack.PingRequest',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='pingType', full_name='AcFunPack.PingRequest.pingType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pingRound', full_name='AcFunPack.PingRequest.pingRound', index=1,\n      number=2, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _PINGREQUEST_PINGTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2908,\n  serialized_end=3056,\n)\n\n\n_UPSTREAMPAYLOAD = _descriptor.Descriptor(\n  name='UpstreamPayload',\n  full_name='AcFunPack.UpstreamPayload',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='command', full_name='AcFunPack.UpstreamPayload.command', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='seqId', full_name='AcFunPack.UpstreamPayload.seqId', index=1,\n      number=2, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='retryCount', full_name='AcFunPack.UpstreamPayload.retryCount', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payloadData', full_name='AcFunPack.UpstreamPayload.payloadData', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userInstance', full_name='AcFunPack.UpstreamPayload.userInstance', index=4,\n      number=5, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='errorCode', full_name='AcFunPack.UpstreamPayload.errorCode', index=5,\n      number=6, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='settingInfo', full_name='AcFunPack.UpstreamPayload.settingInfo', index=6,\n      number=7, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='requestBasicInfo', full_name='AcFunPack.UpstreamPayload.requestBasicInfo', index=7,\n      number=8, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='subBiz', full_name='AcFunPack.UpstreamPayload.subBiz', index=8,\n      number=9, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='frontendInfo', full_name='AcFunPack.UpstreamPayload.frontendInfo', index=9,\n      number=10, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kpn', full_name='AcFunPack.UpstreamPayload.kpn', index=10,\n      number=11, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='anonymouseUser', full_name='AcFunPack.UpstreamPayload.anonymouseUser', index=11,\n      number=12, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3059,\n  serialized_end=3415,\n)\n\n\n_DOWNSTREAMPAYLOAD = _descriptor.Descriptor(\n  name='DownstreamPayload',\n  full_name='AcFunPack.DownstreamPayload',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='command', full_name='AcFunPack.DownstreamPayload.command', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='seqId', full_name='AcFunPack.DownstreamPayload.seqId', index=1,\n      number=2, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='errorCode', full_name='AcFunPack.DownstreamPayload.errorCode', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payloadData', full_name='AcFunPack.DownstreamPayload.payloadData', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='errorMsg', full_name='AcFunPack.DownstreamPayload.errorMsg', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='errorData', full_name='AcFunPack.DownstreamPayload.errorData', index=5,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='subBiz', full_name='AcFunPack.DownstreamPayload.subBiz', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3418,\n  serialized_end=3562,\n)\n\n\n_USERINSTANCE = _descriptor.Descriptor(\n  name='UserInstance',\n  full_name='AcFunPack.UserInstance',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='user', full_name='AcFunPack.UserInstance.user', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='instanceId', full_name='AcFunPack.UserInstance.instanceId', index=1,\n      number=2, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3564,\n  serialized_end=3629,\n)\n\n\n_USER = _descriptor.Descriptor(\n  name='User',\n  full_name='AcFunPack.User',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='appId', full_name='AcFunPack.User.appId', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uid', full_name='AcFunPack.User.uid', index=1,\n      number=2, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3631,\n  serialized_end=3665,\n)\n\n\n_SETTINGINFO = _descriptor.Descriptor(\n  name='SettingInfo',\n  full_name='AcFunPack.SettingInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='locale', full_name='AcFunPack.SettingInfo.locale', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='timezone', full_name='AcFunPack.SettingInfo.timezone', index=1,\n      number=2, type=17, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3667,\n  serialized_end=3714,\n)\n\n\n_REQUSETBASICINFO = _descriptor.Descriptor(\n  name='RequsetBasicInfo',\n  full_name='AcFunPack.RequsetBasicInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='clientType', full_name='AcFunPack.RequsetBasicInfo.clientType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceId', full_name='AcFunPack.RequsetBasicInfo.deviceId', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientIp', full_name='AcFunPack.RequsetBasicInfo.clientIp', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appVersion', full_name='AcFunPack.RequsetBasicInfo.appVersion', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='channel', full_name='AcFunPack.RequsetBasicInfo.channel', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appInfo', full_name='AcFunPack.RequsetBasicInfo.appInfo', index=5,\n      number=6, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceInfo', full_name='AcFunPack.RequsetBasicInfo.deviceInfo', index=6,\n      number=7, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='envInfo', full_name='AcFunPack.RequsetBasicInfo.envInfo', index=7,\n      number=8, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientPort', full_name='AcFunPack.RequsetBasicInfo.clientPort', index=8,\n      number=9, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='location', full_name='AcFunPack.RequsetBasicInfo.location', index=9,\n      number=10, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kpf', full_name='AcFunPack.RequsetBasicInfo.kpf', index=10,\n      number=11, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3717,\n  serialized_end=4032,\n)\n\n\n_FRONTENDINFO = _descriptor.Descriptor(\n  name='FrontendInfo',\n  full_name='AcFunPack.FrontendInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='ip', full_name='AcFunPack.FrontendInfo.ip', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='port', full_name='AcFunPack.FrontendInfo.port', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=4034,\n  serialized_end=4074,\n)\n\n\n_PACKETHEADER = _descriptor.Descriptor(\n  name='PacketHeader',\n  full_name='AcFunPack.PacketHeader',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='appId', full_name='AcFunPack.PacketHeader.appId', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uid', full_name='AcFunPack.PacketHeader.uid', index=1,\n      number=2, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='instanceId', full_name='AcFunPack.PacketHeader.instanceId', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='flags', full_name='AcFunPack.PacketHeader.flags', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='encodingType', full_name='AcFunPack.PacketHeader.encodingType', index=4,\n      number=6, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='decodedPayloadLen', full_name='AcFunPack.PacketHeader.decodedPayloadLen', index=5,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='encryptionMode', full_name='AcFunPack.PacketHeader.encryptionMode', index=6,\n      number=8, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='tokenInfo', full_name='AcFunPack.PacketHeader.tokenInfo', index=7,\n      number=9, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='seqId', full_name='AcFunPack.PacketHeader.seqId', index=8,\n      number=10, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='features', full_name='AcFunPack.PacketHeader.features', index=9,\n      number=11, type=14, cpp_type=8, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kpn', full_name='AcFunPack.PacketHeader.kpn', index=10,\n      number=12, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _PACKETHEADER_FLAGS,\n    _PACKETHEADER_ENCODINGTYPE,\n    _PACKETHEADER_ENCRYPTIONMODE,\n    _PACKETHEADER_FEATURE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=4077,\n  serialized_end=4681,\n)\n\n\n_TOKENINFO = _descriptor.Descriptor(\n  name='TokenInfo',\n  full_name='AcFunPack.TokenInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='tokenType', full_name='AcFunPack.TokenInfo.tokenType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='token', full_name='AcFunPack.TokenInfo.token', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _TOKENINFO_TOKENTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=4683,\n  serialized_end=4806,\n)\n\n\n_KEEPALIVEREQUEST = _descriptor.Descriptor(\n  name='KeepAliveRequest',\n  full_name='AcFunPack.KeepAliveRequest',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='presenceStatus', full_name='AcFunPack.KeepAliveRequest.presenceStatus', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appActiveStatus', full_name='AcFunPack.KeepAliveRequest.appActiveStatus', index=1,\n      number=2, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pushServiceToken', full_name='AcFunPack.KeepAliveRequest.pushServiceToken', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pushServiceTokenList', full_name='AcFunPack.KeepAliveRequest.pushServiceTokenList', index=3,\n      number=4, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='keepaliveIntervalSec', full_name='AcFunPack.KeepAliveRequest.keepaliveIntervalSec', index=4,\n      number=5, type=5, cpp_type=1, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=4809,\n  serialized_end=5104,\n)\n\n\n_ZTLIVESCMESSAGE = _descriptor.Descriptor(\n  name='ZtLiveScMessage',\n  full_name='AcFunPack.ZtLiveScMessage',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='messageType', full_name='AcFunPack.ZtLiveScMessage.messageType', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='compressionType', full_name='AcFunPack.ZtLiveScMessage.compressionType', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payload', full_name='AcFunPack.ZtLiveScMessage.payload', index=2,\n      number=3, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='liveId', full_name='AcFunPack.ZtLiveScMessage.liveId', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ticket', full_name='AcFunPack.ZtLiveScMessage.ticket', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='serverTimestampMs', full_name='AcFunPack.ZtLiveScMessage.serverTimestampMs', index=5,\n      number=6, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5107,\n  serialized_end=5246,\n)\n\n\n_ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM = _descriptor.Descriptor(\n  name='ZtLiveNotifySignalItem',\n  full_name='AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='signalType', full_name='AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem.signalType', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payload', full_name='AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem.payload', index=1,\n      number=2, type=12, cpp_type=9, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5343,\n  serialized_end=5404,\n)\n\n_ZTLIVESCNOTIFYSIGNAL = _descriptor.Descriptor(\n  name='ZtLiveScNotifySignal',\n  full_name='AcFunPack.ZtLiveScNotifySignal',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='item', full_name='AcFunPack.ZtLiveScNotifySignal.item', index=0,\n      number=1, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5249,\n  serialized_end=5404,\n)\n\n\n_ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM = _descriptor.Descriptor(\n  name='ZtLiveActionSignalItem',\n  full_name='AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='signalType', full_name='AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem.signalType', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payload', full_name='AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem.payload', index=1,\n      number=2, type=12, cpp_type=9, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5501,\n  serialized_end=5562,\n)\n\n_ZTLIVESCACTIONSIGNAL = _descriptor.Descriptor(\n  name='ZtLiveScActionSignal',\n  full_name='AcFunPack.ZtLiveScActionSignal',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='item', full_name='AcFunPack.ZtLiveScActionSignal.item', index=0,\n      number=1, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5407,\n  serialized_end=5562,\n)\n\n\n_ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM = _descriptor.Descriptor(\n  name='ZtLiveStateSignalItem',\n  full_name='AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='signalType', full_name='AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem.signalType', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payload', full_name='AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem.payload', index=1,\n      number=2, type=12, cpp_type=9, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5656,\n  serialized_end=5716,\n)\n\n_ZTLIVESCSTATESIGNAL = _descriptor.Descriptor(\n  name='ZtLiveScStateSignal',\n  full_name='AcFunPack.ZtLiveScStateSignal',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='item', full_name='AcFunPack.ZtLiveScStateSignal.item', index=0,\n      number=1, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5565,\n  serialized_end=5716,\n)\n\n\n_ZTLIVESCSTATUSCHANGED_BANNEDINFO = _descriptor.Descriptor(\n  name='BannedInfo',\n  full_name='AcFunPack.ZtLiveScStatusChanged.BannedInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='banReason', full_name='AcFunPack.ZtLiveScStatusChanged.BannedInfo.banReason', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5849,\n  serialized_end=5880,\n)\n\n_ZTLIVESCSTATUSCHANGED = _descriptor.Descriptor(\n  name='ZtLiveScStatusChanged',\n  full_name='AcFunPack.ZtLiveScStatusChanged',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='type', full_name='AcFunPack.ZtLiveScStatusChanged.type', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='maxRandomDelayMs', full_name='AcFunPack.ZtLiveScStatusChanged.maxRandomDelayMs', index=1,\n      number=2, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='bannedInfo', full_name='AcFunPack.ZtLiveScStatusChanged.bannedInfo', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_ZTLIVESCSTATUSCHANGED_BANNEDINFO, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5719,\n  serialized_end=5880,\n)\n\n\n_COMMONACTIONSIGNALCOMMENT = _descriptor.Descriptor(\n  name='CommonActionSignalComment',\n  full_name='AcFunPack.CommonActionSignalComment',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='content', full_name='AcFunPack.CommonActionSignalComment.content', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendTimeMs', full_name='AcFunPack.CommonActionSignalComment.sendTimeMs', index=1,\n      number=2, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonActionSignalComment.userInfo', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5882,\n  serialized_end=5991,\n)\n\n\n_COMMONACTIONSIGNALLIKE = _descriptor.Descriptor(\n  name='CommonActionSignalLike',\n  full_name='AcFunPack.CommonActionSignalLike',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonActionSignalLike.userInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendTimeMs', full_name='AcFunPack.CommonActionSignalLike.sendTimeMs', index=1,\n      number=2, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=5993,\n  serialized_end=6082,\n)\n\n\n_COMMONACTIONSIGNALGIFT = _descriptor.Descriptor(\n  name='CommonActionSignalGift',\n  full_name='AcFunPack.CommonActionSignalGift',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonActionSignalGift.userInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendTimeMs', full_name='AcFunPack.CommonActionSignalGift.sendTimeMs', index=1,\n      number=2, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftId', full_name='AcFunPack.CommonActionSignalGift.giftId', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='batchSize', full_name='AcFunPack.CommonActionSignalGift.batchSize', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='comboCount', full_name='AcFunPack.CommonActionSignalGift.comboCount', index=4,\n      number=5, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rank', full_name='AcFunPack.CommonActionSignalGift.rank', index=5,\n      number=6, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='comboKey', full_name='AcFunPack.CommonActionSignalGift.comboKey', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='slotDisplayDurationMs', full_name='AcFunPack.CommonActionSignalGift.slotDisplayDurationMs', index=7,\n      number=8, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='expireDurationMs', full_name='AcFunPack.CommonActionSignalGift.expireDurationMs', index=8,\n      number=9, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6085,\n  serialized_end=6318,\n)\n\n\n_COMMONSTATESIGNALDISPLAYINFO = _descriptor.Descriptor(\n  name='CommonStateSignalDisplayInfo',\n  full_name='AcFunPack.CommonStateSignalDisplayInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='watchingCount', full_name='AcFunPack.CommonStateSignalDisplayInfo.watchingCount', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='likeCount', full_name='AcFunPack.CommonStateSignalDisplayInfo.likeCount', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='likeDelta', full_name='AcFunPack.CommonStateSignalDisplayInfo.likeDelta', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6320,\n  serialized_end=6411,\n)\n\n\n_COMMONSTATESIGNALTOPUSERS_TOPUSER = _descriptor.Descriptor(\n  name='TopUser',\n  full_name='AcFunPack.CommonStateSignalTopUsers.TopUser',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.userInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='customWatchingListData', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.customWatchingListData', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='displaySendAmount', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.displaySendAmount', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='anonymousUser', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.anonymousUser', index=3,\n      number=4, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6507,\n  serialized_end=6643,\n)\n\n_COMMONSTATESIGNALTOPUSERS = _descriptor.Descriptor(\n  name='CommonStateSignalTopUsers',\n  full_name='AcFunPack.CommonStateSignalTopUsers',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='topUser', full_name='AcFunPack.CommonStateSignalTopUsers.topUser', index=0,\n      number=1, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_COMMONSTATESIGNALTOPUSERS_TOPUSER, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6414,\n  serialized_end=6643,\n)\n\n\n_COMMONACTIONSIGNALUSERENTERROOM = _descriptor.Descriptor(\n  name='CommonActionSignalUserEnterRoom',\n  full_name='AcFunPack.CommonActionSignalUserEnterRoom',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonActionSignalUserEnterRoom.userInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendTimeMs', full_name='AcFunPack.CommonActionSignalUserEnterRoom.sendTimeMs', index=1,\n      number=2, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6645,\n  serialized_end=6743,\n)\n\n\n_COMMONACTIONSIGNALUSERFOLLOWAUTHOR = _descriptor.Descriptor(\n  name='CommonActionSignalUserFollowAuthor',\n  full_name='AcFunPack.CommonActionSignalUserFollowAuthor',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonActionSignalUserFollowAuthor.userInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendTimeMs', full_name='AcFunPack.CommonActionSignalUserFollowAuthor.sendTimeMs', index=1,\n      number=2, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6745,\n  serialized_end=6846,\n)\n\n\n_COMMONACTIONSIGNALRICHTEXT = _descriptor.Descriptor(\n  name='CommonActionSignalRichText',\n  full_name='AcFunPack.CommonActionSignalRichText',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userInfo', full_name='AcFunPack.CommonActionSignalRichText.userInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='plain', full_name='AcFunPack.CommonActionSignalRichText.plain', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='image', full_name='AcFunPack.CommonActionSignalRichText.image', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=6849,\n  serialized_end=7003,\n)\n\n\n_USERINFOSEGMENT = _descriptor.Descriptor(\n  name='UserInfoSegment',\n  full_name='AcFunPack.UserInfoSegment',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='user', full_name='AcFunPack.UserInfoSegment.user', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='color', full_name='AcFunPack.UserInfoSegment.color', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7005,\n  serialized_end=7078,\n)\n\n\n_PLAINSEGMENT = _descriptor.Descriptor(\n  name='PlainSegment',\n  full_name='AcFunPack.PlainSegment',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='text', full_name='AcFunPack.PlainSegment.text', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='color', full_name='AcFunPack.PlainSegment.color', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7080,\n  serialized_end=7123,\n)\n\n\n_IMAGESEGMENT = _descriptor.Descriptor(\n  name='ImageSegment',\n  full_name='AcFunPack.ImageSegment',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='cdnNode', full_name='AcFunPack.ImageSegment.cdnNode', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='alternativeText', full_name='AcFunPack.ImageSegment.alternativeText', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='alternativeColor', full_name='AcFunPack.ImageSegment.alternativeColor', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7125,\n  serialized_end=7232,\n)\n\n\n_COMMONNOTIFYSIGNALKICKEDOUT = _descriptor.Descriptor(\n  name='CommonNotifySignalKickedOut',\n  full_name='AcFunPack.CommonNotifySignalKickedOut',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='reason', full_name='AcFunPack.CommonNotifySignalKickedOut.reason', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7234,\n  serialized_end=7279,\n)\n\n\n_COMMONNOTIFYSIGNALVIOLATIONALERT = _descriptor.Descriptor(\n  name='CommonNotifySignalViolationAlert',\n  full_name='AcFunPack.CommonNotifySignalViolationAlert',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='violationContent', full_name='AcFunPack.CommonNotifySignalViolationAlert.violationContent', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7281,\n  serialized_end=7341,\n)\n\n\n_COMMONSTATESIGNALCURRENTREDPACKLIST = _descriptor.Descriptor(\n  name='CommonStateSignalCurrentRedpackList',\n  full_name='AcFunPack.CommonStateSignalCurrentRedpackList',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7343,\n  serialized_end=7380,\n)\n\n\n_COMMONSTATESIGNALRECENTCOMMENT = _descriptor.Descriptor(\n  name='CommonStateSignalRecentComment',\n  full_name='AcFunPack.CommonStateSignalRecentComment',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='comment', full_name='AcFunPack.CommonStateSignalRecentComment.comment', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7382,\n  serialized_end=7469,\n)\n\n\n_COMMONSTATESIGNALCHATREADY = _descriptor.Descriptor(\n  name='CommonStateSignalChatReady',\n  full_name='AcFunPack.CommonStateSignalChatReady',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='chatId', full_name='AcFunPack.CommonStateSignalChatReady.chatId', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='guestUserInfo', full_name='AcFunPack.CommonStateSignalChatReady.guestUserInfo', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='mediaType', full_name='AcFunPack.CommonStateSignalChatReady.mediaType', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7471,\n  serialized_end=7584,\n)\n\n\n_COMMONSTATESIGNALCHATEND = _descriptor.Descriptor(\n  name='CommonStateSignalChatEnd',\n  full_name='AcFunPack.CommonStateSignalChatEnd',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='chatId', full_name='AcFunPack.CommonStateSignalChatEnd.chatId', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='endType', full_name='AcFunPack.CommonStateSignalChatEnd.endType', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7586,\n  serialized_end=7645,\n)\n\n\n_ACFUNACTIONSIGNALTHROWBANANA = _descriptor.Descriptor(\n  name='AcfunActionSignalThrowBanana',\n  full_name='AcFunPack.AcfunActionSignalThrowBanana',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='visitor', full_name='AcFunPack.AcfunActionSignalThrowBanana.visitor', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='count', full_name='AcFunPack.AcfunActionSignalThrowBanana.count', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendTimeMs', full_name='AcFunPack.AcfunActionSignalThrowBanana.sendTimeMs', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7647,\n  serialized_end=7750,\n)\n\n\n_ACFUNSTATESIGNALDISPLAYINFO = _descriptor.Descriptor(\n  name='AcfunStateSignalDisplayInfo',\n  full_name='AcFunPack.AcfunStateSignalDisplayInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='bananaCount', full_name='AcFunPack.AcfunStateSignalDisplayInfo.bananaCount', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7752,\n  serialized_end=7802,\n)\n\n\n_ACFUNACTIONSIGNALJOINCLUB = _descriptor.Descriptor(\n  name='AcfunActionSignalJoinClub',\n  full_name='AcFunPack.AcfunActionSignalJoinClub',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='fansInfo', full_name='AcFunPack.AcfunActionSignalJoinClub.fansInfo', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uperInfo', full_name='AcFunPack.AcfunActionSignalJoinClub.uperInfo', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='joinTimeMs', full_name='AcFunPack.AcfunActionSignalJoinClub.joinTimeMs', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7804,\n  serialized_end=7929,\n)\n\n\n_ZTLIVEUSERINFO = _descriptor.Descriptor(\n  name='ZtLiveUserInfo',\n  full_name='AcFunPack.ZtLiveUserInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userId', full_name='AcFunPack.ZtLiveUserInfo.userId', index=0,\n      number=1, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='nickname', full_name='AcFunPack.ZtLiveUserInfo.nickname', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='avatar', full_name='AcFunPack.ZtLiveUserInfo.avatar', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=7931,\n  serialized_end=8022,\n)\n\n\n_IMAGECDNNODE = _descriptor.Descriptor(\n  name='ImageCdnNode',\n  full_name='AcFunPack.ImageCdnNode',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='cdn', full_name='AcFunPack.ImageCdnNode.cdn', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='url', full_name='AcFunPack.ImageCdnNode.url', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='urlPattern', full_name='AcFunPack.ImageCdnNode.urlPattern', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=8024,\n  serialized_end=8084,\n)\n\n\n_USERINFO = _descriptor.Descriptor(\n  name='UserInfo',\n  full_name='AcFunPack.UserInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userId', full_name='AcFunPack.UserInfo.userId', index=0,\n      number=1, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='name', full_name='AcFunPack.UserInfo.name', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=8086,\n  serialized_end=8126,\n)\n\n_REGISTERREQUEST.fields_by_name['appInfo'].message_type = _APPINFO\n_REGISTERREQUEST.fields_by_name['deviceInfo'].message_type = _DEVICEINFO\n_REGISTERREQUEST.fields_by_name['envInfo'].message_type = _ENVINFO\n_REGISTERREQUEST.fields_by_name['presenceStatus'].enum_type = _REGISTERREQUEST_PRESENCESTATUS\n_REGISTERREQUEST.fields_by_name['appActiveStatus'].enum_type = _REGISTERREQUEST_ACTIVESTATUS\n_REGISTERREQUEST.fields_by_name['pushServiceToken'].message_type = _PUSHSERVICETOKEN\n_REGISTERREQUEST.fields_by_name['pushServiceTokenList'].message_type = _PUSHSERVICETOKEN\n_REGISTERREQUEST.fields_by_name['ztCommonInfo'].message_type = _ZTCOMMONINFO\n_REGISTERREQUEST_PRESENCESTATUS.containing_type = _REGISTERREQUEST\n_REGISTERREQUEST_ACTIVESTATUS.containing_type = _REGISTERREQUEST\n_REGISTERRESPONSE.fields_by_name['accessPointsConfig'].message_type = _ACCESSPOINTSCONFIG\n_REGISTERRESPONSE.fields_by_name['sdkOption'].message_type = _SDKOPTION\n_REGISTERRESPONSE.fields_by_name['accessPointsConfigIpv6'].message_type = _ACCESSPOINTSCONFIG\n_ACCESSPOINTSCONFIG.fields_by_name['optimalAps'].message_type = _ACCESSPOINT\n_ACCESSPOINTSCONFIG.fields_by_name['backupAps'].message_type = _ACCESSPOINT\n_ACCESSPOINTSCONFIG.fields_by_name['forceLastConnectedAp'].message_type = _ACCESSPOINT\n_ACCESSPOINT.fields_by_name['addressType'].enum_type = _ACCESSPOINT_ADDRESSTYPE\n_ACCESSPOINT_ADDRESSTYPE.containing_type = _ACCESSPOINT\n_APPINFO_EXTENSIONINFOENTRY.containing_type = _APPINFO\n_APPINFO.fields_by_name['extensionInfo'].message_type = _APPINFO_EXTENSIONINFOENTRY\n_DEVICEINFO.fields_by_name['platformType'].enum_type = _DEVICEINFO_PLATFORMTYPE\n_DEVICEINFO_PLATFORMTYPE.containing_type = _DEVICEINFO\n_ENVINFO.fields_by_name['networkType'].enum_type = _ENVINFO_NETWORKTYPE\n_ENVINFO_NETWORKTYPE.containing_type = _ENVINFO\n_PUSHSERVICETOKEN.fields_by_name['pushType'].enum_type = _PUSHSERVICETOKEN_PUSHTYPE\n_PUSHSERVICETOKEN_PUSHTYPE.containing_type = _PUSHSERVICETOKEN\n_PINGREQUEST.fields_by_name['pingType'].enum_type = _PINGREQUEST_PINGTYPE\n_PINGREQUEST_PINGTYPE.containing_type = _PINGREQUEST\n_UPSTREAMPAYLOAD.fields_by_name['userInstance'].message_type = _USERINSTANCE\n_UPSTREAMPAYLOAD.fields_by_name['settingInfo'].message_type = _SETTINGINFO\n_UPSTREAMPAYLOAD.fields_by_name['requestBasicInfo'].message_type = _REQUSETBASICINFO\n_UPSTREAMPAYLOAD.fields_by_name['frontendInfo'].message_type = _FRONTENDINFO\n_USERINSTANCE.fields_by_name['user'].message_type = _USER\n_REQUSETBASICINFO.fields_by_name['clientType'].enum_type = _DEVICEINFO_PLATFORMTYPE\n_REQUSETBASICINFO.fields_by_name['appInfo'].message_type = _APPINFO\n_REQUSETBASICINFO.fields_by_name['deviceInfo'].message_type = _DEVICEINFO\n_REQUSETBASICINFO.fields_by_name['envInfo'].message_type = _ENVINFO\n_PACKETHEADER.fields_by_name['encodingType'].enum_type = _PACKETHEADER_ENCODINGTYPE\n_PACKETHEADER.fields_by_name['encryptionMode'].enum_type = _PACKETHEADER_ENCRYPTIONMODE\n_PACKETHEADER.fields_by_name['tokenInfo'].message_type = _TOKENINFO\n_PACKETHEADER.fields_by_name['features'].enum_type = _PACKETHEADER_FEATURE\n_PACKETHEADER_FLAGS.containing_type = _PACKETHEADER\n_PACKETHEADER_ENCODINGTYPE.containing_type = _PACKETHEADER\n_PACKETHEADER_ENCRYPTIONMODE.containing_type = _PACKETHEADER\n_PACKETHEADER_FEATURE.containing_type = _PACKETHEADER\n_TOKENINFO.fields_by_name['tokenType'].enum_type = _TOKENINFO_TOKENTYPE\n_TOKENINFO_TOKENTYPE.containing_type = _TOKENINFO\n_KEEPALIVEREQUEST.fields_by_name['presenceStatus'].enum_type = _REGISTERREQUEST_PRESENCESTATUS\n_KEEPALIVEREQUEST.fields_by_name['appActiveStatus'].enum_type = _REGISTERREQUEST_ACTIVESTATUS\n_KEEPALIVEREQUEST.fields_by_name['pushServiceToken'].message_type = _PUSHSERVICETOKEN\n_KEEPALIVEREQUEST.fields_by_name['pushServiceTokenList'].message_type = _PUSHSERVICETOKEN\n_ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM.containing_type = _ZTLIVESCNOTIFYSIGNAL\n_ZTLIVESCNOTIFYSIGNAL.fields_by_name['item'].message_type = _ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM\n_ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM.containing_type = _ZTLIVESCACTIONSIGNAL\n_ZTLIVESCACTIONSIGNAL.fields_by_name['item'].message_type = _ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM\n_ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM.containing_type = _ZTLIVESCSTATESIGNAL\n_ZTLIVESCSTATESIGNAL.fields_by_name['item'].message_type = _ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM\n_ZTLIVESCSTATUSCHANGED_BANNEDINFO.containing_type = _ZTLIVESCSTATUSCHANGED\n_ZTLIVESCSTATUSCHANGED.fields_by_name['bannedInfo'].message_type = _ZTLIVESCSTATUSCHANGED_BANNEDINFO\n_COMMONACTIONSIGNALCOMMENT.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO\n_COMMONACTIONSIGNALLIKE.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO\n_COMMONACTIONSIGNALGIFT.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO\n_COMMONSTATESIGNALTOPUSERS_TOPUSER.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO\n_COMMONSTATESIGNALTOPUSERS_TOPUSER.containing_type = _COMMONSTATESIGNALTOPUSERS\n_COMMONSTATESIGNALTOPUSERS.fields_by_name['topUser'].message_type = _COMMONSTATESIGNALTOPUSERS_TOPUSER\n_COMMONACTIONSIGNALUSERENTERROOM.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO\n_COMMONACTIONSIGNALUSERFOLLOWAUTHOR.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO\n_COMMONACTIONSIGNALRICHTEXT.fields_by_name['userInfo'].message_type = _USERINFOSEGMENT\n_COMMONACTIONSIGNALRICHTEXT.fields_by_name['plain'].message_type = _PLAINSEGMENT\n_COMMONACTIONSIGNALRICHTEXT.fields_by_name['image'].message_type = _IMAGESEGMENT\n_USERINFOSEGMENT.fields_by_name['user'].message_type = _ZTLIVEUSERINFO\n_IMAGESEGMENT.fields_by_name['cdnNode'].message_type = _IMAGECDNNODE\n_COMMONSTATESIGNALRECENTCOMMENT.fields_by_name['comment'].message_type = _COMMONACTIONSIGNALCOMMENT\n_COMMONSTATESIGNALCHATREADY.fields_by_name['guestUserInfo'].message_type = _ZTLIVEUSERINFO\n_ACFUNACTIONSIGNALTHROWBANANA.fields_by_name['visitor'].message_type = _USERINFO\n_ACFUNACTIONSIGNALJOINCLUB.fields_by_name['fansInfo'].message_type = _USERINFO\n_ACFUNACTIONSIGNALJOINCLUB.fields_by_name['uperInfo'].message_type = _USERINFO\n_ZTLIVEUSERINFO.fields_by_name['avatar'].message_type = _IMAGECDNNODE\nDESCRIPTOR.message_types_by_name['RegisterRequest'] = _REGISTERREQUEST\nDESCRIPTOR.message_types_by_name['RegisterResponse'] = _REGISTERRESPONSE\nDESCRIPTOR.message_types_by_name['AccessPointsConfig'] = _ACCESSPOINTSCONFIG\nDESCRIPTOR.message_types_by_name['AccessPoint'] = _ACCESSPOINT\nDESCRIPTOR.message_types_by_name['SdkOption'] = _SDKOPTION\nDESCRIPTOR.message_types_by_name['ZtLiveCsEnterRoom'] = _ZTLIVECSENTERROOM\nDESCRIPTOR.message_types_by_name['ZtLiveCsHeartbeat'] = _ZTLIVECSHEARTBEAT\nDESCRIPTOR.message_types_by_name['CsCmd'] = _CSCMD\nDESCRIPTOR.message_types_by_name['AppInfo'] = _APPINFO\nDESCRIPTOR.message_types_by_name['DeviceInfo'] = _DEVICEINFO\nDESCRIPTOR.message_types_by_name['EnvInfo'] = _ENVINFO\nDESCRIPTOR.message_types_by_name['PushServiceToken'] = _PUSHSERVICETOKEN\nDESCRIPTOR.message_types_by_name['ZtCommonInfo'] = _ZTCOMMONINFO\nDESCRIPTOR.message_types_by_name['PingResponse'] = _PINGRESPONSE\nDESCRIPTOR.message_types_by_name['PingRequest'] = _PINGREQUEST\nDESCRIPTOR.message_types_by_name['UpstreamPayload'] = _UPSTREAMPAYLOAD\nDESCRIPTOR.message_types_by_name['DownstreamPayload'] = _DOWNSTREAMPAYLOAD\nDESCRIPTOR.message_types_by_name['UserInstance'] = _USERINSTANCE\nDESCRIPTOR.message_types_by_name['User'] = _USER\nDESCRIPTOR.message_types_by_name['SettingInfo'] = _SETTINGINFO\nDESCRIPTOR.message_types_by_name['RequsetBasicInfo'] = _REQUSETBASICINFO\nDESCRIPTOR.message_types_by_name['FrontendInfo'] = _FRONTENDINFO\nDESCRIPTOR.message_types_by_name['PacketHeader'] = _PACKETHEADER\nDESCRIPTOR.message_types_by_name['TokenInfo'] = _TOKENINFO\nDESCRIPTOR.message_types_by_name['KeepAliveRequest'] = _KEEPALIVEREQUEST\nDESCRIPTOR.message_types_by_name['ZtLiveScMessage'] = _ZTLIVESCMESSAGE\nDESCRIPTOR.message_types_by_name['ZtLiveScNotifySignal'] = _ZTLIVESCNOTIFYSIGNAL\nDESCRIPTOR.message_types_by_name['ZtLiveScActionSignal'] = _ZTLIVESCACTIONSIGNAL\nDESCRIPTOR.message_types_by_name['ZtLiveScStateSignal'] = _ZTLIVESCSTATESIGNAL\nDESCRIPTOR.message_types_by_name['ZtLiveScStatusChanged'] = _ZTLIVESCSTATUSCHANGED\nDESCRIPTOR.message_types_by_name['CommonActionSignalComment'] = _COMMONACTIONSIGNALCOMMENT\nDESCRIPTOR.message_types_by_name['CommonActionSignalLike'] = _COMMONACTIONSIGNALLIKE\nDESCRIPTOR.message_types_by_name['CommonActionSignalGift'] = _COMMONACTIONSIGNALGIFT\nDESCRIPTOR.message_types_by_name['CommonStateSignalDisplayInfo'] = _COMMONSTATESIGNALDISPLAYINFO\nDESCRIPTOR.message_types_by_name['CommonStateSignalTopUsers'] = _COMMONSTATESIGNALTOPUSERS\nDESCRIPTOR.message_types_by_name['CommonActionSignalUserEnterRoom'] = _COMMONACTIONSIGNALUSERENTERROOM\nDESCRIPTOR.message_types_by_name['CommonActionSignalUserFollowAuthor'] = _COMMONACTIONSIGNALUSERFOLLOWAUTHOR\nDESCRIPTOR.message_types_by_name['CommonActionSignalRichText'] = _COMMONACTIONSIGNALRICHTEXT\nDESCRIPTOR.message_types_by_name['UserInfoSegment'] = _USERINFOSEGMENT\nDESCRIPTOR.message_types_by_name['PlainSegment'] = _PLAINSEGMENT\nDESCRIPTOR.message_types_by_name['ImageSegment'] = _IMAGESEGMENT\nDESCRIPTOR.message_types_by_name['CommonNotifySignalKickedOut'] = _COMMONNOTIFYSIGNALKICKEDOUT\nDESCRIPTOR.message_types_by_name['CommonNotifySignalViolationAlert'] = _COMMONNOTIFYSIGNALVIOLATIONALERT\nDESCRIPTOR.message_types_by_name['CommonStateSignalCurrentRedpackList'] = _COMMONSTATESIGNALCURRENTREDPACKLIST\nDESCRIPTOR.message_types_by_name['CommonStateSignalRecentComment'] = _COMMONSTATESIGNALRECENTCOMMENT\nDESCRIPTOR.message_types_by_name['CommonStateSignalChatReady'] = _COMMONSTATESIGNALCHATREADY\nDESCRIPTOR.message_types_by_name['CommonStateSignalChatEnd'] = _COMMONSTATESIGNALCHATEND\nDESCRIPTOR.message_types_by_name['AcfunActionSignalThrowBanana'] = _ACFUNACTIONSIGNALTHROWBANANA\nDESCRIPTOR.message_types_by_name['AcfunStateSignalDisplayInfo'] = _ACFUNSTATESIGNALDISPLAYINFO\nDESCRIPTOR.message_types_by_name['AcfunActionSignalJoinClub'] = _ACFUNACTIONSIGNALJOINCLUB\nDESCRIPTOR.message_types_by_name['ZtLiveUserInfo'] = _ZTLIVEUSERINFO\nDESCRIPTOR.message_types_by_name['ImageCdnNode'] = _IMAGECDNNODE\nDESCRIPTOR.message_types_by_name['UserInfo'] = _USERINFO\n_sym_db.RegisterFileDescriptor(DESCRIPTOR)\n\nRegisterRequest = _reflection.GeneratedProtocolMessageType('RegisterRequest', (_message.Message,), {\n  'DESCRIPTOR' : _REGISTERREQUEST,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.RegisterRequest)\n  })\n_sym_db.RegisterMessage(RegisterRequest)\n\nRegisterResponse = _reflection.GeneratedProtocolMessageType('RegisterResponse', (_message.Message,), {\n  'DESCRIPTOR' : _REGISTERRESPONSE,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.RegisterResponse)\n  })\n_sym_db.RegisterMessage(RegisterResponse)\n\nAccessPointsConfig = _reflection.GeneratedProtocolMessageType('AccessPointsConfig', (_message.Message,), {\n  'DESCRIPTOR' : _ACCESSPOINTSCONFIG,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.AccessPointsConfig)\n  })\n_sym_db.RegisterMessage(AccessPointsConfig)\n\nAccessPoint = _reflection.GeneratedProtocolMessageType('AccessPoint', (_message.Message,), {\n  'DESCRIPTOR' : _ACCESSPOINT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.AccessPoint)\n  })\n_sym_db.RegisterMessage(AccessPoint)\n\nSdkOption = _reflection.GeneratedProtocolMessageType('SdkOption', (_message.Message,), {\n  'DESCRIPTOR' : _SDKOPTION,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.SdkOption)\n  })\n_sym_db.RegisterMessage(SdkOption)\n\nZtLiveCsEnterRoom = _reflection.GeneratedProtocolMessageType('ZtLiveCsEnterRoom', (_message.Message,), {\n  'DESCRIPTOR' : _ZTLIVECSENTERROOM,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveCsEnterRoom)\n  })\n_sym_db.RegisterMessage(ZtLiveCsEnterRoom)\n\nZtLiveCsHeartbeat = _reflection.GeneratedProtocolMessageType('ZtLiveCsHeartbeat', (_message.Message,), {\n  'DESCRIPTOR' : _ZTLIVECSHEARTBEAT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveCsHeartbeat)\n  })\n_sym_db.RegisterMessage(ZtLiveCsHeartbeat)\n\nCsCmd = _reflection.GeneratedProtocolMessageType('CsCmd', (_message.Message,), {\n  'DESCRIPTOR' : _CSCMD,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CsCmd)\n  })\n_sym_db.RegisterMessage(CsCmd)\n\nAppInfo = _reflection.GeneratedProtocolMessageType('AppInfo', (_message.Message,), {\n\n  'ExtensionInfoEntry' : _reflection.GeneratedProtocolMessageType('ExtensionInfoEntry', (_message.Message,), {\n    'DESCRIPTOR' : _APPINFO_EXTENSIONINFOENTRY,\n    '__module__' : 'acfun_pb2'\n    # @@protoc_insertion_point(class_scope:AcFunPack.AppInfo.ExtensionInfoEntry)\n    })\n  ,\n  'DESCRIPTOR' : _APPINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.AppInfo)\n  })\n_sym_db.RegisterMessage(AppInfo)\n_sym_db.RegisterMessage(AppInfo.ExtensionInfoEntry)\n\nDeviceInfo = _reflection.GeneratedProtocolMessageType('DeviceInfo', (_message.Message,), {\n  'DESCRIPTOR' : _DEVICEINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.DeviceInfo)\n  })\n_sym_db.RegisterMessage(DeviceInfo)\n\nEnvInfo = _reflection.GeneratedProtocolMessageType('EnvInfo', (_message.Message,), {\n  'DESCRIPTOR' : _ENVINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.EnvInfo)\n  })\n_sym_db.RegisterMessage(EnvInfo)\n\nPushServiceToken = _reflection.GeneratedProtocolMessageType('PushServiceToken', (_message.Message,), {\n  'DESCRIPTOR' : _PUSHSERVICETOKEN,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.PushServiceToken)\n  })\n_sym_db.RegisterMessage(PushServiceToken)\n\nZtCommonInfo = _reflection.GeneratedProtocolMessageType('ZtCommonInfo', (_message.Message,), {\n  'DESCRIPTOR' : _ZTCOMMONINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtCommonInfo)\n  })\n_sym_db.RegisterMessage(ZtCommonInfo)\n\nPingResponse = _reflection.GeneratedProtocolMessageType('PingResponse', (_message.Message,), {\n  'DESCRIPTOR' : _PINGRESPONSE,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.PingResponse)\n  })\n_sym_db.RegisterMessage(PingResponse)\n\nPingRequest = _reflection.GeneratedProtocolMessageType('PingRequest', (_message.Message,), {\n  'DESCRIPTOR' : _PINGREQUEST,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.PingRequest)\n  })\n_sym_db.RegisterMessage(PingRequest)\n\nUpstreamPayload = _reflection.GeneratedProtocolMessageType('UpstreamPayload', (_message.Message,), {\n  'DESCRIPTOR' : _UPSTREAMPAYLOAD,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.UpstreamPayload)\n  })\n_sym_db.RegisterMessage(UpstreamPayload)\n\nDownstreamPayload = _reflection.GeneratedProtocolMessageType('DownstreamPayload', (_message.Message,), {\n  'DESCRIPTOR' : _DOWNSTREAMPAYLOAD,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.DownstreamPayload)\n  })\n_sym_db.RegisterMessage(DownstreamPayload)\n\nUserInstance = _reflection.GeneratedProtocolMessageType('UserInstance', (_message.Message,), {\n  'DESCRIPTOR' : _USERINSTANCE,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.UserInstance)\n  })\n_sym_db.RegisterMessage(UserInstance)\n\nUser = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), {\n  'DESCRIPTOR' : _USER,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.User)\n  })\n_sym_db.RegisterMessage(User)\n\nSettingInfo = _reflection.GeneratedProtocolMessageType('SettingInfo', (_message.Message,), {\n  'DESCRIPTOR' : _SETTINGINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.SettingInfo)\n  })\n_sym_db.RegisterMessage(SettingInfo)\n\nRequsetBasicInfo = _reflection.GeneratedProtocolMessageType('RequsetBasicInfo', (_message.Message,), {\n  'DESCRIPTOR' : _REQUSETBASICINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.RequsetBasicInfo)\n  })\n_sym_db.RegisterMessage(RequsetBasicInfo)\n\nFrontendInfo = _reflection.GeneratedProtocolMessageType('FrontendInfo', (_message.Message,), {\n  'DESCRIPTOR' : _FRONTENDINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.FrontendInfo)\n  })\n_sym_db.RegisterMessage(FrontendInfo)\n\nPacketHeader = _reflection.GeneratedProtocolMessageType('PacketHeader', (_message.Message,), {\n  'DESCRIPTOR' : _PACKETHEADER,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.PacketHeader)\n  })\n_sym_db.RegisterMessage(PacketHeader)\n\nTokenInfo = _reflection.GeneratedProtocolMessageType('TokenInfo', (_message.Message,), {\n  'DESCRIPTOR' : _TOKENINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.TokenInfo)\n  })\n_sym_db.RegisterMessage(TokenInfo)\n\nKeepAliveRequest = _reflection.GeneratedProtocolMessageType('KeepAliveRequest', (_message.Message,), {\n  'DESCRIPTOR' : _KEEPALIVEREQUEST,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.KeepAliveRequest)\n  })\n_sym_db.RegisterMessage(KeepAliveRequest)\n\nZtLiveScMessage = _reflection.GeneratedProtocolMessageType('ZtLiveScMessage', (_message.Message,), {\n  'DESCRIPTOR' : _ZTLIVESCMESSAGE,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScMessage)\n  })\n_sym_db.RegisterMessage(ZtLiveScMessage)\n\nZtLiveScNotifySignal = _reflection.GeneratedProtocolMessageType('ZtLiveScNotifySignal', (_message.Message,), {\n\n  'ZtLiveNotifySignalItem' : _reflection.GeneratedProtocolMessageType('ZtLiveNotifySignalItem', (_message.Message,), {\n    'DESCRIPTOR' : _ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM,\n    '__module__' : 'acfun_pb2'\n    # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem)\n    })\n  ,\n  'DESCRIPTOR' : _ZTLIVESCNOTIFYSIGNAL,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScNotifySignal)\n  })\n_sym_db.RegisterMessage(ZtLiveScNotifySignal)\n_sym_db.RegisterMessage(ZtLiveScNotifySignal.ZtLiveNotifySignalItem)\n\nZtLiveScActionSignal = _reflection.GeneratedProtocolMessageType('ZtLiveScActionSignal', (_message.Message,), {\n\n  'ZtLiveActionSignalItem' : _reflection.GeneratedProtocolMessageType('ZtLiveActionSignalItem', (_message.Message,), {\n    'DESCRIPTOR' : _ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM,\n    '__module__' : 'acfun_pb2'\n    # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem)\n    })\n  ,\n  'DESCRIPTOR' : _ZTLIVESCACTIONSIGNAL,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScActionSignal)\n  })\n_sym_db.RegisterMessage(ZtLiveScActionSignal)\n_sym_db.RegisterMessage(ZtLiveScActionSignal.ZtLiveActionSignalItem)\n\nZtLiveScStateSignal = _reflection.GeneratedProtocolMessageType('ZtLiveScStateSignal', (_message.Message,), {\n\n  'ZtLiveStateSignalItem' : _reflection.GeneratedProtocolMessageType('ZtLiveStateSignalItem', (_message.Message,), {\n    'DESCRIPTOR' : _ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM,\n    '__module__' : 'acfun_pb2'\n    # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem)\n    })\n  ,\n  'DESCRIPTOR' : _ZTLIVESCSTATESIGNAL,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStateSignal)\n  })\n_sym_db.RegisterMessage(ZtLiveScStateSignal)\n_sym_db.RegisterMessage(ZtLiveScStateSignal.ZtLiveStateSignalItem)\n\nZtLiveScStatusChanged = _reflection.GeneratedProtocolMessageType('ZtLiveScStatusChanged', (_message.Message,), {\n\n  'BannedInfo' : _reflection.GeneratedProtocolMessageType('BannedInfo', (_message.Message,), {\n    'DESCRIPTOR' : _ZTLIVESCSTATUSCHANGED_BANNEDINFO,\n    '__module__' : 'acfun_pb2'\n    # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStatusChanged.BannedInfo)\n    })\n  ,\n  'DESCRIPTOR' : _ZTLIVESCSTATUSCHANGED,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStatusChanged)\n  })\n_sym_db.RegisterMessage(ZtLiveScStatusChanged)\n_sym_db.RegisterMessage(ZtLiveScStatusChanged.BannedInfo)\n\nCommonActionSignalComment = _reflection.GeneratedProtocolMessageType('CommonActionSignalComment', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONACTIONSIGNALCOMMENT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalComment)\n  })\n_sym_db.RegisterMessage(CommonActionSignalComment)\n\nCommonActionSignalLike = _reflection.GeneratedProtocolMessageType('CommonActionSignalLike', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONACTIONSIGNALLIKE,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalLike)\n  })\n_sym_db.RegisterMessage(CommonActionSignalLike)\n\nCommonActionSignalGift = _reflection.GeneratedProtocolMessageType('CommonActionSignalGift', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONACTIONSIGNALGIFT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalGift)\n  })\n_sym_db.RegisterMessage(CommonActionSignalGift)\n\nCommonStateSignalDisplayInfo = _reflection.GeneratedProtocolMessageType('CommonStateSignalDisplayInfo', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONSTATESIGNALDISPLAYINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalDisplayInfo)\n  })\n_sym_db.RegisterMessage(CommonStateSignalDisplayInfo)\n\nCommonStateSignalTopUsers = _reflection.GeneratedProtocolMessageType('CommonStateSignalTopUsers', (_message.Message,), {\n\n  'TopUser' : _reflection.GeneratedProtocolMessageType('TopUser', (_message.Message,), {\n    'DESCRIPTOR' : _COMMONSTATESIGNALTOPUSERS_TOPUSER,\n    '__module__' : 'acfun_pb2'\n    # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalTopUsers.TopUser)\n    })\n  ,\n  'DESCRIPTOR' : _COMMONSTATESIGNALTOPUSERS,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalTopUsers)\n  })\n_sym_db.RegisterMessage(CommonStateSignalTopUsers)\n_sym_db.RegisterMessage(CommonStateSignalTopUsers.TopUser)\n\nCommonActionSignalUserEnterRoom = _reflection.GeneratedProtocolMessageType('CommonActionSignalUserEnterRoom', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONACTIONSIGNALUSERENTERROOM,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalUserEnterRoom)\n  })\n_sym_db.RegisterMessage(CommonActionSignalUserEnterRoom)\n\nCommonActionSignalUserFollowAuthor = _reflection.GeneratedProtocolMessageType('CommonActionSignalUserFollowAuthor', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONACTIONSIGNALUSERFOLLOWAUTHOR,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalUserFollowAuthor)\n  })\n_sym_db.RegisterMessage(CommonActionSignalUserFollowAuthor)\n\nCommonActionSignalRichText = _reflection.GeneratedProtocolMessageType('CommonActionSignalRichText', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONACTIONSIGNALRICHTEXT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalRichText)\n  })\n_sym_db.RegisterMessage(CommonActionSignalRichText)\n\nUserInfoSegment = _reflection.GeneratedProtocolMessageType('UserInfoSegment', (_message.Message,), {\n  'DESCRIPTOR' : _USERINFOSEGMENT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.UserInfoSegment)\n  })\n_sym_db.RegisterMessage(UserInfoSegment)\n\nPlainSegment = _reflection.GeneratedProtocolMessageType('PlainSegment', (_message.Message,), {\n  'DESCRIPTOR' : _PLAINSEGMENT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.PlainSegment)\n  })\n_sym_db.RegisterMessage(PlainSegment)\n\nImageSegment = _reflection.GeneratedProtocolMessageType('ImageSegment', (_message.Message,), {\n  'DESCRIPTOR' : _IMAGESEGMENT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ImageSegment)\n  })\n_sym_db.RegisterMessage(ImageSegment)\n\nCommonNotifySignalKickedOut = _reflection.GeneratedProtocolMessageType('CommonNotifySignalKickedOut', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONNOTIFYSIGNALKICKEDOUT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonNotifySignalKickedOut)\n  })\n_sym_db.RegisterMessage(CommonNotifySignalKickedOut)\n\nCommonNotifySignalViolationAlert = _reflection.GeneratedProtocolMessageType('CommonNotifySignalViolationAlert', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONNOTIFYSIGNALVIOLATIONALERT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonNotifySignalViolationAlert)\n  })\n_sym_db.RegisterMessage(CommonNotifySignalViolationAlert)\n\nCommonStateSignalCurrentRedpackList = _reflection.GeneratedProtocolMessageType('CommonStateSignalCurrentRedpackList', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONSTATESIGNALCURRENTREDPACKLIST,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalCurrentRedpackList)\n  })\n_sym_db.RegisterMessage(CommonStateSignalCurrentRedpackList)\n\nCommonStateSignalRecentComment = _reflection.GeneratedProtocolMessageType('CommonStateSignalRecentComment', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONSTATESIGNALRECENTCOMMENT,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalRecentComment)\n  })\n_sym_db.RegisterMessage(CommonStateSignalRecentComment)\n\nCommonStateSignalChatReady = _reflection.GeneratedProtocolMessageType('CommonStateSignalChatReady', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONSTATESIGNALCHATREADY,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalChatReady)\n  })\n_sym_db.RegisterMessage(CommonStateSignalChatReady)\n\nCommonStateSignalChatEnd = _reflection.GeneratedProtocolMessageType('CommonStateSignalChatEnd', (_message.Message,), {\n  'DESCRIPTOR' : _COMMONSTATESIGNALCHATEND,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalChatEnd)\n  })\n_sym_db.RegisterMessage(CommonStateSignalChatEnd)\n\nAcfunActionSignalThrowBanana = _reflection.GeneratedProtocolMessageType('AcfunActionSignalThrowBanana', (_message.Message,), {\n  'DESCRIPTOR' : _ACFUNACTIONSIGNALTHROWBANANA,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.AcfunActionSignalThrowBanana)\n  })\n_sym_db.RegisterMessage(AcfunActionSignalThrowBanana)\n\nAcfunStateSignalDisplayInfo = _reflection.GeneratedProtocolMessageType('AcfunStateSignalDisplayInfo', (_message.Message,), {\n  'DESCRIPTOR' : _ACFUNSTATESIGNALDISPLAYINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.AcfunStateSignalDisplayInfo)\n  })\n_sym_db.RegisterMessage(AcfunStateSignalDisplayInfo)\n\nAcfunActionSignalJoinClub = _reflection.GeneratedProtocolMessageType('AcfunActionSignalJoinClub', (_message.Message,), {\n  'DESCRIPTOR' : _ACFUNACTIONSIGNALJOINCLUB,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.AcfunActionSignalJoinClub)\n  })\n_sym_db.RegisterMessage(AcfunActionSignalJoinClub)\n\nZtLiveUserInfo = _reflection.GeneratedProtocolMessageType('ZtLiveUserInfo', (_message.Message,), {\n  'DESCRIPTOR' : _ZTLIVEUSERINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveUserInfo)\n  })\n_sym_db.RegisterMessage(ZtLiveUserInfo)\n\nImageCdnNode = _reflection.GeneratedProtocolMessageType('ImageCdnNode', (_message.Message,), {\n  'DESCRIPTOR' : _IMAGECDNNODE,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.ImageCdnNode)\n  })\n_sym_db.RegisterMessage(ImageCdnNode)\n\nUserInfo = _reflection.GeneratedProtocolMessageType('UserInfo', (_message.Message,), {\n  'DESCRIPTOR' : _USERINFO,\n  '__module__' : 'acfun_pb2'\n  # @@protoc_insertion_point(class_scope:AcFunPack.UserInfo)\n  })\n_sym_db.RegisterMessage(UserInfo)\n\n\n_APPINFO_EXTENSIONINFOENTRY._options = None\n_PACKETHEADER_FLAGS._options = None\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "danmu/danmaku/bilibili.py",
    "content": "import json\nimport random\nfrom struct import pack, unpack\nimport aiohttp\nimport zlib\n\n\nclass Bilibili:\n    wss_url = 'wss://broadcastlv.chat.bilibili.com/sub'\n    heartbeat = b'\\x00\\x00\\x00\\x1f\\x00\\x10\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x5b\\x6f\\x62\\x6a\\x65\\x63\\x74\\x20' \\\n                b'\\x4f\\x62\\x6a\\x65\\x63\\x74\\x5d '\n    heartbeatInterval = 60\n\n    @staticmethod\n    async def get_ws_info(url):\n        url = 'https://api.live.bilibili.com/room/v1/Room/room_init?id=' + url.split('/')[-1]\n        reg_datas = []\n        async with aiohttp.ClientSession() as session:\n            async with session.get(url) as resp:\n                room_json = json.loads(await resp.text())\n                room_id = room_json['data']['room_id']\n                data = json.dumps({\n                    'roomid': room_id,\n                    'uid': int(1e14 + 2e14 * random.random()),\n                    'protover': 1\n                }, separators=(',', ':')).encode('ascii')\n                data = (pack('>i', len(data) + 16) + b'\\x00\\x10\\x00\\x01' +\n                        pack('>i', 7) + pack('>i', 1) + data)\n                reg_datas.append(data)\n\n        return Bilibili.wss_url, reg_datas\n\n    @staticmethod\n    def decode_msg(data):\n        dm_list_compressed = []\n        dm_list = []\n        ops = []\n        msgs = []\n        while True:\n            try:\n                packetLen, headerLen, ver, op, seq = unpack('!IHHII', data[0:16])\n            except Exception as e:\n                break\n            if len(data) < packetLen:\n                break\n            if ver == 1 or ver == 0:\n                ops.append(op)\n                dm_list.append(data[16:packetLen])\n            elif ver == 2:\n                dm_list_compressed.append(data[16:packetLen])\n            if len(data) == packetLen:\n                data = b''\n                break\n            else:\n                data = data[packetLen:]\n\n        for dm in dm_list_compressed:\n            d = zlib.decompress(dm)\n            while True:\n                try:\n                    packetLen, headerLen, ver, op, seq = unpack('!IHHII', d[0:16])\n                except Exception as e:\n                    break\n                if len(d) < packetLen:\n                    break\n                ops.append(op)\n                dm_list.append(d[16:packetLen])\n                if len(d) == packetLen:\n                    d = b''\n                    break\n                else:\n                    d = d[packetLen:]\n\n        for i, d in enumerate(dm_list):\n            try:\n                msg = {}\n                if ops[i] == 5:\n                    j = json.loads(d)\n                    msg['msg_type'] = {\n                        'SEND_GIFT': 'gift',\n                        'DANMU_MSG': 'danmaku',\n                        'WELCOME': 'enter',\n                        'NOTICE_MSG': 'broadcast',\n                        'LIVE_INTERACTIVE_GAME': 'interactive_danmaku'  # 新增互动弹幕，经测试与弹幕内容一致\n                    }.get(j.get('cmd'), 'other')\n\n                    # 2021-06-03 bilibili 字段更新, 形如 DANMU_MSG:4:0:2:2:2:0\n                    if msg.get('msg_type', 'UNKNOWN').startswith('DANMU_MSG'):\n                        msg['msg_type'] = 'danmaku'\n\n                    if msg['msg_type'] == 'danmaku':\n                        msg['name'] = (j.get('info', ['', '', ['', '']])[2][1]\n                                       or j.get('data', {}).get('uname', ''))\n                        msg['content'] = j.get('info', ['', ''])[1]\n                    elif msg['msg_type'] == 'interactive_danmaku':\n                        msg['name'] = j.get('data', {}).get('uname', '')\n                        msg['content'] = j.get('data', {}).get('msg', '')\n                    elif msg['msg_type'] == 'broadcast':\n                        msg['type'] = j.get('msg_type', 0)\n                        msg['roomid'] = j.get('real_roomid', 0)\n                        msg['content'] = j.get('msg_common', 'none')\n                        msg['raw'] = j\n                    else:\n                        msg['content'] = j\n                else:\n                    msg = {'name': '', 'content': d, 'msg_type': 'other'}\n                msgs.append(msg)\n            except Exception as e:\n                pass\n\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/cc.py",
    "content": "import aiohttp\nimport time\nimport uuid\nimport struct\nimport math\nimport zlib\nimport json\nimport re\n\n\nclass CC_Init:\n    def __init__(self):\n        self.offset = 0\n\n    def get_reg(self):\n        sid = 6144\n        cid = 2\n        update_req_info = {\n            '22': 640,\n            '23': 360,\n            '24': \"web\",\n            '25': \"Linux\",\n            '29': \"163_cc\",\n            '30': \"\",\n            '31': \"Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Mobile Safari/537.36\"\n        }\n        macAdd = device_token = str(uuid.uuid1()) + '@web.cc.163.com'\n        data = {\n            'web-cc': int(time.time() * 1e3),\n            'macAdd': macAdd,\n            'device_token': device_token,\n            'page_uuid': str(uuid.uuid1()),\n            'update_req_info': update_req_info,\n            'system': 'win',\n            'memory': 1,\n            'version': 1,\n            'webccType': 4253\n        }\n        reg_data = struct.pack('<HHI', sid, cid, 0) + self.encode_dict(data)\n        return reg_data\n\n    def get_beat(self):\n        sid = 6144\n        cid = 5\n        data = {}\n        beat_data = struct.pack('<HHI', sid, cid, 0) + self.encode_dict(data)\n        return beat_data\n\n    def get_join(self, data_cid, data_gametype, data_roomId):\n        sid = 512\n        cid = 1\n        data = {\n            'cid': data_cid,\n            'gametype': data_gametype,\n            'roomId': data_roomId\n        }\n        join_data = struct.pack('<HHI', sid, cid, 0) + self.encode_dict(data)\n        return join_data\n\n    def encode_str(self, r):\n        n = len(r)\n        i = 5 + 3 * n\n        s = f = 1 if n < 32 else 2 if n <= 255 else 3 if n <= 65535 else 5\n        b = 160 + n if s == 1 else 215 + s if s <= 3 else 219\n        if f == 1:\n            e = bytes([b])\n        else:\n            e = bytes([b, n])\n        return e + r.encode()\n\n    def encode_num(self, e):\n        if e <= 255:\n            return struct.pack('!B', e)\n        if 255 < e <= 65535:\n            t = struct.pack('!H', e)\n            return b'\\xcd' + t\n        else:\n            t = []\n            r = 9\n            n = 0\n            i = 52\n            o = 8\n            s = 8 * o - i - 1\n            c = (1 << s) - 1\n            h = c >> 1\n            l = pow(2, -24) - pow(2, -77) if i == 23 else 0\n            d = 0 if n else o - 1\n            p = 1 if n else -1\n            y = 1 if (e < 0 or e == 0 and 1 / e) else 0\n\n            while i >= 8:\n                e = abs(e)\n                f = math.floor(math.log(e) / math.log(2))\n                u = pow(2, -1 * f)\n                if e * u < 1:\n                    f -= 1\n                    u *= 2\n                if f + h >= 1:\n                    e += l / u\n                else:\n                    e += l * pow(2, 1 - h)\n                if e * u >= 2:\n                    f += 1\n                    u /= 2\n                if f + h >= c:\n                    a = 0\n                    f = c\n                elif f + h >= 1:\n                    a = (e * u - 1) * pow(2, i)\n                    f += h\n                else:\n                    a = e * pow(2, h - 1) * pow(2, i)\n                    f = 0\n\n                t.append(255 & int(a))\n                d += p\n                a /= 256\n                i -= 8\n\n            f = f << i | int(a)\n            s += i\n            while s > 0:\n                t.append(255 & int(f))\n                d += p\n                f /= 256\n                s -= 8\n\n            t[-1] |= 128 * y\n\n            t.reverse()\n            return b'\\xcb' + bytes(t)\n\n    def encode_dict(self, d):\n        n = len(d)\n        r = 128 + n if n < 16 else 222 if n <= 65535 else 223\n        t = bytes([r])\n        for k, v in d.items():\n            t += self.encode_str(k)\n            if isinstance(v, int):\n                t += self.encode_num(v)\n            elif isinstance(v, str):\n                t += self.encode_str(v)\n            elif isinstance(v, dict):\n                t += self.encode_dict(v)\n        return t\n\n    def p(self, fmt):\n        def r(t):\n            s, = struct.unpack_from(fmt, t, self.offset)\n            self.offset += struct.calcsize(fmt)\n            return s\n\n        return r\n\n    def i(self, t):\n        return lambda t: int(t[self.offset - 1])\n\n    def o(self, t, e):\n        return lambda r: e(r, t(r))\n\n    def f(self, t, e):\n        return lambda r: e(r, t)\n\n    def n(self, e):\n        if 0 <= e <= 127:\n            r = self.i(e)\n        elif 128 <= e <= 143:\n            r = self.f(e - 128, self.de_dict)\n        elif 144 <= e <= 159:\n            r = self.f(e - 144, self.de_list)\n        elif 160 <= e <= 191:\n            r = self.f(e - 160, self.de_str)\n        elif e == 192:\n            r = self.i(None)\n        elif e == 193:\n            r = None\n        elif e == 194:\n            r = self.i(False)\n        elif e == 195:\n            r = self.i(True)\n        elif e == 202:\n            r = self.p('>f')\n        elif e == 203:\n            r = self.p('>d')\n        elif e == 204:\n            r = self.p('>B')\n        elif e == 205:\n            r = self.p('>H')\n        elif e == 206:\n            r = self.p('>I')\n        elif e == 207:\n            r = self.p('>Q')\n        elif e == 208:\n            r = self.p('>b')\n        elif e == 209:\n            r = self.p('>h')\n        elif e == 210:\n            r = self.p('>i')\n        elif e == 211:\n            r = self.p('>q')\n        elif e == 217:\n            r = self.o(self.p('>B'), self.de_str)\n        elif e == 218:\n            r = self.o(self.p('>H'), self.de_str)\n        elif e == 219:\n            r = self.o(self.p('>I'), self.de_str)\n        elif e == 220:\n            r = self.o(self.p('>H'), self.de_list)\n        elif e == 221:\n            r = self.o(self.p('>I'), self.de_list)\n        elif e == 222:\n            r = self.o(self.p('>H'), self.de_dict)\n        elif e == 223:\n            r = self.o(self.p('>I'), self.de_dict)\n        elif 224 <= e <= 256:\n            r = self.i(e - 256)\n        return r\n\n    def de_init(self, t):\n        r = int(t[self.offset])\n        self.offset += 1\n        n = self.n(r)\n        return n(t)\n\n    def de_str(self, t, e):\n        s = t[self.offset: self.offset + e].decode('utf-8')\n        self.offset += e\n        return s\n\n    def de_list(self, t, e):\n        l = [''] * e\n        n = self.de_init\n        for i in range(e):\n            l[i] = n(t)\n        return l\n\n    def de_dict(self, t, e):\n        k = [''] * e\n        v = [''] * e\n        f = self.de_init\n        for r in range(e):\n            k[r] = f(t)\n            v[r] = f(t)\n        d = dict(zip(k, v))\n        return d\n\n\nclass CC:\n    s = CC_Init()\n\n    heartbeatInterval = 30\n    heartbeat = s.get_beat()\n\n    @staticmethod\n    async def get_ws_info(url):\n        cid = re.search(r'com/(\\d+)/', url).group(1)\n        url = 'https://api.cc.163.com/v1/activitylives/anchor/lives?anchor_ccid=' + str(cid)\n        async with aiohttp.ClientSession() as session:\n            async with session.get(url) as resp:\n                res = await resp.text()\n                data = json.loads(res).get('data').get(cid)\n                channel_id = data['channel_id']\n                roomId = data['room_id']\n                gametype = data['gametype']\n\n                reg_data = CC.s.get_reg()\n                beat_data = CC.s.get_beat()\n                join_data = CC.s.get_join(channel_id, gametype, roomId)\n        reg_datas = (reg_data, beat_data, join_data)\n        return 'wss://weblink.cc.163.com/', reg_datas\n\n    @staticmethod\n    def decode_msg(e):\n        n, r, p = struct.unpack('<HHI', e[:8])\n        i = 'tcp-{}-{}'.format(n, r)\n        studio = {\n            'tcp-512-32784': 'origin',\n            'tcp-515-32785': 'chat',\n            'tcp-535-32769': 'gamechat'\n        }\n        # 进场协议：tcp-512-32784\n        # 聊天协议：tcp-515-32785\n        # 游戏聊天：tcp-535-32769\n        msgs = []\n        if i in studio.keys():\n            if p:\n                s, = struct.unpack('<I', e[8:12])\n                a = e[12:]\n                if len(a) == s:\n                    o = a\n            else:\n                o = e[8:]\n            o = o if int(o[0]) != 120 else zlib.decompress(o)\n            CC.s.offset = 0\n            msg = CC.s.de_init(o)\n\n            ms_type = studio[i]\n\n            if ms_type == 'origin':\n                ms = msg['data']['msg_list']\n            else:\n                ms = msg['msg']\n\n            for m in ms:\n                if ms_type == 'origin':\n                    name = m['name']\n                    content = '欢迎来到直播间'\n                elif ms_type == 'chat':\n                    name = m[197]\n                    content = m[4]\n                elif ms_type == 'gamechat':\n                    name = json.loads(m[7])['nickname']\n                    content = m[4]\n                msg = {'name': name, 'content': content, 'msg_type': 'danmaku'}\n                msgs.append(msg.copy())\n        else:\n            msgs = [{'name': '', 'content': '', 'msg_type': 'other'}]\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/douyu.py",
    "content": "import re\nimport json\nimport aiohttp\nfrom struct import pack\n\n\nclass Douyu:\n    wss_url = 'wss://danmuproxy.douyu.com:8503/'\n    heartbeat = b'\\x14\\x00\\x00\\x00\\x14\\x00\\x00\\x00\\xb1\\x02\\x00\\x00\\x74\\x79\\x70\\x65\\x40\\x3d\\x6d\\x72\\x6b\\x6c' \\\n                b'\\x2f\\x00 '\n    heartbeatInterval = 60\n\n    @staticmethod\n    async def get_ws_info(url):\n        room_id = url.split('/')[-1]\n        async with aiohttp.ClientSession() as session:\n            async with session.get('https://m.douyu.com/' + str(room_id)) as resp:\n                room_page = await resp.text()\n                room_id = re.findall(r'\"rid\":(\\d{1,8})', room_page)[0]\n        reg_datas = []\n        data = f'type@=loginreq/roomid@={room_id}/'\n        s = pack('i', 9 + len(data)) * 2\n        s += b'\\xb1\\x02\\x00\\x00'  # 689\n        s += data.encode('ascii') + b'\\x00'\n        reg_datas.append(s)\n        data = f'type@=joingroup/rid@={room_id}/gid@=-9999/'\n        s = pack('i', 9 + len(data)) * 2\n        s += b'\\xb1\\x02\\x00\\x00'  # 689\n        s += data.encode('ascii') + b'\\x00'\n        reg_datas.append(s)\n        return Douyu.wss_url, reg_datas\n\n    @staticmethod\n    def decode_msg(data):\n        msgs = []\n        for msg in re.findall(b'(type@=.*?)\\x00', data):\n            try:\n                msg = msg.replace(b'@=', b'\":\"').replace(b'/', b'\",\"')\n                msg = msg.replace(b'@A', b'@').replace(b'@S', b'/')\n                msg = json.loads((b'{\"' + msg[:-2] + b'}').decode('utf8', 'ignore'))\n                msg['name'] = msg.get('nn', '')\n                msg['content'] = msg.get('txt', '')\n                msg['msg_type'] = {'dgb': 'gift', 'chatmsg': 'danmaku',\n                                   'uenter': 'enter'}.get(msg['type'], 'other')\n                msgs.append(msg)\n            except Exception as e:\n                pass\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/egame.py",
    "content": "import aiohttp\nimport struct\nimport json\nimport re\n\n\nclass eGame:\n    heartbeat = b'\\x00\\x00\\x00\\x12\\x00\\x12\\x00\\x01\\x00\\x07\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00'\n    heartbeatInterval = 60\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('/')[-1]\n        page_id = aid = rid\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'\n        }\n        async with aiohttp.ClientSession() as session:\n\n            async with session.get('https://m.egame.qq.com/live?anchorid' + rid, headers=headers) as resp:\n                res = await resp.text()\n                res_ = re.findall(r'\"videoInfo\":(.*),\"h5Url\"', res)[0]\n                str_id = json.loads(res_)['pid']\n                params = {\n                    'param': json.dumps({\"0\":{\"module\":\"pgg.ws_token_go_svr.DefObj\",\"method\":\"get_token\",\"param\":{\"scene_flag\":16,\"subinfo\":{\"page\":{\"scene\":1,\"page_id\":int(page_id),\"str_id\":str(str_id),\"msg_type_list\":[1,2]}},\"version\":1,\"message_seq\":-1,\"dc_param\":{\"params\":{\"info\":{\"aid\":aid}},\"position\":{\"page_id\":\"QG_HEARTBEAT_PAGE_LIVE_ROOM\"},\"refer\":{}},\"other_uid\":0}}})\n                }\n\n            async with session.post('https://share.egame.qq.com/cgi-bin/pgg_async_fcgi', data=params, headers=headers) as resp:\n                res = json.loads(await resp.text())\n                token = res['data']['0']['retBody']['data']['token']\n                # 开始拼接reg_datas\n                reg_datas = []\n                tokenbuf = token.encode('ascii')\n                bodybuf = struct.pack('!Bi', 7, len(tokenbuf)) + tokenbuf\n                headerbuf = struct.pack('!ihhhihh', 18 + len(bodybuf), 18, 1, 1, 0, 0, 0)\n                data = headerbuf + bodybuf\n                reg_datas.append(data)\n                reg_datas.append(eGame.heartbeat)\n\n        return 'wss://barragepush.egame.qq.com/sub', reg_datas\n\n    @staticmethod\n    def decode_msg(data):\n        \"\"\"\n        type: 0、3、9用户发言；7、33礼物信息；29、35欢迎信息；24、31系统提醒；23关注信息\n        \"\"\"\n        msgs = []\n        msg = {}\n        s = MessageDecode(data)\n        body = s.v()['body']\n        if body:\n            bin_datas = body['bin_data']\n            for bin_data in bin_datas:\n                # if bin_data['type'] in (0, 3, 9):\n                if bin_data.get('type', '') in (0, 3, 9):\n                    msg['name'] = bin_data['nick']\n                    msg['content'] = bin_data['content']\n                    msg['msg_type'] = 'danmaku'\n                else:\n                    msg = {'name': '', 'content': '', 'msg_type': 'other'}\n                msgs.append(msg.copy())\n            return msgs\n        else:\n            msg = {'name': '', 'content': '', 'msg_type': 'None'}\n        msgs.append(msg.copy())\n        return msgs\n\n\nclass MessageDecode:\n    \"\"\"\n    数据解包，还原JS中的操作步骤\n    \"\"\"\n\n    def __init__(self, data):\n\n        self.data = data\n\n        self.ie = {\n            'event_id': 0,\n            'msg_type': 1,\n            'bin_data': 2,\n            'params': 3,\n            'start_tm': 4,\n            'data_list': 6,\n            'end_tm': 5,\n            'message_seq': 7,\n        }\n\n        self.ne = {\n            'uid': 0,\n            'msgid': 1,\n            'nick': 2,\n            'content': 3,\n            'tm': 4,\n            'type': 5,\n            'scenes_flag': 6,\n            'ext': 7,\n            'send_scenes': 8\n        }\n\n        self.oe = {\n            'event_id': 0,\n            'event_name': 1,\n            'info': 2,\n            'params': 3,\n            'bin_data': 4\n        }\n\n    def v(self):\n        data = self.data\n        startPosition = 18\n        endPosition, = struct.unpack_from('!i', data, 0)\n        seq, = struct.unpack_from('!i', data, 10)\n        operation, = struct.unpack_from('!h', data, 8)\n\n        if endPosition != len(data):\n            raise Exception('The received packet length is abnormal')\n\n        return {\n            'seq': seq,\n            'operation': operation,\n            'body': self.w(operation, startPosition, endPosition, data)\n        }\n\n    def w(self, operation, startPosition, endPosition, data):\n        if operation == 3:\n            return self.x(startPosition, endPosition, data)\n        else:\n            return None\n\n    def x(self, startPosition, endPosition, data):\n        i, = struct.unpack_from('!i', data, startPosition)\n        n = data[startPosition: endPosition]\n        if len(n) >= (4 + i):\n            o = n[4:(4 + i)]\n            a = self.S(o)\n            y = self.ye(a)\n            return y\n        else:\n            return None\n\n    def ye(self, e):\n        return self.T({\n            'resultObj': e,\n            'template': self.ie,\n            'afterChange': 1,\n\n        })\n\n    def afterChange(self, e, t, i, n, o):\n        if t == 'bin_data':\n            v = []\n            ve = {}\n            for m in n:\n                a = self.S(e, m['ext'])\n                b = o['msg_type']\n                if b == 1:\n                    ve = self.T({\n                        'resultObj': a,\n                        'template': self.ne\n                    })\n                elif b == 2:\n                    ve = self.T({\n                        'resultObj': a,\n                        'template': self.oe\n                    })\n                v.append(ve.copy())\n            return v\n        else:\n            return n\n\n    def T(self, e):\n        i = e['resultObj']\n        n = e['template']\n        o = e.get('beforeChange', '')\n        r = e.get('afterChange', '')\n        a = {}\n        for s in n.keys():\n            for t in i[0]:\n                if t['tag'] == n[s]:\n                    q = t\n                    p = q['value']\n                    c = q['ext']\n                    if r:\n                        a[s] = self.afterChange(i[1], s, c, p, a)\n                    else:\n                        a[s] = p\n                    break\n        return a\n\n    def S(self, e, t=0):\n        if t == '':\n            t = 0\n        i = []\n        n = len(e)\n        while t < n:\n            o = self.m(e, t)\n            dict_ = {\n                'value': o['value'],\n                'lastPosition': o['position'],\n                'ext': o['ext'],\n                'tag': o['tag']\n            }\n            i.append(dict_.copy())\n            t = o['position']\n        return i, e\n\n    def m(self, e, t):\n        value = position = ext = ''\n        i = e\n        a, = struct.unpack_from('!B', i, t)\n        tag = (240 & a) >> 4\n        type = 15 & a\n        s_position = t + 1\n\n        if type == 0:\n            value, position = self.f0(i, s_position)\n        elif type == 1:\n            value, position = self.f1(i, s_position)\n        elif type == 2:\n            value, position = self.f2(i, s_position)\n        elif type == 3:\n            value, position = self.f3(i, s_position)\n        elif type == 6:\n            value, position, ext = self.f6(i, s_position)\n        elif type == 7:\n            value, position, ext = self.f7(i, s_position)\n        elif type == 8:\n            value, position = self.f8(i, s_position)\n        elif type == 9:\n            value, position = self.f9(i, s_position)\n        elif type == 12:\n            value, position = self.f12(i, s_position)\n        elif type == 13:\n            value, position = self.f13(i, s_position)\n\n        i = ''\n\n        return {\n            'i': i,\n            'tag': tag,\n            'type': type,\n            'value': value,\n            'position': position,\n            'ext': ext\n        }\n\n    def f0(self, e, t):\n        o = 1\n        try:\n            n, = struct.unpack_from('!B', e, t)\n        except:\n            n = ''\n        return n, t + o\n\n    def f1(self, e, t):\n        o = 2\n        try:\n            n, = struct.unpack_from('!H', e, t)\n        except:\n            n = ''\n        return n, t + o\n\n    def f2(self, e, t):\n        o = 4\n        try:\n            n, = struct.unpack_from('!I', e, t)\n        except:\n            n = ''\n        return n, t + o\n\n    def f3(self, e, t):\n        e = struct.unpack('!8B', e[t:t + 8])\n        i = (e[0] << 24) + (e[1] << 16) + (e[2] << 8) + e[3]\n        o = (e[4] << 24) + (e[5] << 16) + (e[6] << 8) + e[7]\n        value = (i << 32) + o\n        position = t + 8\n        return value, position\n\n    def f4(self, e, t):\n        o = 4\n        try:\n            n, = struct.unpack_from('!f', e, t)\n        except:\n            n = ''\n        return n, t + o\n\n    def f5(self, e, t):\n        o = 8\n        try:\n            n, = struct.unpack_from('!d', e, t)\n        except:\n            n = ''\n        return n, t + o\n\n    def f6(self, e, t):\n        n, = struct.unpack_from('!B', e, t)\n        r = t + 1\n        s = r + n\n        value = (e[r:s]).decode('utf8', errors='ignore')\n        return value, s, r\n\n    def f7(self, e, t):\n        n, = struct.unpack_from('!I', e, t)\n        r = t + 4\n        s = r + n\n        value = (e[r:s]).decode('utf8', errors='ignore')\n        return value, s, r\n\n    def f8(self, e, t):\n        i = {}\n        b = self.m(e, t)\n        o = b['value']\n        r = b['position']\n        while o > 0:\n            a = self.m(e, r)\n            s = self.m(e, a['position'])\n            if a['tag'] == 0 and s['tag'] == 1:\n                i[a['value']] = s['value']\n            r = s['position']\n            o -= 1\n        return i, r\n\n    def f9(self, e, t):\n        i = self.m(e, t)\n        n = i['value']\n        o = i['position']\n        r = []\n        while n > 0:\n            a = self.m(e, o)\n            r.append(a.copy())\n            o = a['position']\n            n -= 1\n        return r, o\n\n    def f10(self, e, t):\n        i = []\n        while True:\n            n = self.m(e, t)\n            t = n['position']\n            if n['type'] == 11:\n                return i, t\n            i.append(n['value'].copy())\n\n    def f11(self, e, t):\n        return '', t\n\n    def f12(self, e, t):\n        return 0, t\n\n    def f13(self, e, t):\n        i = self.m(e, t)\n        return e[(t + i['position']):i['value']], t + i['position'] + i['value']\n"
  },
  {
    "path": "danmu/danmaku/huajiao.proto",
    "content": "syntax = \"proto2\";\npackage HuaJiaoPack;\n\nmessage Message {\n    required uint32 msgid = 1;\n    required uint64 sn = 2;\n    optional string sender = 3;\n    optional string receiver = 4;\n    optional string receiver_type = 5;\n    optional Request req = 6;\n    optional Response resp = 7;\n    optional Notify notify = 8;\n    optional string sender_type = 12;\n\n    message Request {\n        optional LoginReq login = 2;\n        optional InitLoginReq init_login_req = 9;\n        optional Service_Req service_req = 11;\n\n        message LoginReq {\n            required string mobile_type = 1;\n            required uint32 net_type = 2;\n            required string server_ram = 3;\n            optional bytes secret_ram = 4;\n            optional uint32 app_id = 5[default  = 2000];\n            optional string platform = 8;\n            optional string verf_code = 9;\n            optional bool not_encrypt = 10;\n        }\n\n        message InitLoginReq {\n            required string client_ram = 1;\n            optional string sig = 2;\n        }\n\n        message Service_Req {\n            required uint32 service_id = 1;\n            required bytes request = 2;\n        }\n    }\n\n    message Response {\n        optional LoginResp login = 3;\n\t\toptional ChatResp chat = 4;\n        optional InitLoginResp init_login_resp = 10;\n\t\toptional Service_Resp service_resp = 12;\n\n        message LoginResp {\n            required uint32 timestamp = 1;\n            required string session_id = 2;\n            required string session_key = 3;\n            optional string client_login_ip = 4;\n            optional string serverip = 5;\n        }\n\n        message InitLoginResp {\n            required string client_ram = 1;\n            required string server_ram = 2;\n        }\n\t\t\n\t\tmessage Service_Resp {\n\t\t\trequired uint32 service_id = 1;\n            required bytes response = 2;\n\t\t}\n\t\t\n\t\tmessage ChatResp {\n\t\t\trequired uint32 result = 1;\n\t\t\toptional uint32 body_id = 2;\n\t\t}\n    }\n\t\n\tmessage Notify {\n\t\toptional NewMessageNotify newinfo_ntf = 1;\n\t\t\n\t\tmessage NewMessageNotify {\n\t\t\trequired string info_type = 1;\n\t\t\toptional bytes info_content = 2;\n\t\t\toptional int64 info_id = 3;\n\t\t\toptional uint32 query_after_seconds = 4;\n\t\t}\n\t\t\n\t}\n\t\n}\n\nmessage ChatRoomPacket {\n    required bytes roomid = 1;\n    optional ChatRoomUpToServer to_server_data = 2;\n    optional ChatRoomDownToUser to_user_data = 3;\n    optional string uuid = 4;\n    optional uint64 client_sn = 5;\n    optional uint32 appid = 6;\n\n    message ChatRoomUpToServer {\n        required uint32 payloadtype = 1;\n        optional ApplyJoinChatRoomRequest applyjoinchatroomreq = 4;\n\n        message ApplyJoinChatRoomRequest {\n            required bytes roomid = 1;\n            optional ChatRoom room = 2;\n            optional int32 userid_type = 3;\n        }\n    }\n\n    message ChatRoomDownToUser {\n        required int32 result = 1;\n        required uint32 payloadtype = 2;\n        optional CreateChatRoomResponse createchatroomresp = 3;\n        optional ApplyJoinChatRoomResponse applyjoinchatroomresp = 5;\n        optional QuitChatRoomResponse quitchatroomresp = 6;\n        optional ChatRoomNewMsg newmsgnotify = 13;\n        optional MemberJoinChatRoomNotify memberjoinnotify = 16;\n        optional MemberQuitChatRoomNotify memberquitnotify = 17;\n        repeated ChatRoomMNotify multinotify = 200;\n\t\t\n\t\t\n\t\tmessage CreateChatRoomResponse {\n\t\t\toptional ChatRoom room = 1;\n\t\t}\n\t\t\n\t\tmessage ApplyJoinChatRoomResponse {\n\t\t\toptional ChatRoom room = 1;\n\t\t}\n\t\t\n\t\tmessage QuitChatRoomResponse {\n\t\t\toptional ChatRoom room = 1;\n\t\t}\n\t\t\n\t\tmessage ChatRoomNewMsg {\n\t\t\trequired bytes roomid = 1;\n\t\t\toptional CRUser sender = 2;\n\t\t\toptional int32 msgtype = 3;\n\t\t\toptional bytes msgcontent = 4;\n\t\t\toptional int32 regmemcount = 5;\n\t\t\toptional int32 memcount = 6;\n\t\t\toptional uint32 msgid = 7;\n\t\t\toptional uint32 maxid = 8;\n\t\t\toptional uint64 timestamp = 9;\n\t\t}\n\t\t\n\t\tmessage MemberJoinChatRoomNotify {\n\t\t\trequired ChatRoom room = 1;\n\t\t}\n\t\t\n\t\tmessage MemberQuitChatRoomNotify {\n\t\t\trequired ChatRoom room = 1;\n\t\t}\n\t\t\n\t\tmessage ChatRoomMNotify {\n\t\t\trequired int32 type = 1;\n\t\t\trequired bytes data = 2;\n\t\t\toptional int32 regmemcount = 3;\n\t\t\toptional int32 memcount = 4;\n\t\t}\n    }\n}\n\nmessage ChatRoom {\n\trequired bytes roomid = 1;\n\trepeated CRPair properties = 8;\n\trepeated CRUser members = 9;\n\toptional bytes partnerdata = 13;\n}\n\nmessage CRUser {\n\toptional bytes userid = 1;\n\toptional string name = 2;\n\toptional bytes userdata = 6;\n}\n\nmessage CRPair {\n\trequired string key = 1;\n\toptional bytes value = 2;\n}"
  },
  {
    "path": "danmu/danmaku/huajiao.py",
    "content": "from . import huajiao_pb2 as pb\nimport struct\nimport hashlib\nimport random\nimport string\nimport json\nimport time\n\n\nclass HuaJiao:\n\n    heartbeat = b'\\x00\\x00\\x00\\x00'\n    ws_url = 'wss://bridge.huajiao.com'\n\n    def __init__(self, rid=None):\n        self.sn = ''\n        self.tt = str(int(time.time() * 1000))\n        self.roomId = rid\n        self.flag = 'qh'\n        self.protocolVersion = 1\n        self.clientVersion = 101\n        self.appId = 2080\n        self.sender = self.password = '999' + self.tt + self.random_(6, 'n')\n        self.defaultKey = '3f190210cb1cf32a2378ee57900acf78'\n\n    def init_p(self):\n        p = pb.Message()\n        p.sn = int(self.random_(10, 'n'))\n        p.sender = self.sender\n        p.sender_type = 'jid'\n        return p\n\n    @staticmethod\n    def random_(num, var):\n        seq = ''\n        if var == 's':\n            seq = string.ascii_letters + string.digits\n        if var == 'n':\n            seq = string.digits\n        result = ''.join([random.choice(seq) for i in range(num)])\n        return result\n\n    @staticmethod\n    def md5(data):\n        return hashlib.md5(data.encode('utf-8')).hexdigest()\n\n    @staticmethod\n    def rc4(data, key):\n        a = [i for i in range(256)]\n        l = i = 0\n        while i < 256:\n            l = (l + a[i] + ord(key[i % len(key)])) % 256\n            a[i], a[l] = a[l], a[i]\n            i += 1\n        i = l = n = 0\n        s = len(data)\n        f = []\n        while n < s:\n            i = (i + 1) % 256\n            l = (l + a[i]) % 256\n            a[i], a[l] = a[l], a[i]\n            f.append(data[n] ^ a[(a[i] + a[l]) % 256])\n            n += 1\n        return bytes(f)\n\n    def sendHandshakePack(self):\n        HandshakePack = struct.pack('!2sbbhih', self.flag.encode(), self.protocolVersion << 4, self.clientVersion,\n                                    self.appId, 0, 0)\n        p = self.init_p()\n        self.sn = p.sn\n        p.msgid = 100009\n        p.req.init_login_req.client_ram = self.random_(10, 's')\n        p.req.init_login_req.sig = ''\n        data = p.SerializeToString()\n        a = self.rc4(data, self.defaultKey)\n        HandshakePack += struct.pack('!i', len(HandshakePack + a) + 4) + a\n        return HandshakePack\n\n    def processHandShakePack(self, message):\n        o, = struct.unpack('!2s', message[:2])\n        if o.decode() != self.flag:\n            raise Exception('processHandShakePack 服务器响应标识（flag）有误')\n        s = self.rc4(message[6:], self.defaultKey)\n        p = self.init_p()\n        try:\n            p.ParseFromString(s)\n        except:\n            raise Exception('processHandShakePack 解析消息体异常')\n        if p.msgid != 200009:\n            raise Exception('processHandShakePack 响应msgid异常')\n        if p.sn != self.sn:\n            raise Exception('processHandShakePack sn验证失败')\n        return p.resp\n\n    def sendLoginPack(self, message):\n        e = self.processHandShakePack(message)\n        u = e.init_login_resp.server_ram\n        secret_ram = self.rc4((u + self.random_(8, 's')).encode(), self.password)\n        verf_code = self.md5(self.sender + '360tantan@1408$')[24:]\n\n        p = self.init_p()\n        self.sn = p.sn\n        p.msgid = 100001\n\n        p.req.login.app_id = 2080\n        p.req.login.mobile_type = 'ios'\n        p.req.login.net_type = 4\n        p.req.login.not_encrypt = True\n        p.req.login.platform = 'h5'\n        p.req.login.server_ram = u\n        p.req.login.secret_ram = secret_ram\n        p.req.login.verf_code = verf_code\n\n        a = p.SerializeToString()\n        l = self.rc4(a, self.defaultKey)\n        LoginPack = struct.pack('!i', 4 + len(l)) + l\n        return LoginPack\n\n    def processLoginPack(self, message):\n        p = self.init_p()\n        try:\n            p.ParseFromString(self.rc4(message[4:], self.password))\n        except:\n            try:\n                p.ParseFromString(self.rc4(message[4:], self.defaultKey))\n            except:\n                raise Exception('processLoginPack 解析消息体异常')\n        if p.msgid != 200001:\n            raise Exception('processLoginPack 响应msgid异常')\n        if p.sn != self.sn:\n            raise Exception('processLoginPack sn验证失败')\n\n        return p\n\n    def sendJoinChatroomPack(self, message):\n        p = self.processLoginPack(message)\n        o = self.roomId.encode()\n        # crm : ChatroomRequestMessage\n        crm = pb.ChatRoomPacket()\n        crm.client_sn = p.sn\n        crm.roomid = o\n        crm.appid = self.appId\n        crm.uuid = self.md5(self.random_(10, 's') + '0000000001' + str(int(time.time() * 1000)))\n        crm.to_server_data.payloadtype = 102\n        crm.to_server_data.applyjoinchatroomreq.roomid = o\n        crm.to_server_data.applyjoinchatroomreq.room.roomid = o\n        crm.to_server_data.applyjoinchatroomreq.userid_type = 0\n\n        p = self.init_p()\n        self.sn = p.sn\n        p.msgid = 100011\n        p.req.service_req.service_id = 10000006\n        p.req.service_req.request = crm.SerializeToString()\n\n        u = p.SerializeToString()\n        JoinChatroomPack = struct.pack('!i', 4 + len(u)) + u\n\n        return JoinChatroomPack\n\n    def processMessagePack(self, message):\n        i, = struct.unpack_from('!i', message, 0)\n        if len(message) == 4 and i == 0:  # HeartbeatPack\n            return None\n\n        p = self.init_p()\n        p.ParseFromString(message[4:])\n        o = p.msgid\n\n        if o == 200011:\n            return self.processService_RespMessage(p)\n        elif o == 300000:\n            return self.processNewMessageNotifyMessage(p)\n        else:\n            return None\n\n    def processService_RespMessage(self, p):\n        if p.sn != self.sn:\n            raise Exception('processService_RespMessage sn验证失败')\n        crp = pb.ChatRoomPacket()\n        crp.ParseFromString(p.resp.service_resp.response)\n        n = crp.to_user_data\n        r = i = ''\n        if n.payloadtype == 102 or n.applyjoinchatroomresp:\n            if n.result == 0:\n                r = n.applyjoinchatroomresp.room.properties[1].value\n                i = n.applyjoinchatroomresp.room.partnerdata\n                r = r.decode('utf-8')\n                i = i.decode('utf-8')\n        return r, i\n\n    def processNewMessageNotifyMessage(self, p):\n        crp = pb.ChatRoomPacket()\n        crp.ParseFromString(p.notify.newinfo_ntf.info_content)\n        r = crp.to_user_data\n        s = i = ''\n        if r.result == 0:\n            if r.payloadtype == 1000 and r.newmsgnotify:\n                s = r.newmsgnotify.memcount\n                i = r.newmsgnotify.msgcontent\n            elif r.payloadtype == 1001 and r.memberjoinnotify:\n                s = r.memberjoinnotify.room.properties[1].value\n                i = r.memberjoinnotify.room.members[0].userdata\n            elif r.payloadtype == 1002 and r.memberquitnotify:\n                s = r.memberquitnotify.room.properties[0].value\n                i = r.memberquitnotify.room.members[0].userdata\n            i = i.decode('utf-8')\n            i = json.loads(i)\n        return s, i\n\n    def decode_msg(self, message):\n        msgs = []\n        memcountmsg, msgcontent = self.processMessagePack(message)\n        if msgcontent.get('type') == 9:\n            name = msgcontent['extends']['nickname']\n            content = msgcontent['text']\n            msg = {'name': name, 'content': content, 'msg_type': 'danmaku'}\n            msgs.append(msg)\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/huajiao_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# source: huajiao.proto\n\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom google.protobuf import reflection as _reflection\nfrom google.protobuf import symbol_database as _symbol_database\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor.FileDescriptor(\n  name='huajiao.proto',\n  package='HuaJiaoPack',\n  syntax='proto2',\n  serialized_options=None,\n  create_key=_descriptor._internal_create_key,\n  serialized_pb=b'\\n\\rhuajiao.proto\\x12\\x0bHuaJiaoPack\\\"\\x98\\x0b\\n\\x07Message\\x12\\r\\n\\x05msgid\\x18\\x01 \\x02(\\r\\x12\\n\\n\\x02sn\\x18\\x02 \\x02(\\x04\\x12\\x0e\\n\\x06sender\\x18\\x03 \\x01(\\t\\x12\\x10\\n\\x08receiver\\x18\\x04 \\x01(\\t\\x12\\x15\\n\\rreceiver_type\\x18\\x05 \\x01(\\t\\x12)\\n\\x03req\\x18\\x06 \\x01(\\x0b\\x32\\x1c.HuaJiaoPack.Message.Request\\x12+\\n\\x04resp\\x18\\x07 \\x01(\\x0b\\x32\\x1d.HuaJiaoPack.Message.Response\\x12+\\n\\x06notify\\x18\\x08 \\x01(\\x0b\\x32\\x1b.HuaJiaoPack.Message.Notify\\x12\\x13\\n\\x0bsender_type\\x18\\x0c \\x01(\\t\\x1a\\xd2\\x03\\n\\x07Request\\x12\\x34\\n\\x05login\\x18\\x02 \\x01(\\x0b\\x32%.HuaJiaoPack.Message.Request.LoginReq\\x12\\x41\\n\\x0einit_login_req\\x18\\t \\x01(\\x0b\\x32).HuaJiaoPack.Message.Request.InitLoginReq\\x12=\\n\\x0bservice_req\\x18\\x0b \\x01(\\x0b\\x32(.HuaJiaoPack.Message.Request.Service_Req\\x1a\\xa9\\x01\\n\\x08LoginReq\\x12\\x13\\n\\x0bmobile_type\\x18\\x01 \\x02(\\t\\x12\\x10\\n\\x08net_type\\x18\\x02 \\x02(\\r\\x12\\x12\\n\\nserver_ram\\x18\\x03 \\x02(\\t\\x12\\x12\\n\\nsecret_ram\\x18\\x04 \\x01(\\x0c\\x12\\x14\\n\\x06\\x61pp_id\\x18\\x05 \\x01(\\r:\\x04\\x32\\x30\\x30\\x30\\x12\\x10\\n\\x08platform\\x18\\x08 \\x01(\\t\\x12\\x11\\n\\tverf_code\\x18\\t \\x01(\\t\\x12\\x13\\n\\x0bnot_encrypt\\x18\\n \\x01(\\x08\\x1a/\\n\\x0cInitLoginReq\\x12\\x12\\n\\nclient_ram\\x18\\x01 \\x02(\\t\\x12\\x0b\\n\\x03sig\\x18\\x02 \\x01(\\t\\x1a\\x32\\n\\x0bService_Req\\x12\\x12\\n\\nservice_id\\x18\\x01 \\x02(\\r\\x12\\x0f\\n\\x07request\\x18\\x02 \\x02(\\x0c\\x1a\\x90\\x04\\n\\x08Response\\x12\\x36\\n\\x05login\\x18\\x03 \\x01(\\x0b\\x32\\'.HuaJiaoPack.Message.Response.LoginResp\\x12\\x34\\n\\x04\\x63hat\\x18\\x04 \\x01(\\x0b\\x32&.HuaJiaoPack.Message.Response.ChatResp\\x12\\x44\\n\\x0finit_login_resp\\x18\\n \\x01(\\x0b\\x32+.HuaJiaoPack.Message.Response.InitLoginResp\\x12@\\n\\x0cservice_resp\\x18\\x0c \\x01(\\x0b\\x32*.HuaJiaoPack.Message.Response.Service_Resp\\x1ar\\n\\tLoginResp\\x12\\x11\\n\\ttimestamp\\x18\\x01 \\x02(\\r\\x12\\x12\\n\\nsession_id\\x18\\x02 \\x02(\\t\\x12\\x13\\n\\x0bsession_key\\x18\\x03 \\x02(\\t\\x12\\x17\\n\\x0f\\x63lient_login_ip\\x18\\x04 \\x01(\\t\\x12\\x10\\n\\x08serverip\\x18\\x05 \\x01(\\t\\x1a\\x37\\n\\rInitLoginResp\\x12\\x12\\n\\nclient_ram\\x18\\x01 \\x02(\\t\\x12\\x12\\n\\nserver_ram\\x18\\x02 \\x02(\\t\\x1a\\x34\\n\\x0cService_Resp\\x12\\x12\\n\\nservice_id\\x18\\x01 \\x02(\\r\\x12\\x10\\n\\x08response\\x18\\x02 \\x02(\\x0c\\x1a+\\n\\x08\\x43hatResp\\x12\\x0e\\n\\x06result\\x18\\x01 \\x02(\\r\\x12\\x0f\\n\\x07\\x62ody_id\\x18\\x02 \\x01(\\r\\x1a\\xb6\\x01\\n\\x06Notify\\x12\\x41\\n\\x0bnewinfo_ntf\\x18\\x01 \\x01(\\x0b\\x32,.HuaJiaoPack.Message.Notify.NewMessageNotify\\x1ai\\n\\x10NewMessageNotify\\x12\\x11\\n\\tinfo_type\\x18\\x01 \\x02(\\t\\x12\\x14\\n\\x0cinfo_content\\x18\\x02 \\x01(\\x0c\\x12\\x0f\\n\\x07info_id\\x18\\x03 \\x01(\\x03\\x12\\x1b\\n\\x13query_after_seconds\\x18\\x04 \\x01(\\r\\\"\\x8a\\x0e\\n\\x0e\\x43hatRoomPacket\\x12\\x0e\\n\\x06roomid\\x18\\x01 \\x02(\\x0c\\x12\\x46\\n\\x0eto_server_data\\x18\\x02 \\x01(\\x0b\\x32..HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer\\x12\\x44\\n\\x0cto_user_data\\x18\\x03 \\x01(\\x0b\\x32..HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser\\x12\\x0c\\n\\x04uuid\\x18\\x04 \\x01(\\t\\x12\\x11\\n\\tclient_sn\\x18\\x05 \\x01(\\x04\\x12\\r\\n\\x05\\x61ppid\\x18\\x06 \\x01(\\r\\x1a\\xf6\\x01\\n\\x12\\x43hatRoomUpToServer\\x12\\x13\\n\\x0bpayloadtype\\x18\\x01 \\x02(\\r\\x12\\x65\\n\\x14\\x61pplyjoinchatroomreq\\x18\\x04 \\x01(\\x0b\\x32G.HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest\\x1a\\x64\\n\\x18\\x41pplyJoinChatRoomRequest\\x12\\x0e\\n\\x06roomid\\x18\\x01 \\x02(\\x0c\\x12#\\n\\x04room\\x18\\x02 \\x01(\\x0b\\x32\\x15.HuaJiaoPack.ChatRoom\\x12\\x13\\n\\x0buserid_type\\x18\\x03 \\x01(\\x05\\x1a\\xb0\\n\\n\\x12\\x43hatRoomDownToUser\\x12\\x0e\\n\\x06result\\x18\\x01 \\x02(\\x05\\x12\\x13\\n\\x0bpayloadtype\\x18\\x02 \\x02(\\r\\x12\\x61\\n\\x12\\x63reatechatroomresp\\x18\\x03 \\x01(\\x0b\\x32\\x45.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse\\x12g\\n\\x15\\x61pplyjoinchatroomresp\\x18\\x05 \\x01(\\x0b\\x32H.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse\\x12]\\n\\x10quitchatroomresp\\x18\\x06 \\x01(\\x0b\\x32\\x43.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse\\x12S\\n\\x0cnewmsgnotify\\x18\\r \\x01(\\x0b\\x32=.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg\\x12\\x61\\n\\x10memberjoinnotify\\x18\\x10 \\x01(\\x0b\\x32G.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify\\x12\\x61\\n\\x10memberquitnotify\\x18\\x11 \\x01(\\x0b\\x32G.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify\\x12T\\n\\x0bmultinotify\\x18\\xc8\\x01 \\x03(\\x0b\\x32>.HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify\\x1a=\\n\\x16\\x43reateChatRoomResponse\\x12#\\n\\x04room\\x18\\x01 \\x01(\\x0b\\x32\\x15.HuaJiaoPack.ChatRoom\\x1a@\\n\\x19\\x41pplyJoinChatRoomResponse\\x12#\\n\\x04room\\x18\\x01 \\x01(\\x0b\\x32\\x15.HuaJiaoPack.ChatRoom\\x1a;\\n\\x14QuitChatRoomResponse\\x12#\\n\\x04room\\x18\\x01 \\x01(\\x0b\\x32\\x15.HuaJiaoPack.ChatRoom\\x1a\\xc2\\x01\\n\\x0e\\x43hatRoomNewMsg\\x12\\x0e\\n\\x06roomid\\x18\\x01 \\x02(\\x0c\\x12#\\n\\x06sender\\x18\\x02 \\x01(\\x0b\\x32\\x13.HuaJiaoPack.CRUser\\x12\\x0f\\n\\x07msgtype\\x18\\x03 \\x01(\\x05\\x12\\x12\\n\\nmsgcontent\\x18\\x04 \\x01(\\x0c\\x12\\x13\\n\\x0bregmemcount\\x18\\x05 \\x01(\\x05\\x12\\x10\\n\\x08memcount\\x18\\x06 \\x01(\\x05\\x12\\r\\n\\x05msgid\\x18\\x07 \\x01(\\r\\x12\\r\\n\\x05maxid\\x18\\x08 \\x01(\\r\\x12\\x11\\n\\ttimestamp\\x18\\t \\x01(\\x04\\x1a?\\n\\x18MemberJoinChatRoomNotify\\x12#\\n\\x04room\\x18\\x01 \\x02(\\x0b\\x32\\x15.HuaJiaoPack.ChatRoom\\x1a?\\n\\x18MemberQuitChatRoomNotify\\x12#\\n\\x04room\\x18\\x01 \\x02(\\x0b\\x32\\x15.HuaJiaoPack.ChatRoom\\x1aT\\n\\x0f\\x43hatRoomMNotify\\x12\\x0c\\n\\x04type\\x18\\x01 \\x02(\\x05\\x12\\x0c\\n\\x04\\x64\\x61ta\\x18\\x02 \\x02(\\x0c\\x12\\x13\\n\\x0bregmemcount\\x18\\x03 \\x01(\\x05\\x12\\x10\\n\\x08memcount\\x18\\x04 \\x01(\\x05\\\"~\\n\\x08\\x43hatRoom\\x12\\x0e\\n\\x06roomid\\x18\\x01 \\x02(\\x0c\\x12\\'\\n\\nproperties\\x18\\x08 \\x03(\\x0b\\x32\\x13.HuaJiaoPack.CRPair\\x12$\\n\\x07members\\x18\\t \\x03(\\x0b\\x32\\x13.HuaJiaoPack.CRUser\\x12\\x13\\n\\x0bpartnerdata\\x18\\r \\x01(\\x0c\\\"8\\n\\x06\\x43RUser\\x12\\x0e\\n\\x06userid\\x18\\x01 \\x01(\\x0c\\x12\\x0c\\n\\x04name\\x18\\x02 \\x01(\\t\\x12\\x10\\n\\x08userdata\\x18\\x06 \\x01(\\x0c\\\"$\\n\\x06\\x43RPair\\x12\\x0b\\n\\x03key\\x18\\x01 \\x02(\\t\\x12\\r\\n\\x05value\\x18\\x02 \\x01(\\x0c'\n)\n\n\n\n\n_MESSAGE_REQUEST_LOGINREQ = _descriptor.Descriptor(\n  name='LoginReq',\n  full_name='HuaJiaoPack.Message.Request.LoginReq',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='mobile_type', full_name='HuaJiaoPack.Message.Request.LoginReq.mobile_type', index=0,\n      number=1, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='net_type', full_name='HuaJiaoPack.Message.Request.LoginReq.net_type', index=1,\n      number=2, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='server_ram', full_name='HuaJiaoPack.Message.Request.LoginReq.server_ram', index=2,\n      number=3, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='secret_ram', full_name='HuaJiaoPack.Message.Request.LoginReq.secret_ram', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='app_id', full_name='HuaJiaoPack.Message.Request.LoginReq.app_id', index=4,\n      number=5, type=13, cpp_type=3, label=1,\n      has_default_value=True, default_value=2000,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='platform', full_name='HuaJiaoPack.Message.Request.LoginReq.platform', index=5,\n      number=8, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='verf_code', full_name='HuaJiaoPack.Message.Request.LoginReq.verf_code', index=6,\n      number=9, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='not_encrypt', full_name='HuaJiaoPack.Message.Request.LoginReq.not_encrypt', index=7,\n      number=10, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=477,\n  serialized_end=646,\n)\n\n_MESSAGE_REQUEST_INITLOGINREQ = _descriptor.Descriptor(\n  name='InitLoginReq',\n  full_name='HuaJiaoPack.Message.Request.InitLoginReq',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='client_ram', full_name='HuaJiaoPack.Message.Request.InitLoginReq.client_ram', index=0,\n      number=1, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sig', full_name='HuaJiaoPack.Message.Request.InitLoginReq.sig', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=648,\n  serialized_end=695,\n)\n\n_MESSAGE_REQUEST_SERVICE_REQ = _descriptor.Descriptor(\n  name='Service_Req',\n  full_name='HuaJiaoPack.Message.Request.Service_Req',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='service_id', full_name='HuaJiaoPack.Message.Request.Service_Req.service_id', index=0,\n      number=1, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='request', full_name='HuaJiaoPack.Message.Request.Service_Req.request', index=1,\n      number=2, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=697,\n  serialized_end=747,\n)\n\n_MESSAGE_REQUEST = _descriptor.Descriptor(\n  name='Request',\n  full_name='HuaJiaoPack.Message.Request',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='login', full_name='HuaJiaoPack.Message.Request.login', index=0,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='init_login_req', full_name='HuaJiaoPack.Message.Request.init_login_req', index=1,\n      number=9, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='service_req', full_name='HuaJiaoPack.Message.Request.service_req', index=2,\n      number=11, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_MESSAGE_REQUEST_LOGINREQ, _MESSAGE_REQUEST_INITLOGINREQ, _MESSAGE_REQUEST_SERVICE_REQ, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=281,\n  serialized_end=747,\n)\n\n_MESSAGE_RESPONSE_LOGINRESP = _descriptor.Descriptor(\n  name='LoginResp',\n  full_name='HuaJiaoPack.Message.Response.LoginResp',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='timestamp', full_name='HuaJiaoPack.Message.Response.LoginResp.timestamp', index=0,\n      number=1, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='session_id', full_name='HuaJiaoPack.Message.Response.LoginResp.session_id', index=1,\n      number=2, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='session_key', full_name='HuaJiaoPack.Message.Response.LoginResp.session_key', index=2,\n      number=3, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='client_login_ip', full_name='HuaJiaoPack.Message.Response.LoginResp.client_login_ip', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='serverip', full_name='HuaJiaoPack.Message.Response.LoginResp.serverip', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1008,\n  serialized_end=1122,\n)\n\n_MESSAGE_RESPONSE_INITLOGINRESP = _descriptor.Descriptor(\n  name='InitLoginResp',\n  full_name='HuaJiaoPack.Message.Response.InitLoginResp',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='client_ram', full_name='HuaJiaoPack.Message.Response.InitLoginResp.client_ram', index=0,\n      number=1, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='server_ram', full_name='HuaJiaoPack.Message.Response.InitLoginResp.server_ram', index=1,\n      number=2, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1124,\n  serialized_end=1179,\n)\n\n_MESSAGE_RESPONSE_SERVICE_RESP = _descriptor.Descriptor(\n  name='Service_Resp',\n  full_name='HuaJiaoPack.Message.Response.Service_Resp',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='service_id', full_name='HuaJiaoPack.Message.Response.Service_Resp.service_id', index=0,\n      number=1, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='response', full_name='HuaJiaoPack.Message.Response.Service_Resp.response', index=1,\n      number=2, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1181,\n  serialized_end=1233,\n)\n\n_MESSAGE_RESPONSE_CHATRESP = _descriptor.Descriptor(\n  name='ChatResp',\n  full_name='HuaJiaoPack.Message.Response.ChatResp',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='result', full_name='HuaJiaoPack.Message.Response.ChatResp.result', index=0,\n      number=1, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='body_id', full_name='HuaJiaoPack.Message.Response.ChatResp.body_id', index=1,\n      number=2, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1235,\n  serialized_end=1278,\n)\n\n_MESSAGE_RESPONSE = _descriptor.Descriptor(\n  name='Response',\n  full_name='HuaJiaoPack.Message.Response',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='login', full_name='HuaJiaoPack.Message.Response.login', index=0,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='chat', full_name='HuaJiaoPack.Message.Response.chat', index=1,\n      number=4, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='init_login_resp', full_name='HuaJiaoPack.Message.Response.init_login_resp', index=2,\n      number=10, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='service_resp', full_name='HuaJiaoPack.Message.Response.service_resp', index=3,\n      number=12, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_MESSAGE_RESPONSE_LOGINRESP, _MESSAGE_RESPONSE_INITLOGINRESP, _MESSAGE_RESPONSE_SERVICE_RESP, _MESSAGE_RESPONSE_CHATRESP, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=750,\n  serialized_end=1278,\n)\n\n_MESSAGE_NOTIFY_NEWMESSAGENOTIFY = _descriptor.Descriptor(\n  name='NewMessageNotify',\n  full_name='HuaJiaoPack.Message.Notify.NewMessageNotify',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='info_type', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.info_type', index=0,\n      number=1, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='info_content', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.info_content', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='info_id', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.info_id', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='query_after_seconds', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.query_after_seconds', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1358,\n  serialized_end=1463,\n)\n\n_MESSAGE_NOTIFY = _descriptor.Descriptor(\n  name='Notify',\n  full_name='HuaJiaoPack.Message.Notify',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='newinfo_ntf', full_name='HuaJiaoPack.Message.Notify.newinfo_ntf', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_MESSAGE_NOTIFY_NEWMESSAGENOTIFY, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1281,\n  serialized_end=1463,\n)\n\n_MESSAGE = _descriptor.Descriptor(\n  name='Message',\n  full_name='HuaJiaoPack.Message',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='msgid', full_name='HuaJiaoPack.Message.msgid', index=0,\n      number=1, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sn', full_name='HuaJiaoPack.Message.sn', index=1,\n      number=2, type=4, cpp_type=4, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sender', full_name='HuaJiaoPack.Message.sender', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiver', full_name='HuaJiaoPack.Message.receiver', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiver_type', full_name='HuaJiaoPack.Message.receiver_type', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='req', full_name='HuaJiaoPack.Message.req', index=5,\n      number=6, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='resp', full_name='HuaJiaoPack.Message.resp', index=6,\n      number=7, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='notify', full_name='HuaJiaoPack.Message.notify', index=7,\n      number=8, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sender_type', full_name='HuaJiaoPack.Message.sender_type', index=8,\n      number=12, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_MESSAGE_REQUEST, _MESSAGE_RESPONSE, _MESSAGE_NOTIFY, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=31,\n  serialized_end=1463,\n)\n\n\n_CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST = _descriptor.Descriptor(\n  name='ApplyJoinChatRoomRequest',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest.roomid', index=0,\n      number=1, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest.room', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userid_type', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest.userid_type', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1837,\n  serialized_end=1937,\n)\n\n_CHATROOMPACKET_CHATROOMUPTOSERVER = _descriptor.Descriptor(\n  name='ChatRoomUpToServer',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='payloadtype', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.payloadtype', index=0,\n      number=1, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='applyjoinchatroomreq', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.applyjoinchatroomreq', index=1,\n      number=4, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1691,\n  serialized_end=1937,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE = _descriptor.Descriptor(\n  name='CreateChatRoomResponse',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse.room', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2667,\n  serialized_end=2728,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE = _descriptor.Descriptor(\n  name='ApplyJoinChatRoomResponse',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse.room', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2730,\n  serialized_end=2794,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE = _descriptor.Descriptor(\n  name='QuitChatRoomResponse',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse.room', index=0,\n      number=1, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2796,\n  serialized_end=2855,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG = _descriptor.Descriptor(\n  name='ChatRoomNewMsg',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.roomid', index=0,\n      number=1, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sender', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.sender', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='msgtype', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.msgtype', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='msgcontent', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.msgcontent', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='regmemcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.regmemcount', index=4,\n      number=5, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='memcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.memcount', index=5,\n      number=6, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='msgid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.msgid', index=6,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='maxid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.maxid', index=7,\n      number=8, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='timestamp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.timestamp', index=8,\n      number=9, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2858,\n  serialized_end=3052,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY = _descriptor.Descriptor(\n  name='MemberJoinChatRoomNotify',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify.room', index=0,\n      number=1, type=11, cpp_type=10, label=2,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3054,\n  serialized_end=3117,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY = _descriptor.Descriptor(\n  name='MemberQuitChatRoomNotify',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify.room', index=0,\n      number=1, type=11, cpp_type=10, label=2,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3119,\n  serialized_end=3182,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY = _descriptor.Descriptor(\n  name='ChatRoomMNotify',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='type', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.type', index=0,\n      number=1, type=5, cpp_type=1, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='data', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.data', index=1,\n      number=2, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='regmemcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.regmemcount', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='memcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.memcount', index=3,\n      number=4, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3184,\n  serialized_end=3268,\n)\n\n_CHATROOMPACKET_CHATROOMDOWNTOUSER = _descriptor.Descriptor(\n  name='ChatRoomDownToUser',\n  full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='result', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.result', index=0,\n      number=1, type=5, cpp_type=1, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payloadtype', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.payloadtype', index=1,\n      number=2, type=13, cpp_type=3, label=2,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='createchatroomresp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.createchatroomresp', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='applyjoinchatroomresp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.applyjoinchatroomresp', index=3,\n      number=5, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='quitchatroomresp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.quitchatroomresp', index=4,\n      number=6, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='newmsgnotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.newmsgnotify', index=5,\n      number=13, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='memberjoinnotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.memberjoinnotify', index=6,\n      number=16, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='memberquitnotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.memberquitnotify', index=7,\n      number=17, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='multinotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.multinotify', index=8,\n      number=200, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE, _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE, _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE, _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG, _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY, _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY, _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1940,\n  serialized_end=3268,\n)\n\n_CHATROOMPACKET = _descriptor.Descriptor(\n  name='ChatRoomPacket',\n  full_name='HuaJiaoPack.ChatRoomPacket',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='HuaJiaoPack.ChatRoomPacket.roomid', index=0,\n      number=1, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='to_server_data', full_name='HuaJiaoPack.ChatRoomPacket.to_server_data', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='to_user_data', full_name='HuaJiaoPack.ChatRoomPacket.to_user_data', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='HuaJiaoPack.ChatRoomPacket.uuid', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='client_sn', full_name='HuaJiaoPack.ChatRoomPacket.client_sn', index=4,\n      number=5, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appid', full_name='HuaJiaoPack.ChatRoomPacket.appid', index=5,\n      number=6, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_CHATROOMPACKET_CHATROOMUPTOSERVER, _CHATROOMPACKET_CHATROOMDOWNTOUSER, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1466,\n  serialized_end=3268,\n)\n\n\n_CHATROOM = _descriptor.Descriptor(\n  name='ChatRoom',\n  full_name='HuaJiaoPack.ChatRoom',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='HuaJiaoPack.ChatRoom.roomid', index=0,\n      number=1, type=12, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='properties', full_name='HuaJiaoPack.ChatRoom.properties', index=1,\n      number=8, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='members', full_name='HuaJiaoPack.ChatRoom.members', index=2,\n      number=9, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='partnerdata', full_name='HuaJiaoPack.ChatRoom.partnerdata', index=3,\n      number=13, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3270,\n  serialized_end=3396,\n)\n\n\n_CRUSER = _descriptor.Descriptor(\n  name='CRUser',\n  full_name='HuaJiaoPack.CRUser',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='userid', full_name='HuaJiaoPack.CRUser.userid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='name', full_name='HuaJiaoPack.CRUser.name', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userdata', full_name='HuaJiaoPack.CRUser.userdata', index=2,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3398,\n  serialized_end=3454,\n)\n\n\n_CRPAIR = _descriptor.Descriptor(\n  name='CRPair',\n  full_name='HuaJiaoPack.CRPair',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='key', full_name='HuaJiaoPack.CRPair.key', index=0,\n      number=1, type=9, cpp_type=9, label=2,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='value', full_name='HuaJiaoPack.CRPair.value', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3456,\n  serialized_end=3492,\n)\n\n_MESSAGE_REQUEST_LOGINREQ.containing_type = _MESSAGE_REQUEST\n_MESSAGE_REQUEST_INITLOGINREQ.containing_type = _MESSAGE_REQUEST\n_MESSAGE_REQUEST_SERVICE_REQ.containing_type = _MESSAGE_REQUEST\n_MESSAGE_REQUEST.fields_by_name['login'].message_type = _MESSAGE_REQUEST_LOGINREQ\n_MESSAGE_REQUEST.fields_by_name['init_login_req'].message_type = _MESSAGE_REQUEST_INITLOGINREQ\n_MESSAGE_REQUEST.fields_by_name['service_req'].message_type = _MESSAGE_REQUEST_SERVICE_REQ\n_MESSAGE_REQUEST.containing_type = _MESSAGE\n_MESSAGE_RESPONSE_LOGINRESP.containing_type = _MESSAGE_RESPONSE\n_MESSAGE_RESPONSE_INITLOGINRESP.containing_type = _MESSAGE_RESPONSE\n_MESSAGE_RESPONSE_SERVICE_RESP.containing_type = _MESSAGE_RESPONSE\n_MESSAGE_RESPONSE_CHATRESP.containing_type = _MESSAGE_RESPONSE\n_MESSAGE_RESPONSE.fields_by_name['login'].message_type = _MESSAGE_RESPONSE_LOGINRESP\n_MESSAGE_RESPONSE.fields_by_name['chat'].message_type = _MESSAGE_RESPONSE_CHATRESP\n_MESSAGE_RESPONSE.fields_by_name['init_login_resp'].message_type = _MESSAGE_RESPONSE_INITLOGINRESP\n_MESSAGE_RESPONSE.fields_by_name['service_resp'].message_type = _MESSAGE_RESPONSE_SERVICE_RESP\n_MESSAGE_RESPONSE.containing_type = _MESSAGE\n_MESSAGE_NOTIFY_NEWMESSAGENOTIFY.containing_type = _MESSAGE_NOTIFY\n_MESSAGE_NOTIFY.fields_by_name['newinfo_ntf'].message_type = _MESSAGE_NOTIFY_NEWMESSAGENOTIFY\n_MESSAGE_NOTIFY.containing_type = _MESSAGE\n_MESSAGE.fields_by_name['req'].message_type = _MESSAGE_REQUEST\n_MESSAGE.fields_by_name['resp'].message_type = _MESSAGE_RESPONSE\n_MESSAGE.fields_by_name['notify'].message_type = _MESSAGE_NOTIFY\n_CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST.fields_by_name['room'].message_type = _CHATROOM\n_CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST.containing_type = _CHATROOMPACKET_CHATROOMUPTOSERVER\n_CHATROOMPACKET_CHATROOMUPTOSERVER.fields_by_name['applyjoinchatroomreq'].message_type = _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST\n_CHATROOMPACKET_CHATROOMUPTOSERVER.containing_type = _CHATROOMPACKET\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE.fields_by_name['room'].message_type = _CHATROOM\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE.fields_by_name['room'].message_type = _CHATROOM\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE.fields_by_name['room'].message_type = _CHATROOM\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG.fields_by_name['sender'].message_type = _CRUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY.fields_by_name['room'].message_type = _CHATROOM\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY.fields_by_name['room'].message_type = _CHATROOM\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['createchatroomresp'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['applyjoinchatroomresp'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['quitchatroomresp'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['newmsgnotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['memberjoinnotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['memberquitnotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['multinotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY\n_CHATROOMPACKET_CHATROOMDOWNTOUSER.containing_type = _CHATROOMPACKET\n_CHATROOMPACKET.fields_by_name['to_server_data'].message_type = _CHATROOMPACKET_CHATROOMUPTOSERVER\n_CHATROOMPACKET.fields_by_name['to_user_data'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER\n_CHATROOM.fields_by_name['properties'].message_type = _CRPAIR\n_CHATROOM.fields_by_name['members'].message_type = _CRUSER\nDESCRIPTOR.message_types_by_name['Message'] = _MESSAGE\nDESCRIPTOR.message_types_by_name['ChatRoomPacket'] = _CHATROOMPACKET\nDESCRIPTOR.message_types_by_name['ChatRoom'] = _CHATROOM\nDESCRIPTOR.message_types_by_name['CRUser'] = _CRUSER\nDESCRIPTOR.message_types_by_name['CRPair'] = _CRPAIR\n_sym_db.RegisterFileDescriptor(DESCRIPTOR)\n\nMessage = _reflection.GeneratedProtocolMessageType('Message', (_message.Message,), {\n\n  'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), {\n\n    'LoginReq' : _reflection.GeneratedProtocolMessageType('LoginReq', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_REQUEST_LOGINREQ,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request.LoginReq)\n      })\n    ,\n\n    'InitLoginReq' : _reflection.GeneratedProtocolMessageType('InitLoginReq', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_REQUEST_INITLOGINREQ,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request.InitLoginReq)\n      })\n    ,\n\n    'Service_Req' : _reflection.GeneratedProtocolMessageType('Service_Req', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_REQUEST_SERVICE_REQ,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request.Service_Req)\n      })\n    ,\n    'DESCRIPTOR' : _MESSAGE_REQUEST,\n    '__module__' : 'huajiao_pb2'\n    # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request)\n    })\n  ,\n\n  'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), {\n\n    'LoginResp' : _reflection.GeneratedProtocolMessageType('LoginResp', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_RESPONSE_LOGINRESP,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.LoginResp)\n      })\n    ,\n\n    'InitLoginResp' : _reflection.GeneratedProtocolMessageType('InitLoginResp', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_RESPONSE_INITLOGINRESP,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.InitLoginResp)\n      })\n    ,\n\n    'Service_Resp' : _reflection.GeneratedProtocolMessageType('Service_Resp', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_RESPONSE_SERVICE_RESP,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.Service_Resp)\n      })\n    ,\n\n    'ChatResp' : _reflection.GeneratedProtocolMessageType('ChatResp', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_RESPONSE_CHATRESP,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.ChatResp)\n      })\n    ,\n    'DESCRIPTOR' : _MESSAGE_RESPONSE,\n    '__module__' : 'huajiao_pb2'\n    # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response)\n    })\n  ,\n\n  'Notify' : _reflection.GeneratedProtocolMessageType('Notify', (_message.Message,), {\n\n    'NewMessageNotify' : _reflection.GeneratedProtocolMessageType('NewMessageNotify', (_message.Message,), {\n      'DESCRIPTOR' : _MESSAGE_NOTIFY_NEWMESSAGENOTIFY,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Notify.NewMessageNotify)\n      })\n    ,\n    'DESCRIPTOR' : _MESSAGE_NOTIFY,\n    '__module__' : 'huajiao_pb2'\n    # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Notify)\n    })\n  ,\n  'DESCRIPTOR' : _MESSAGE,\n  '__module__' : 'huajiao_pb2'\n  # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message)\n  })\n_sym_db.RegisterMessage(Message)\n_sym_db.RegisterMessage(Message.Request)\n_sym_db.RegisterMessage(Message.Request.LoginReq)\n_sym_db.RegisterMessage(Message.Request.InitLoginReq)\n_sym_db.RegisterMessage(Message.Request.Service_Req)\n_sym_db.RegisterMessage(Message.Response)\n_sym_db.RegisterMessage(Message.Response.LoginResp)\n_sym_db.RegisterMessage(Message.Response.InitLoginResp)\n_sym_db.RegisterMessage(Message.Response.Service_Resp)\n_sym_db.RegisterMessage(Message.Response.ChatResp)\n_sym_db.RegisterMessage(Message.Notify)\n_sym_db.RegisterMessage(Message.Notify.NewMessageNotify)\n\nChatRoomPacket = _reflection.GeneratedProtocolMessageType('ChatRoomPacket', (_message.Message,), {\n\n  'ChatRoomUpToServer' : _reflection.GeneratedProtocolMessageType('ChatRoomUpToServer', (_message.Message,), {\n\n    'ApplyJoinChatRoomRequest' : _reflection.GeneratedProtocolMessageType('ApplyJoinChatRoomRequest', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest)\n      })\n    ,\n    'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMUPTOSERVER,\n    '__module__' : 'huajiao_pb2'\n    # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer)\n    })\n  ,\n\n  'ChatRoomDownToUser' : _reflection.GeneratedProtocolMessageType('ChatRoomDownToUser', (_message.Message,), {\n\n    'CreateChatRoomResponse' : _reflection.GeneratedProtocolMessageType('CreateChatRoomResponse', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse)\n      })\n    ,\n\n    'ApplyJoinChatRoomResponse' : _reflection.GeneratedProtocolMessageType('ApplyJoinChatRoomResponse', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse)\n      })\n    ,\n\n    'QuitChatRoomResponse' : _reflection.GeneratedProtocolMessageType('QuitChatRoomResponse', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse)\n      })\n    ,\n\n    'ChatRoomNewMsg' : _reflection.GeneratedProtocolMessageType('ChatRoomNewMsg', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg)\n      })\n    ,\n\n    'MemberJoinChatRoomNotify' : _reflection.GeneratedProtocolMessageType('MemberJoinChatRoomNotify', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify)\n      })\n    ,\n\n    'MemberQuitChatRoomNotify' : _reflection.GeneratedProtocolMessageType('MemberQuitChatRoomNotify', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify)\n      })\n    ,\n\n    'ChatRoomMNotify' : _reflection.GeneratedProtocolMessageType('ChatRoomMNotify', (_message.Message,), {\n      'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY,\n      '__module__' : 'huajiao_pb2'\n      # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify)\n      })\n    ,\n    'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER,\n    '__module__' : 'huajiao_pb2'\n    # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser)\n    })\n  ,\n  'DESCRIPTOR' : _CHATROOMPACKET,\n  '__module__' : 'huajiao_pb2'\n  # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket)\n  })\n_sym_db.RegisterMessage(ChatRoomPacket)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomUpToServer)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify)\n_sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify)\n\nChatRoom = _reflection.GeneratedProtocolMessageType('ChatRoom', (_message.Message,), {\n  'DESCRIPTOR' : _CHATROOM,\n  '__module__' : 'huajiao_pb2'\n  # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoom)\n  })\n_sym_db.RegisterMessage(ChatRoom)\n\nCRUser = _reflection.GeneratedProtocolMessageType('CRUser', (_message.Message,), {\n  'DESCRIPTOR' : _CRUSER,\n  '__module__' : 'huajiao_pb2'\n  # @@protoc_insertion_point(class_scope:HuaJiaoPack.CRUser)\n  })\n_sym_db.RegisterMessage(CRUser)\n\nCRPair = _reflection.GeneratedProtocolMessageType('CRPair', (_message.Message,), {\n  'DESCRIPTOR' : _CRPAIR,\n  '__module__' : 'huajiao_pb2'\n  # @@protoc_insertion_point(class_scope:HuaJiaoPack.CRPair)\n  })\n_sym_db.RegisterMessage(CRPair)\n\n\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "danmu/danmaku/huomao.py",
    "content": "import struct\nimport aiohttp\nimport json\n\n\nclass HuoMao:\n    heartbeat = b'\\x00\\x00\\x00\\x10\\x00\\x10\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01'\n    # heartbeat = struct.pack('!ihhii', 16,16,1,2,1)\n    heartbeatInterval = 30\n\n    @staticmethod\n    async def get_ws_info(url):\n        goim = 'http://www.huomao.com/ajax/goimConf?type=h5'\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, '\n                          'like Gecko) Version/11.0 Mobile/15A372 Safari/604.1'}\n        async with aiohttp.ClientSession() as session:\n            async with session.get(goim, headers=headers) as resp:\n                info = json.loads(await resp.text())\n                webSocketUrls = info.get('host_wss', 0)\n                rid = int(url.split('/')[-1])\n                reg_datas = []\n                tokenBody = json.dumps({\"Uid\": 0, \"Rid\": rid}, separators=(',', ':'))\n                bodyBuf = tokenBody.encode('ascii')\n                headerBuf = struct.pack('!ihhii', (16 + len(bodyBuf)), 16, 1, 7, 1)\n                data = headerBuf + bodyBuf\n                reg_datas.append(data)\n        return webSocketUrls, reg_datas\n\n    @staticmethod\n    def decode_msg(data):\n        packetLen, headerLen, ver, op, seq = struct.unpack('!ihhii', data[0:16])\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        if op == 5:\n            offset = 0\n            while offset < len(data):\n                packetLen, headerLen, ver = struct.unpack('!ihh', data[offset:(offset + 8)])\n                msgBody = data[offset + headerLen:offset + packetLen]\n                offset += packetLen\n                body = json.loads(msgBody.decode('utf8'))\n                if body.get('code', 0) == '100001':\n                    msg['name'] = body['speak']['user']['name']\n                    msg['content'] = body['speak']['barrage']['msg']\n                    msg['msg_type'] = 'danmaku'\n                    msgs.append(msg.copy())\n            return msgs\n        msgs.append(msg)\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/huya.py",
    "content": "import re\r\nimport aiohttp\r\nfrom .tars import tarscore\r\n\r\n\r\nclass Huya:\r\n    wss_url = 'wss://cdnws.api.huya.com/'\r\n    heartbeat = b'\\x00\\x03\\x1d\\x00\\x00\\x69\\x00\\x00\\x00\\x69\\x10\\x03\\x2c\\x3c\\x4c\\x56\\x08\\x6f\\x6e\\x6c\\x69\\x6e\\x65\\x75' \\\r\n                b'\\x69\\x66\\x0f\\x4f\\x6e\\x55\\x73\\x65\\x72\\x48\\x65\\x61\\x72\\x74\\x42\\x65\\x61\\x74\\x7d\\x00\\x00\\x3c\\x08\\x00' \\\r\n                b'\\x01\\x06\\x04\\x74\\x52\\x65\\x71\\x1d\\x00\\x00\\x2f\\x0a\\x0a\\x0c\\x16\\x00\\x26\\x00\\x36\\x07\\x61\\x64\\x72\\x5f' \\\r\n                b'\\x77\\x61\\x70\\x46\\x00\\x0b\\x12\\x03\\xae\\xf0\\x0f\\x22\\x03\\xae\\xf0\\x0f\\x3c\\x42\\x6d\\x52\\x02\\x60\\x5c\\x60' \\\r\n                b'\\x01\\x7c\\x82\\x00\\x0b\\xb0\\x1f\\x9c\\xac\\x0b\\x8c\\x98\\x0c\\xa8\\x0c '\r\n    heartbeatInterval = 60\r\n\r\n    @staticmethod\r\n    async def get_ws_info(url):\r\n        reg_datas = []\r\n        url = 'https://m.huya.com/' + url.split('/')[-1]\r\n        headers = {\r\n            'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, '\r\n                          'like Gecko) Chrome/79.0.3945.88 Mobile Safari/537.36'}\r\n        async with aiohttp.ClientSession() as session:\r\n            async with session.get(url, headers=headers) as resp:\r\n                room_page = await resp.text()\r\n                m = re.search(r\"lYyid\\\":([0-9]+)\", room_page, re.MULTILINE)\r\n                ayyuid = m.group(1)\r\n                m = re.search(r\"lChannelId\\\":([0-9]+)\", room_page, re.MULTILINE)\r\n                tid = m.group(1)\r\n                m = re.search(r\"lSubChannelId\\\":([0-9]+)\", room_page, re.MULTILINE)\r\n                sid = m.group(1)\r\n\r\n        oos = tarscore.TarsOutputStream()\r\n        oos.write(tarscore.int64, 0, int(ayyuid))\r\n        oos.write(tarscore.boolean, 1, True)  # Anonymous\r\n        oos.write(tarscore.string, 2, \"\")  # sGuid\r\n        oos.write(tarscore.string, 3, \"\")\r\n        oos.write(tarscore.int64, 4, int(tid))\r\n        oos.write(tarscore.int64, 5, int(sid))\r\n        oos.write(tarscore.int64, 6, 0)\r\n        oos.write(tarscore.int64, 7, 0)\r\n\r\n        wscmd = tarscore.TarsOutputStream()\r\n        wscmd.write(tarscore.int32, 0, 1)\r\n        wscmd.write(tarscore.bytes, 1, oos.getBuffer())\r\n\r\n        reg_datas.append(wscmd.getBuffer())\r\n        return Huya.wss_url, reg_datas\r\n\r\n    @staticmethod\r\n    def decode_msg(data):\r\n        class user(tarscore.struct):\r\n            def readFrom(ios):\r\n                return ios.read(tarscore.string, 2, False).decode('utf8')\r\n\r\n        name = ''\r\n        content = ''\r\n        msgs = []\r\n        ios = tarscore.TarsInputStream(data)\r\n\r\n        if ios.read(tarscore.int32, 0, False) == 7:\r\n            ios = tarscore.TarsInputStream(ios.read(tarscore.bytes, 1, False))\r\n            if ios.read(tarscore.int64, 1, False) == 1400:\r\n                ios = tarscore.TarsInputStream(ios.read(tarscore.bytes, 2, False))\r\n                name = ios.read(user, 0, False)  # username\r\n                content = ios.read(tarscore.string, 3, False).decode('utf8')  # content\r\n\r\n        if name != '':\r\n            msg = {'name': name, 'content': content, 'msg_type': 'danmaku'}\r\n        else:\r\n            msg = {'name': '', 'content': '', 'msg_type': 'other'}\r\n        msgs.append(msg)\r\n        return msgs\r\n"
  },
  {
    "path": "danmu/danmaku/inke.py",
    "content": "import aiohttp\nimport re\nimport time\nimport json\n\n\nclass Inke:\n    heartbeat = None\n\n    @staticmethod\n    async def get_ws_info(url):\n        uid = re.search(r'uid=(\\d+)', url).group(1)\n        roomid = id = re.search(r'&id=(\\d+)', url).group(1)\n        t = int(time.time() * 1e3)\n        cr = 'https://chatroom.inke.cn/url?roomid={}&uid={}&id={}&access_from=pc_web&_t={}'.format(roomid, uid, id, t)\n        async with aiohttp.ClientSession() as session:\n            async with session.get(cr) as resp:\n                res = await resp.text()\n                wss_url = json.loads(res).get('url')\n        return wss_url, None\n\n    @staticmethod\n    def decode_msg(data):\n        msgs = []\n        name = content = ''\n        msg_type = 'other'\n        message = json.loads(data)\n        ms = message['ms']\n        c = ms[-1].get('c', 0)\n        if c:\n            tp = ms[-1].get('tp', 0)\n            if tp == 'pub' or tp == 'color':\n                name = ms[0].get('from').get('nic', '')\n            elif tp == 'user_join_tip':\n                name = ms[0].get('u').get('nic', '')\n            else:\n                name = 'sys'\n            content = c\n            msg_type = 'danmaku'\n        msg = {'name': name, 'content': content, 'msg_type': msg_type}\n        msgs.append(msg)\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/kuaishou.proto",
    "content": "syntax = \"proto2\";\npackage KuaiShouPack;\n\nmessage CSWebHeartbeat {\n\toptional uint64 timestamp = 1;\n}\n\nmessage SocketMessage {\n    optional PayloadType payloadType = 1;\n    optional CompressionType compressionType = 2;\n    optional bytes payload = 3;\n\n    enum CompressionType {\n        UNKNOWN = 0;\n        NONE = 1;\n        GZIP = 2;\n        AES = 3;\n    }\n}\n\nenum PayloadType {\n    UNKNOWN = 0;\n    CS_HEARTBEAT = 1;\n    CS_ERROR = 3;\n    CS_PING = 4;\n    PS_HOST_INFO = 51;\n    SC_HEARTBEAT_ACK = 101;\n    SC_ECHO = 102;\n    SC_ERROR = 103;\n    SC_PING_ACK = 104;\n    SC_INFO = 105;\n    CS_ENTER_ROOM = 200;\n    CS_USER_PAUSE = 201;\n    CS_USER_EXIT = 202;\n    CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203;\n    CS_HORSE_RACING = 204;\n    CS_RACE_LOSE = 205;\n    CS_VOIP_SIGNAL = 206;\n    SC_ENTER_ROOM_ACK = 300;\n    SC_AUTHOR_PAUSE = 301;\n    SC_AUTHOR_RESUME = 302;\n    SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303;\n    SC_AUTHOR_HEARTBEAT_MISS = 304;\n    SC_PIP_STARTED = 305;\n    SC_PIP_ENDED = 306;\n    SC_HORSE_RACING_ACK = 307;\n    SC_VOIP_SIGNAL = 308;\n    SC_FEED_PUSH = 310;\n    SC_ASSISTANT_STATUS = 311;\n    SC_REFRESH_WALLET = 312;\n    SC_LIVE_CHAT_CALL = 320;\n    SC_LIVE_CHAT_CALL_ACCEPTED = 321;\n    SC_LIVE_CHAT_CALL_REJECTED = 322;\n    SC_LIVE_CHAT_READY = 323;\n    SC_LIVE_CHAT_GUEST_END = 324;\n    SC_LIVE_CHAT_ENDED = 325;\n    SC_RENDERING_MAGIC_FACE_DISABLE = 326;\n    SC_RENDERING_MAGIC_FACE_ENABLE = 327;\n    SC_RED_PACK_FEED = 330;\n    SC_LIVE_WATCHING_LIST = 340;\n    SC_LIVE_QUIZ_QUESTION_ASKED = 350;\n    SC_LIVE_QUIZ_QUESTION_REVIEWED = 351;\n    SC_LIVE_QUIZ_SYNC = 352;\n    SC_LIVE_QUIZ_ENDED = 353;\n    SC_LIVE_QUIZ_WINNERS = 354;\n    SC_SUSPECTED_VIOLATION = 355;\n    SC_SHOP_OPENED = 360;\n    SC_SHOP_CLOSED = 361;\n    SC_GUESS_OPENED = 370;\n    SC_GUESS_CLOSED = 371;\n    SC_PK_INVITATION = 380;\n    SC_PK_STATISTIC = 381;\n    SC_RIDDLE_OPENED = 390;\n    SC_RIDDLE_CLOESED = 391;\n    SC_RIDE_CHANGED = 412;\n    SC_BET_CHANGED = 441;\n    SC_BET_CLOSED = 442;\n    SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645;\n}\n\nmessage CSWebEnterRoom {\n    optional string token = 1;\n    optional string liveStreamId = 2;\n    optional uint32 reconnectCount = 3;\n    optional uint32 lastErrorCode = 4;\n    optional string expTag = 5;\n    optional string attach = 6;\n    optional string pageId = 7;\n}\n\nmessage SCWebFeedPush {\n    optional string displayWatchingCount = 1;\n    optional string displayLikeCount = 2;\n    optional uint64 pendingLikeCount = 3;\n    optional uint64 pushInterval = 4;\n    repeated WebCommentFeed commentFeeds = 5;\n    optional string commentCursor = 6;\n    repeated WebComboCommentFeed comboCommentFeed = 7;\n    repeated WebLikeFeed likeFeeds = 8;\n    repeated WebGiftFeed giftFeeds = 9;\n    optional string giftCursor = 10;\n    repeated WebSystemNoticeFeed systemNoticeFeeds = 11;\n    repeated WebShareFeed shareFeeds = 12;\n\n}\n\nmessage WebCommentFeed {\n    optional string id = 1;\n    optional SimpleUserInfo user = 2;\n    optional string content = 3;\n    optional string deviceHash = 4;\n    optional uint64 sortRank = 5;\n    optional string color = 6;\n    optional WebCommentFeedShowType showType = 7;\n}\n\nmessage SimpleUserInfo {\n    optional string principalId = 1;\n    optional string userName = 2;\n    optional string headUrl = 3;\n}\n\nenum WebCommentFeedShowType {\n    FEED_SHOW_UNKNOWN = 0;\n    FEED_SHOW_NORMAL = 1;\n    FEED_HIDDEN = 2;\n}\n\nmessage WebComboCommentFeed {\n    optional string id = 1;\n    optional string content = 2;\n    optional uint32 comboCount = 3;\n}\n\nmessage WebLikeFeed {\n    optional string id = 1;\n    optional SimpleUserInfo user = 2;\n    optional uint64 sortRank = 3;\n    optional string deviceHash = 4;\n}\n\nmessage WebGiftFeed {\n    optional string id = 1;\n    optional SimpleUserInfo user = 2;\n    optional uint64 time = 3;\n    optional uint32 giftId = 4;\n    optional uint64 sortRank = 5;\n    optional string mergeKey = 6;\n    optional uint32 batchSize = 7;\n    optional uint32 comboCount = 8;\n    optional uint32 rank = 9;\n    optional uint64 expireDuration = 10;\n    optional uint64 clientTimestamp = 11;\n    optional uint64 slotDisplayDuration = 12;\n    optional uint32 starLevel = 13;\n    optional StyleType styleType = 14;\n    optional WebLiveAssistantType liveAssistantType = 15;\n    optional string deviceHash = 16;\n    optional bool danmakuDisplay = 17;\n\n    enum StyleType {\n        UNKNOWN_STYLE = 0;\n        BATCH_STAR_0 = 1;\n        BATCH_STAR_1 = 2;\n        BATCH_STAR_2 = 3;\n        BATCH_STAR_3 = 4;\n        BATCH_STAR_4 = 5;\n        BATCH_STAR_5 = 6;\n        BATCH_STAR_6 = 7;\n    }\n}\n\nenum WebLiveAssistantType {\n    UNKNOWN_ASSISTANT_TYPE = 0;\n    SUPER = 1;\n    JUNIOR = 2;\n}\n\nmessage WebSystemNoticeFeed {\n    optional string id = 1;\n    optional SimpleUserInfo user = 2;\n    optional uint64 time = 3;\n    optional string content = 4;\n    optional uint64 displayDuration = 5;\n    optional uint64 sortRank = 6;\n    optional DisplayType displayType = 7;\n\n    enum DisplayType {\n        UNKNOWN_DISPLAY_TYPE = 0;\n        COMMENT = 1;\n        ALERT = 2;\n        TOAST = 3;\n    }\n}\n\nmessage WebShareFeed {\n    optional string id = 1;\n    optional SimpleUserInfo user = 2;\n    optional uint64 time = 3;\n    optional uint32 thirdPartyPlatform = 4;\n    optional uint64 sortRank = 5;\n    optional WebLiveAssistantType liveAssistantType = 6;\n    optional string deviceHash = 7;\n}\n"
  },
  {
    "path": "danmu/danmaku/kuaishou.py",
    "content": "from . import kuaishou_pb2 as pb\nimport aiohttp\nimport re\nimport json\nimport time\nimport random\n\n\nclass KuaiShou:\n    heartbeatInterval = 20\n\n    @staticmethod\n    async def get_ws_info(url):\n        \"\"\"获取wss连接信息\n        Args:\n            直播间完整地址\n        Returns:\n            webSocketUrls:wss地址\n            data:第一次send数据\n            liveStreamId:\n            token:\n            page_id:\n            :param url:\n        \"\"\"\n        rid = url.split('/')[-1]\n        url = 'https://m.gifshow.com/fw/live/' + str(rid)  # 移动版直播间地址\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, '\n                          'like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',\n            'Cookie': 'did=web_d563dca728d28b00336877723e0359ed'}  # 请求失败则更换cookie中的did字段\n        async with aiohttp.ClientSession() as session:\n            async with session.get(url, headers=headers) as resp:\n                res = await resp.text()\n\n        wsfeedinfo = re.search(r'wsFeedInfo\":(.*),\"liveExist', res)\n        if wsfeedinfo:\n            wsfeedinfo = json.loads(wsfeedinfo.group(1))\n        else:\n            raise Exception('找不到 wsFeedInfo，可能链接错误或 Cookie 过期')\n\n        livestreamid, [websocketurls], token = wsfeedinfo.values()\n        page_id = KuaiShou.get_page_id()\n\n        p, s = pb.SocketMessage(), pb.CSWebEnterRoom()\n        s.liveStreamId, s.pageId, s.token = livestreamid, page_id, token\n        p.payload = s.SerializeToString()\n        p.payloadType = 200\n        reg_data = p.SerializeToString()\n\n        t = pb.CSWebHeartbeat()\n        t.timestamp = int(time.time() * 1000)\n        p.payload = t.SerializeToString()\n        p.payloadType = 1\n        KuaiShou.heartbeat = p.SerializeToString()  # 心跳可固定\n\n        return websocketurls, [reg_data]\n\n    @staticmethod\n    def get_page_id():\n        charset = \"bjectSymhasOwnProp-0123456789ABCDEFGHIJKLMNQRTUVWXYZ_dfgiklquvxz\"\n        page_id = ''\n        for _ in range(0, 16):\n            page_id += random.choice(charset)\n        page_id += \"_\"\n        page_id += str(int(time.time() * 1000))\n        return page_id\n\n    @staticmethod\n    def decode_msg(message):\n        msgs = [{'name': '', 'content': '', 'msg_type': 'other'}]\n\n        p, s = pb.SocketMessage(), pb.SCWebFeedPush()\n        p.ParseFromString(message)\n        if p.payloadType == 310:\n            s.ParseFromString(p.payload)\n\n            def f(*feeds):\n                gift = {\n                    1: '荧光棒', 2: '棒棒糖', 3: '荧光棒', 4: 'PCL加油', 7: '么么哒', 9: '啤酒', 10: '甜甜圈',\n                    14: '钻戒', 16: '皇冠', 25: '凤冠', 33: '烟花', 41: '跑车', 56: '稳', 113: '火箭',\n                    114: '玫瑰', 132: '绷带', 133: '平底锅', 135: '红爸爸', 136: '蓝爸爸', 137: '铭文碎片',\n                    143: '太阳女神', 147: '赞', 149: '血瓶', 150: 'carry全场', 152: '大红灯笼', 156: '穿云箭',\n                    159: '膨胀了', 160: '秀你一脸', 161: 'MVP', 163: '加油', 164: '猫粮', 165: '小可爱',\n                    169: '男神', 172: '联盟金猪', 173: '有钱花', 193: '蛋糕', 197: '棒棒糖', 198: '瓜',\n                    199: '小可爱', 201: '赞', 207: '快手卡', 208: '灵狐姐', 216: 'LPL加油', 218: '烟花',\n                    219: '告白气球', 220: '大红灯笼', 221: '怦然心动', 222: '凤冠', 223: '火箭', 224: '跑车',\n                    225: '穿云箭', 226: '金话筒', 227: 'IG冲鸭', 228: 'GRF冲鸭', 229: 'FPX冲鸭', 230: 'FNC冲鸭',\n                    231: 'SKT冲鸭', 232: 'SPY冲鸭', 233: 'DWG冲鸭', 234: 'G2冲鸭', 235: '爆单', 236: '入团券',\n                    237: '陪着你540', 238: '支持牌', 239: '陪着你', 242: '金龙', 243: '豪车幻影', 244: '超级6',\n                    245: '水晶', 246: '金莲', 247: '福袋', 248: '铃铛', 249: '巧克力', 250: '感恩的心',\n                    254: '武汉加油', 256: '金龙', 257: '财神', 258: '金龙', 259: '天鹅湖', 260: '珍珠',\n                    261: '金莲', 262: '招财猫', 263: '铃铛', 264: '巧克力', 266: '幸运魔盒', 267: '吻你',\n                    268: '梦幻城堡', 269: '游乐园', 271: '萌宠', 272: '小雪豹', 275: '喜欢你', 276: '三级头',\n                    277: '喜欢你', 278: '财神', 279: '锦鲤', 281: '廉颇', 282: '开黑卡', 283: '付费直播门票（不下线）',\n                    285: '喜欢你呀', 286: '629', 287: '真爱大炮', 289: '玫瑰花园', 290: '珠峰', 292: '鹿角',\n                    296: '666', 297: '超跑车队', 298: '奥利给', 302: '互粉', 303: '冰棒', 304: '龙之谷',\n                    306: '浪漫游轮', 307: '壁咚', 308: '壁咚', 309: '鹿角', 310: '么么哒', 311: '私人飞机',\n                    312: '巅峰票', 313: '巅峰王者', 315: '莫吉托', 316: '地表最强', 318: '阳光海滩', 319: '12号唱片'\n                }\n                infos = [{'name': '', 'content': '', 'msg_type': 'other'}]\n                for feed in feeds:\n                    if feed:\n                        for i in feed:\n                            name = i.user.userName\n                            content = i.content if hasattr(i, 'content') else '送 ' + gift.get(i.giftId, '') \\\n                                if hasattr(i, 'giftId') else '点亮了 ❤'\n                            info = {'name': name, 'content': content, 'msg_type': 'danmaku'}\n                            infos.append(info.copy())\n                return infos\n\n            msgs = f(s.commentFeeds, s.giftFeeds, s.likeFeeds)\n\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/kuaishou_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# source: kuaishou.proto\n\nfrom google.protobuf.internal import enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom google.protobuf import reflection as _reflection\nfrom google.protobuf import symbol_database as _symbol_database\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor.FileDescriptor(\n  name='kuaishou.proto',\n  package='KuaiShouPack',\n  syntax='proto2',\n  serialized_options=None,\n  create_key=_descriptor._internal_create_key,\n  serialized_pb=b'\\n\\x0ekuaishou.proto\\x12\\x0cKuaiShouPack\\\"#\\n\\x0e\\x43SWebHeartbeat\\x12\\x11\\n\\ttimestamp\\x18\\x01 \\x01(\\x04\\\"\\xd3\\x01\\n\\rSocketMessage\\x12.\\n\\x0bpayloadType\\x18\\x01 \\x01(\\x0e\\x32\\x19.KuaiShouPack.PayloadType\\x12\\x44\\n\\x0f\\x63ompressionType\\x18\\x02 \\x01(\\x0e\\x32+.KuaiShouPack.SocketMessage.CompressionType\\x12\\x0f\\n\\x07payload\\x18\\x03 \\x01(\\x0c\\\";\\n\\x0f\\x43ompressionType\\x12\\x0b\\n\\x07UNKNOWN\\x10\\x00\\x12\\x08\\n\\x04NONE\\x10\\x01\\x12\\x08\\n\\x04GZIP\\x10\\x02\\x12\\x07\\n\\x03\\x41\\x45S\\x10\\x03\\\"\\x94\\x01\\n\\x0e\\x43SWebEnterRoom\\x12\\r\\n\\x05token\\x18\\x01 \\x01(\\t\\x12\\x14\\n\\x0cliveStreamId\\x18\\x02 \\x01(\\t\\x12\\x16\\n\\x0ereconnectCount\\x18\\x03 \\x01(\\r\\x12\\x15\\n\\rlastErrorCode\\x18\\x04 \\x01(\\r\\x12\\x0e\\n\\x06\\x65xpTag\\x18\\x05 \\x01(\\t\\x12\\x0e\\n\\x06\\x61ttach\\x18\\x06 \\x01(\\t\\x12\\x0e\\n\\x06pageId\\x18\\x07 \\x01(\\t\\\"\\xdd\\x03\\n\\rSCWebFeedPush\\x12\\x1c\\n\\x14\\x64isplayWatchingCount\\x18\\x01 \\x01(\\t\\x12\\x18\\n\\x10\\x64isplayLikeCount\\x18\\x02 \\x01(\\t\\x12\\x18\\n\\x10pendingLikeCount\\x18\\x03 \\x01(\\x04\\x12\\x14\\n\\x0cpushInterval\\x18\\x04 \\x01(\\x04\\x12\\x32\\n\\x0c\\x63ommentFeeds\\x18\\x05 \\x03(\\x0b\\x32\\x1c.KuaiShouPack.WebCommentFeed\\x12\\x15\\n\\rcommentCursor\\x18\\x06 \\x01(\\t\\x12;\\n\\x10\\x63omboCommentFeed\\x18\\x07 \\x03(\\x0b\\x32!.KuaiShouPack.WebComboCommentFeed\\x12,\\n\\tlikeFeeds\\x18\\x08 \\x03(\\x0b\\x32\\x19.KuaiShouPack.WebLikeFeed\\x12,\\n\\tgiftFeeds\\x18\\t \\x03(\\x0b\\x32\\x19.KuaiShouPack.WebGiftFeed\\x12\\x12\\n\\ngiftCursor\\x18\\n \\x01(\\t\\x12<\\n\\x11systemNoticeFeeds\\x18\\x0b \\x03(\\x0b\\x32!.KuaiShouPack.WebSystemNoticeFeed\\x12.\\n\\nshareFeeds\\x18\\x0c \\x03(\\x0b\\x32\\x1a.KuaiShouPack.WebShareFeed\\\"\\xc6\\x01\\n\\x0eWebCommentFeed\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12*\\n\\x04user\\x18\\x02 \\x01(\\x0b\\x32\\x1c.KuaiShouPack.SimpleUserInfo\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x03 \\x01(\\t\\x12\\x12\\n\\ndeviceHash\\x18\\x04 \\x01(\\t\\x12\\x10\\n\\x08sortRank\\x18\\x05 \\x01(\\x04\\x12\\r\\n\\x05\\x63olor\\x18\\x06 \\x01(\\t\\x12\\x36\\n\\x08showType\\x18\\x07 \\x01(\\x0e\\x32$.KuaiShouPack.WebCommentFeedShowType\\\"H\\n\\x0eSimpleUserInfo\\x12\\x13\\n\\x0bprincipalId\\x18\\x01 \\x01(\\t\\x12\\x10\\n\\x08userName\\x18\\x02 \\x01(\\t\\x12\\x0f\\n\\x07headUrl\\x18\\x03 \\x01(\\t\\\"F\\n\\x13WebComboCommentFeed\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x02 \\x01(\\t\\x12\\x12\\n\\ncomboCount\\x18\\x03 \\x01(\\r\\\"k\\n\\x0bWebLikeFeed\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12*\\n\\x04user\\x18\\x02 \\x01(\\x0b\\x32\\x1c.KuaiShouPack.SimpleUserInfo\\x12\\x10\\n\\x08sortRank\\x18\\x03 \\x01(\\x04\\x12\\x12\\n\\ndeviceHash\\x18\\x04 \\x01(\\t\\\"\\xdf\\x04\\n\\x0bWebGiftFeed\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12*\\n\\x04user\\x18\\x02 \\x01(\\x0b\\x32\\x1c.KuaiShouPack.SimpleUserInfo\\x12\\x0c\\n\\x04time\\x18\\x03 \\x01(\\x04\\x12\\x0e\\n\\x06giftId\\x18\\x04 \\x01(\\r\\x12\\x10\\n\\x08sortRank\\x18\\x05 \\x01(\\x04\\x12\\x10\\n\\x08mergeKey\\x18\\x06 \\x01(\\t\\x12\\x11\\n\\tbatchSize\\x18\\x07 \\x01(\\r\\x12\\x12\\n\\ncomboCount\\x18\\x08 \\x01(\\r\\x12\\x0c\\n\\x04rank\\x18\\t \\x01(\\r\\x12\\x16\\n\\x0e\\x65xpireDuration\\x18\\n \\x01(\\x04\\x12\\x17\\n\\x0f\\x63lientTimestamp\\x18\\x0b \\x01(\\x04\\x12\\x1b\\n\\x13slotDisplayDuration\\x18\\x0c \\x01(\\x04\\x12\\x11\\n\\tstarLevel\\x18\\r \\x01(\\r\\x12\\x36\\n\\tstyleType\\x18\\x0e \\x01(\\x0e\\x32#.KuaiShouPack.WebGiftFeed.StyleType\\x12=\\n\\x11liveAssistantType\\x18\\x0f \\x01(\\x0e\\x32\\\".KuaiShouPack.WebLiveAssistantType\\x12\\x12\\n\\ndeviceHash\\x18\\x10 \\x01(\\t\\x12\\x16\\n\\x0e\\x64\\x61nmakuDisplay\\x18\\x11 \\x01(\\x08\\\"\\x9c\\x01\\n\\tStyleType\\x12\\x11\\n\\rUNKNOWN_STYLE\\x10\\x00\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_0\\x10\\x01\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_1\\x10\\x02\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_2\\x10\\x03\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_3\\x10\\x04\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_4\\x10\\x05\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_5\\x10\\x06\\x12\\x10\\n\\x0c\\x42\\x41TCH_STAR_6\\x10\\x07\\\"\\xa7\\x02\\n\\x13WebSystemNoticeFeed\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12*\\n\\x04user\\x18\\x02 \\x01(\\x0b\\x32\\x1c.KuaiShouPack.SimpleUserInfo\\x12\\x0c\\n\\x04time\\x18\\x03 \\x01(\\x04\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x04 \\x01(\\t\\x12\\x17\\n\\x0f\\x64isplayDuration\\x18\\x05 \\x01(\\x04\\x12\\x10\\n\\x08sortRank\\x18\\x06 \\x01(\\x04\\x12\\x42\\n\\x0b\\x64isplayType\\x18\\x07 \\x01(\\x0e\\x32-.KuaiShouPack.WebSystemNoticeFeed.DisplayType\\\"J\\n\\x0b\\x44isplayType\\x12\\x18\\n\\x14UNKNOWN_DISPLAY_TYPE\\x10\\x00\\x12\\x0b\\n\\x07\\x43OMMENT\\x10\\x01\\x12\\t\\n\\x05\\x41LERT\\x10\\x02\\x12\\t\\n\\x05TOAST\\x10\\x03\\\"\\xd5\\x01\\n\\x0cWebShareFeed\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12*\\n\\x04user\\x18\\x02 \\x01(\\x0b\\x32\\x1c.KuaiShouPack.SimpleUserInfo\\x12\\x0c\\n\\x04time\\x18\\x03 \\x01(\\x04\\x12\\x1a\\n\\x12thirdPartyPlatform\\x18\\x04 \\x01(\\r\\x12\\x10\\n\\x08sortRank\\x18\\x05 \\x01(\\x04\\x12=\\n\\x11liveAssistantType\\x18\\x06 \\x01(\\x0e\\x32\\\".KuaiShouPack.WebLiveAssistantType\\x12\\x12\\n\\ndeviceHash\\x18\\x07 \\x01(\\t*\\xd8\\n\\n\\x0bPayloadType\\x12\\x0b\\n\\x07UNKNOWN\\x10\\x00\\x12\\x10\\n\\x0c\\x43S_HEARTBEAT\\x10\\x01\\x12\\x0c\\n\\x08\\x43S_ERROR\\x10\\x03\\x12\\x0b\\n\\x07\\x43S_PING\\x10\\x04\\x12\\x10\\n\\x0cPS_HOST_INFO\\x10\\x33\\x12\\x14\\n\\x10SC_HEARTBEAT_ACK\\x10\\x65\\x12\\x0b\\n\\x07SC_ECHO\\x10\\x66\\x12\\x0c\\n\\x08SC_ERROR\\x10g\\x12\\x0f\\n\\x0bSC_PING_ACK\\x10h\\x12\\x0b\\n\\x07SC_INFO\\x10i\\x12\\x12\\n\\rCS_ENTER_ROOM\\x10\\xc8\\x01\\x12\\x12\\n\\rCS_USER_PAUSE\\x10\\xc9\\x01\\x12\\x11\\n\\x0c\\x43S_USER_EXIT\\x10\\xca\\x01\\x12 \\n\\x1b\\x43S_AUTHOR_PUSH_TRAFFIC_ZERO\\x10\\xcb\\x01\\x12\\x14\\n\\x0f\\x43S_HORSE_RACING\\x10\\xcc\\x01\\x12\\x11\\n\\x0c\\x43S_RACE_LOSE\\x10\\xcd\\x01\\x12\\x13\\n\\x0e\\x43S_VOIP_SIGNAL\\x10\\xce\\x01\\x12\\x16\\n\\x11SC_ENTER_ROOM_ACK\\x10\\xac\\x02\\x12\\x14\\n\\x0fSC_AUTHOR_PAUSE\\x10\\xad\\x02\\x12\\x15\\n\\x10SC_AUTHOR_RESUME\\x10\\xae\\x02\\x12 \\n\\x1bSC_AUTHOR_PUSH_TRAFFIC_ZERO\\x10\\xaf\\x02\\x12\\x1d\\n\\x18SC_AUTHOR_HEARTBEAT_MISS\\x10\\xb0\\x02\\x12\\x13\\n\\x0eSC_PIP_STARTED\\x10\\xb1\\x02\\x12\\x11\\n\\x0cSC_PIP_ENDED\\x10\\xb2\\x02\\x12\\x18\\n\\x13SC_HORSE_RACING_ACK\\x10\\xb3\\x02\\x12\\x13\\n\\x0eSC_VOIP_SIGNAL\\x10\\xb4\\x02\\x12\\x11\\n\\x0cSC_FEED_PUSH\\x10\\xb6\\x02\\x12\\x18\\n\\x13SC_ASSISTANT_STATUS\\x10\\xb7\\x02\\x12\\x16\\n\\x11SC_REFRESH_WALLET\\x10\\xb8\\x02\\x12\\x16\\n\\x11SC_LIVE_CHAT_CALL\\x10\\xc0\\x02\\x12\\x1f\\n\\x1aSC_LIVE_CHAT_CALL_ACCEPTED\\x10\\xc1\\x02\\x12\\x1f\\n\\x1aSC_LIVE_CHAT_CALL_REJECTED\\x10\\xc2\\x02\\x12\\x17\\n\\x12SC_LIVE_CHAT_READY\\x10\\xc3\\x02\\x12\\x1b\\n\\x16SC_LIVE_CHAT_GUEST_END\\x10\\xc4\\x02\\x12\\x17\\n\\x12SC_LIVE_CHAT_ENDED\\x10\\xc5\\x02\\x12$\\n\\x1fSC_RENDERING_MAGIC_FACE_DISABLE\\x10\\xc6\\x02\\x12#\\n\\x1eSC_RENDERING_MAGIC_FACE_ENABLE\\x10\\xc7\\x02\\x12\\x15\\n\\x10SC_RED_PACK_FEED\\x10\\xca\\x02\\x12\\x1a\\n\\x15SC_LIVE_WATCHING_LIST\\x10\\xd4\\x02\\x12 \\n\\x1bSC_LIVE_QUIZ_QUESTION_ASKED\\x10\\xde\\x02\\x12#\\n\\x1eSC_LIVE_QUIZ_QUESTION_REVIEWED\\x10\\xdf\\x02\\x12\\x16\\n\\x11SC_LIVE_QUIZ_SYNC\\x10\\xe0\\x02\\x12\\x17\\n\\x12SC_LIVE_QUIZ_ENDED\\x10\\xe1\\x02\\x12\\x19\\n\\x14SC_LIVE_QUIZ_WINNERS\\x10\\xe2\\x02\\x12\\x1b\\n\\x16SC_SUSPECTED_VIOLATION\\x10\\xe3\\x02\\x12\\x13\\n\\x0eSC_SHOP_OPENED\\x10\\xe8\\x02\\x12\\x13\\n\\x0eSC_SHOP_CLOSED\\x10\\xe9\\x02\\x12\\x14\\n\\x0fSC_GUESS_OPENED\\x10\\xf2\\x02\\x12\\x14\\n\\x0fSC_GUESS_CLOSED\\x10\\xf3\\x02\\x12\\x15\\n\\x10SC_PK_INVITATION\\x10\\xfc\\x02\\x12\\x14\\n\\x0fSC_PK_STATISTIC\\x10\\xfd\\x02\\x12\\x15\\n\\x10SC_RIDDLE_OPENED\\x10\\x86\\x03\\x12\\x16\\n\\x11SC_RIDDLE_CLOESED\\x10\\x87\\x03\\x12\\x14\\n\\x0fSC_RIDE_CHANGED\\x10\\x9c\\x03\\x12\\x13\\n\\x0eSC_BET_CHANGED\\x10\\xb9\\x03\\x12\\x12\\n\\rSC_BET_CLOSED\\x10\\xba\\x03\\x12)\\n$SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE\\x10\\x85\\x05*V\\n\\x16WebCommentFeedShowType\\x12\\x15\\n\\x11\\x46\\x45\\x45\\x44_SHOW_UNKNOWN\\x10\\x00\\x12\\x14\\n\\x10\\x46\\x45\\x45\\x44_SHOW_NORMAL\\x10\\x01\\x12\\x0f\\n\\x0b\\x46\\x45\\x45\\x44_HIDDEN\\x10\\x02*I\\n\\x14WebLiveAssistantType\\x12\\x1a\\n\\x16UNKNOWN_ASSISTANT_TYPE\\x10\\x00\\x12\\t\\n\\x05SUPER\\x10\\x01\\x12\\n\\n\\x06JUNIOR\\x10\\x02'\n)\n\n_PAYLOADTYPE = _descriptor.EnumDescriptor(\n  name='PayloadType',\n  full_name='KuaiShouPack.PayloadType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='UNKNOWN', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_HEARTBEAT', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_ERROR', index=2, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_PING', index=3, number=4,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='PS_HOST_INFO', index=4, number=51,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_HEARTBEAT_ACK', index=5, number=101,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_ECHO', index=6, number=102,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_ERROR', index=7, number=103,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_PING_ACK', index=8, number=104,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_INFO', index=9, number=105,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_ENTER_ROOM', index=10, number=200,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_USER_PAUSE', index=11, number=201,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_USER_EXIT', index=12, number=202,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_AUTHOR_PUSH_TRAFFIC_ZERO', index=13, number=203,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_HORSE_RACING', index=14, number=204,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_RACE_LOSE', index=15, number=205,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='CS_VOIP_SIGNAL', index=16, number=206,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_ENTER_ROOM_ACK', index=17, number=300,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_AUTHOR_PAUSE', index=18, number=301,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_AUTHOR_RESUME', index=19, number=302,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_AUTHOR_PUSH_TRAFFIC_ZERO', index=20, number=303,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_AUTHOR_HEARTBEAT_MISS', index=21, number=304,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_PIP_STARTED', index=22, number=305,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_PIP_ENDED', index=23, number=306,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_HORSE_RACING_ACK', index=24, number=307,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_VOIP_SIGNAL', index=25, number=308,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_FEED_PUSH', index=26, number=310,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_ASSISTANT_STATUS', index=27, number=311,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_REFRESH_WALLET', index=28, number=312,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_CHAT_CALL', index=29, number=320,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_CHAT_CALL_ACCEPTED', index=30, number=321,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_CHAT_CALL_REJECTED', index=31, number=322,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_CHAT_READY', index=32, number=323,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_CHAT_GUEST_END', index=33, number=324,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_CHAT_ENDED', index=34, number=325,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_RENDERING_MAGIC_FACE_DISABLE', index=35, number=326,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_RENDERING_MAGIC_FACE_ENABLE', index=36, number=327,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_RED_PACK_FEED', index=37, number=330,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_WATCHING_LIST', index=38, number=340,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_QUIZ_QUESTION_ASKED', index=39, number=350,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_QUIZ_QUESTION_REVIEWED', index=40, number=351,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_QUIZ_SYNC', index=41, number=352,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_QUIZ_ENDED', index=42, number=353,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_QUIZ_WINNERS', index=43, number=354,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_SUSPECTED_VIOLATION', index=44, number=355,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_SHOP_OPENED', index=45, number=360,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_SHOP_CLOSED', index=46, number=361,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_GUESS_OPENED', index=47, number=370,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_GUESS_CLOSED', index=48, number=371,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_PK_INVITATION', index=49, number=380,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_PK_STATISTIC', index=50, number=381,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_RIDDLE_OPENED', index=51, number=390,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_RIDDLE_CLOESED', index=52, number=391,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_RIDE_CHANGED', index=53, number=412,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_BET_CHANGED', index=54, number=441,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_BET_CLOSED', index=55, number=442,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE', index=56, number=645,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=2495,\n  serialized_end=3863,\n)\n_sym_db.RegisterEnumDescriptor(_PAYLOADTYPE)\n\nPayloadType = enum_type_wrapper.EnumTypeWrapper(_PAYLOADTYPE)\n_WEBCOMMENTFEEDSHOWTYPE = _descriptor.EnumDescriptor(\n  name='WebCommentFeedShowType',\n  full_name='KuaiShouPack.WebCommentFeedShowType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='FEED_SHOW_UNKNOWN', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='FEED_SHOW_NORMAL', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='FEED_HIDDEN', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=3865,\n  serialized_end=3951,\n)\n_sym_db.RegisterEnumDescriptor(_WEBCOMMENTFEEDSHOWTYPE)\n\nWebCommentFeedShowType = enum_type_wrapper.EnumTypeWrapper(_WEBCOMMENTFEEDSHOWTYPE)\n_WEBLIVEASSISTANTTYPE = _descriptor.EnumDescriptor(\n  name='WebLiveAssistantType',\n  full_name='KuaiShouPack.WebLiveAssistantType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='UNKNOWN_ASSISTANT_TYPE', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='SUPER', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='JUNIOR', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=3953,\n  serialized_end=4026,\n)\n_sym_db.RegisterEnumDescriptor(_WEBLIVEASSISTANTTYPE)\n\nWebLiveAssistantType = enum_type_wrapper.EnumTypeWrapper(_WEBLIVEASSISTANTTYPE)\nUNKNOWN = 0\nCS_HEARTBEAT = 1\nCS_ERROR = 3\nCS_PING = 4\nPS_HOST_INFO = 51\nSC_HEARTBEAT_ACK = 101\nSC_ECHO = 102\nSC_ERROR = 103\nSC_PING_ACK = 104\nSC_INFO = 105\nCS_ENTER_ROOM = 200\nCS_USER_PAUSE = 201\nCS_USER_EXIT = 202\nCS_AUTHOR_PUSH_TRAFFIC_ZERO = 203\nCS_HORSE_RACING = 204\nCS_RACE_LOSE = 205\nCS_VOIP_SIGNAL = 206\nSC_ENTER_ROOM_ACK = 300\nSC_AUTHOR_PAUSE = 301\nSC_AUTHOR_RESUME = 302\nSC_AUTHOR_PUSH_TRAFFIC_ZERO = 303\nSC_AUTHOR_HEARTBEAT_MISS = 304\nSC_PIP_STARTED = 305\nSC_PIP_ENDED = 306\nSC_HORSE_RACING_ACK = 307\nSC_VOIP_SIGNAL = 308\nSC_FEED_PUSH = 310\nSC_ASSISTANT_STATUS = 311\nSC_REFRESH_WALLET = 312\nSC_LIVE_CHAT_CALL = 320\nSC_LIVE_CHAT_CALL_ACCEPTED = 321\nSC_LIVE_CHAT_CALL_REJECTED = 322\nSC_LIVE_CHAT_READY = 323\nSC_LIVE_CHAT_GUEST_END = 324\nSC_LIVE_CHAT_ENDED = 325\nSC_RENDERING_MAGIC_FACE_DISABLE = 326\nSC_RENDERING_MAGIC_FACE_ENABLE = 327\nSC_RED_PACK_FEED = 330\nSC_LIVE_WATCHING_LIST = 340\nSC_LIVE_QUIZ_QUESTION_ASKED = 350\nSC_LIVE_QUIZ_QUESTION_REVIEWED = 351\nSC_LIVE_QUIZ_SYNC = 352\nSC_LIVE_QUIZ_ENDED = 353\nSC_LIVE_QUIZ_WINNERS = 354\nSC_SUSPECTED_VIOLATION = 355\nSC_SHOP_OPENED = 360\nSC_SHOP_CLOSED = 361\nSC_GUESS_OPENED = 370\nSC_GUESS_CLOSED = 371\nSC_PK_INVITATION = 380\nSC_PK_STATISTIC = 381\nSC_RIDDLE_OPENED = 390\nSC_RIDDLE_CLOESED = 391\nSC_RIDE_CHANGED = 412\nSC_BET_CHANGED = 441\nSC_BET_CLOSED = 442\nSC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645\nFEED_SHOW_UNKNOWN = 0\nFEED_SHOW_NORMAL = 1\nFEED_HIDDEN = 2\nUNKNOWN_ASSISTANT_TYPE = 0\nSUPER = 1\nJUNIOR = 2\n\n\n_SOCKETMESSAGE_COMPRESSIONTYPE = _descriptor.EnumDescriptor(\n  name='CompressionType',\n  full_name='KuaiShouPack.SocketMessage.CompressionType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='UNKNOWN', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='NONE', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='GZIP', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='AES', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=222,\n  serialized_end=281,\n)\n_sym_db.RegisterEnumDescriptor(_SOCKETMESSAGE_COMPRESSIONTYPE)\n\n_WEBGIFTFEED_STYLETYPE = _descriptor.EnumDescriptor(\n  name='StyleType',\n  full_name='KuaiShouPack.WebGiftFeed.StyleType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='UNKNOWN_STYLE', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_0', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_1', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_2', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_3', index=4, number=4,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_4', index=5, number=5,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_5', index=6, number=6,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='BATCH_STAR_6', index=7, number=7,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=1822,\n  serialized_end=1978,\n)\n_sym_db.RegisterEnumDescriptor(_WEBGIFTFEED_STYLETYPE)\n\n_WEBSYSTEMNOTICEFEED_DISPLAYTYPE = _descriptor.EnumDescriptor(\n  name='DisplayType',\n  full_name='KuaiShouPack.WebSystemNoticeFeed.DisplayType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='UNKNOWN_DISPLAY_TYPE', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='COMMENT', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='ALERT', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='TOAST', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=2202,\n  serialized_end=2276,\n)\n_sym_db.RegisterEnumDescriptor(_WEBSYSTEMNOTICEFEED_DISPLAYTYPE)\n\n\n_CSWEBHEARTBEAT = _descriptor.Descriptor(\n  name='CSWebHeartbeat',\n  full_name='KuaiShouPack.CSWebHeartbeat',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='timestamp', full_name='KuaiShouPack.CSWebHeartbeat.timestamp', index=0,\n      number=1, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=32,\n  serialized_end=67,\n)\n\n\n_SOCKETMESSAGE = _descriptor.Descriptor(\n  name='SocketMessage',\n  full_name='KuaiShouPack.SocketMessage',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='payloadType', full_name='KuaiShouPack.SocketMessage.payloadType', index=0,\n      number=1, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='compressionType', full_name='KuaiShouPack.SocketMessage.compressionType', index=1,\n      number=2, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='payload', full_name='KuaiShouPack.SocketMessage.payload', index=2,\n      number=3, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _SOCKETMESSAGE_COMPRESSIONTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=70,\n  serialized_end=281,\n)\n\n\n_CSWEBENTERROOM = _descriptor.Descriptor(\n  name='CSWebEnterRoom',\n  full_name='KuaiShouPack.CSWebEnterRoom',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='token', full_name='KuaiShouPack.CSWebEnterRoom.token', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='liveStreamId', full_name='KuaiShouPack.CSWebEnterRoom.liveStreamId', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='reconnectCount', full_name='KuaiShouPack.CSWebEnterRoom.reconnectCount', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='lastErrorCode', full_name='KuaiShouPack.CSWebEnterRoom.lastErrorCode', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='expTag', full_name='KuaiShouPack.CSWebEnterRoom.expTag', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='attach', full_name='KuaiShouPack.CSWebEnterRoom.attach', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pageId', full_name='KuaiShouPack.CSWebEnterRoom.pageId', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=284,\n  serialized_end=432,\n)\n\n\n_SCWEBFEEDPUSH = _descriptor.Descriptor(\n  name='SCWebFeedPush',\n  full_name='KuaiShouPack.SCWebFeedPush',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='displayWatchingCount', full_name='KuaiShouPack.SCWebFeedPush.displayWatchingCount', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='displayLikeCount', full_name='KuaiShouPack.SCWebFeedPush.displayLikeCount', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pendingLikeCount', full_name='KuaiShouPack.SCWebFeedPush.pendingLikeCount', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pushInterval', full_name='KuaiShouPack.SCWebFeedPush.pushInterval', index=3,\n      number=4, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='commentFeeds', full_name='KuaiShouPack.SCWebFeedPush.commentFeeds', index=4,\n      number=5, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='commentCursor', full_name='KuaiShouPack.SCWebFeedPush.commentCursor', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='comboCommentFeed', full_name='KuaiShouPack.SCWebFeedPush.comboCommentFeed', index=6,\n      number=7, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='likeFeeds', full_name='KuaiShouPack.SCWebFeedPush.likeFeeds', index=7,\n      number=8, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftFeeds', full_name='KuaiShouPack.SCWebFeedPush.giftFeeds', index=8,\n      number=9, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftCursor', full_name='KuaiShouPack.SCWebFeedPush.giftCursor', index=9,\n      number=10, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='systemNoticeFeeds', full_name='KuaiShouPack.SCWebFeedPush.systemNoticeFeeds', index=10,\n      number=11, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='shareFeeds', full_name='KuaiShouPack.SCWebFeedPush.shareFeeds', index=11,\n      number=12, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=435,\n  serialized_end=912,\n)\n\n\n_WEBCOMMENTFEED = _descriptor.Descriptor(\n  name='WebCommentFeed',\n  full_name='KuaiShouPack.WebCommentFeed',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuaiShouPack.WebCommentFeed.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='user', full_name='KuaiShouPack.WebCommentFeed.user', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='content', full_name='KuaiShouPack.WebCommentFeed.content', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceHash', full_name='KuaiShouPack.WebCommentFeed.deviceHash', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sortRank', full_name='KuaiShouPack.WebCommentFeed.sortRank', index=4,\n      number=5, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='color', full_name='KuaiShouPack.WebCommentFeed.color', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='showType', full_name='KuaiShouPack.WebCommentFeed.showType', index=6,\n      number=7, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=915,\n  serialized_end=1113,\n)\n\n\n_SIMPLEUSERINFO = _descriptor.Descriptor(\n  name='SimpleUserInfo',\n  full_name='KuaiShouPack.SimpleUserInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='principalId', full_name='KuaiShouPack.SimpleUserInfo.principalId', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userName', full_name='KuaiShouPack.SimpleUserInfo.userName', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='headUrl', full_name='KuaiShouPack.SimpleUserInfo.headUrl', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1115,\n  serialized_end=1187,\n)\n\n\n_WEBCOMBOCOMMENTFEED = _descriptor.Descriptor(\n  name='WebComboCommentFeed',\n  full_name='KuaiShouPack.WebComboCommentFeed',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuaiShouPack.WebComboCommentFeed.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='content', full_name='KuaiShouPack.WebComboCommentFeed.content', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='comboCount', full_name='KuaiShouPack.WebComboCommentFeed.comboCount', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1189,\n  serialized_end=1259,\n)\n\n\n_WEBLIKEFEED = _descriptor.Descriptor(\n  name='WebLikeFeed',\n  full_name='KuaiShouPack.WebLikeFeed',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuaiShouPack.WebLikeFeed.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='user', full_name='KuaiShouPack.WebLikeFeed.user', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sortRank', full_name='KuaiShouPack.WebLikeFeed.sortRank', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceHash', full_name='KuaiShouPack.WebLikeFeed.deviceHash', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1261,\n  serialized_end=1368,\n)\n\n\n_WEBGIFTFEED = _descriptor.Descriptor(\n  name='WebGiftFeed',\n  full_name='KuaiShouPack.WebGiftFeed',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuaiShouPack.WebGiftFeed.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='user', full_name='KuaiShouPack.WebGiftFeed.user', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='time', full_name='KuaiShouPack.WebGiftFeed.time', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftId', full_name='KuaiShouPack.WebGiftFeed.giftId', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sortRank', full_name='KuaiShouPack.WebGiftFeed.sortRank', index=4,\n      number=5, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='mergeKey', full_name='KuaiShouPack.WebGiftFeed.mergeKey', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='batchSize', full_name='KuaiShouPack.WebGiftFeed.batchSize', index=6,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='comboCount', full_name='KuaiShouPack.WebGiftFeed.comboCount', index=7,\n      number=8, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rank', full_name='KuaiShouPack.WebGiftFeed.rank', index=8,\n      number=9, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='expireDuration', full_name='KuaiShouPack.WebGiftFeed.expireDuration', index=9,\n      number=10, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientTimestamp', full_name='KuaiShouPack.WebGiftFeed.clientTimestamp', index=10,\n      number=11, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='slotDisplayDuration', full_name='KuaiShouPack.WebGiftFeed.slotDisplayDuration', index=11,\n      number=12, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='starLevel', full_name='KuaiShouPack.WebGiftFeed.starLevel', index=12,\n      number=13, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='styleType', full_name='KuaiShouPack.WebGiftFeed.styleType', index=13,\n      number=14, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='liveAssistantType', full_name='KuaiShouPack.WebGiftFeed.liveAssistantType', index=14,\n      number=15, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceHash', full_name='KuaiShouPack.WebGiftFeed.deviceHash', index=15,\n      number=16, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='danmakuDisplay', full_name='KuaiShouPack.WebGiftFeed.danmakuDisplay', index=16,\n      number=17, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _WEBGIFTFEED_STYLETYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1371,\n  serialized_end=1978,\n)\n\n\n_WEBSYSTEMNOTICEFEED = _descriptor.Descriptor(\n  name='WebSystemNoticeFeed',\n  full_name='KuaiShouPack.WebSystemNoticeFeed',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuaiShouPack.WebSystemNoticeFeed.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='user', full_name='KuaiShouPack.WebSystemNoticeFeed.user', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='time', full_name='KuaiShouPack.WebSystemNoticeFeed.time', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='content', full_name='KuaiShouPack.WebSystemNoticeFeed.content', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='displayDuration', full_name='KuaiShouPack.WebSystemNoticeFeed.displayDuration', index=4,\n      number=5, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sortRank', full_name='KuaiShouPack.WebSystemNoticeFeed.sortRank', index=5,\n      number=6, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='displayType', full_name='KuaiShouPack.WebSystemNoticeFeed.displayType', index=6,\n      number=7, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n    _WEBSYSTEMNOTICEFEED_DISPLAYTYPE,\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1981,\n  serialized_end=2276,\n)\n\n\n_WEBSHAREFEED = _descriptor.Descriptor(\n  name='WebShareFeed',\n  full_name='KuaiShouPack.WebShareFeed',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuaiShouPack.WebShareFeed.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='user', full_name='KuaiShouPack.WebShareFeed.user', index=1,\n      number=2, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='time', full_name='KuaiShouPack.WebShareFeed.time', index=2,\n      number=3, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='thirdPartyPlatform', full_name='KuaiShouPack.WebShareFeed.thirdPartyPlatform', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sortRank', full_name='KuaiShouPack.WebShareFeed.sortRank', index=4,\n      number=5, type=4, cpp_type=4, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='liveAssistantType', full_name='KuaiShouPack.WebShareFeed.liveAssistantType', index=5,\n      number=6, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceHash', full_name='KuaiShouPack.WebShareFeed.deviceHash', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2279,\n  serialized_end=2492,\n)\n\n_SOCKETMESSAGE.fields_by_name['payloadType'].enum_type = _PAYLOADTYPE\n_SOCKETMESSAGE.fields_by_name['compressionType'].enum_type = _SOCKETMESSAGE_COMPRESSIONTYPE\n_SOCKETMESSAGE_COMPRESSIONTYPE.containing_type = _SOCKETMESSAGE\n_SCWEBFEEDPUSH.fields_by_name['commentFeeds'].message_type = _WEBCOMMENTFEED\n_SCWEBFEEDPUSH.fields_by_name['comboCommentFeed'].message_type = _WEBCOMBOCOMMENTFEED\n_SCWEBFEEDPUSH.fields_by_name['likeFeeds'].message_type = _WEBLIKEFEED\n_SCWEBFEEDPUSH.fields_by_name['giftFeeds'].message_type = _WEBGIFTFEED\n_SCWEBFEEDPUSH.fields_by_name['systemNoticeFeeds'].message_type = _WEBSYSTEMNOTICEFEED\n_SCWEBFEEDPUSH.fields_by_name['shareFeeds'].message_type = _WEBSHAREFEED\n_WEBCOMMENTFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO\n_WEBCOMMENTFEED.fields_by_name['showType'].enum_type = _WEBCOMMENTFEEDSHOWTYPE\n_WEBLIKEFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO\n_WEBGIFTFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO\n_WEBGIFTFEED.fields_by_name['styleType'].enum_type = _WEBGIFTFEED_STYLETYPE\n_WEBGIFTFEED.fields_by_name['liveAssistantType'].enum_type = _WEBLIVEASSISTANTTYPE\n_WEBGIFTFEED_STYLETYPE.containing_type = _WEBGIFTFEED\n_WEBSYSTEMNOTICEFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO\n_WEBSYSTEMNOTICEFEED.fields_by_name['displayType'].enum_type = _WEBSYSTEMNOTICEFEED_DISPLAYTYPE\n_WEBSYSTEMNOTICEFEED_DISPLAYTYPE.containing_type = _WEBSYSTEMNOTICEFEED\n_WEBSHAREFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO\n_WEBSHAREFEED.fields_by_name['liveAssistantType'].enum_type = _WEBLIVEASSISTANTTYPE\nDESCRIPTOR.message_types_by_name['CSWebHeartbeat'] = _CSWEBHEARTBEAT\nDESCRIPTOR.message_types_by_name['SocketMessage'] = _SOCKETMESSAGE\nDESCRIPTOR.message_types_by_name['CSWebEnterRoom'] = _CSWEBENTERROOM\nDESCRIPTOR.message_types_by_name['SCWebFeedPush'] = _SCWEBFEEDPUSH\nDESCRIPTOR.message_types_by_name['WebCommentFeed'] = _WEBCOMMENTFEED\nDESCRIPTOR.message_types_by_name['SimpleUserInfo'] = _SIMPLEUSERINFO\nDESCRIPTOR.message_types_by_name['WebComboCommentFeed'] = _WEBCOMBOCOMMENTFEED\nDESCRIPTOR.message_types_by_name['WebLikeFeed'] = _WEBLIKEFEED\nDESCRIPTOR.message_types_by_name['WebGiftFeed'] = _WEBGIFTFEED\nDESCRIPTOR.message_types_by_name['WebSystemNoticeFeed'] = _WEBSYSTEMNOTICEFEED\nDESCRIPTOR.message_types_by_name['WebShareFeed'] = _WEBSHAREFEED\nDESCRIPTOR.enum_types_by_name['PayloadType'] = _PAYLOADTYPE\nDESCRIPTOR.enum_types_by_name['WebCommentFeedShowType'] = _WEBCOMMENTFEEDSHOWTYPE\nDESCRIPTOR.enum_types_by_name['WebLiveAssistantType'] = _WEBLIVEASSISTANTTYPE\n_sym_db.RegisterFileDescriptor(DESCRIPTOR)\n\nCSWebHeartbeat = _reflection.GeneratedProtocolMessageType('CSWebHeartbeat', (_message.Message,), {\n  'DESCRIPTOR' : _CSWEBHEARTBEAT,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.CSWebHeartbeat)\n  })\n_sym_db.RegisterMessage(CSWebHeartbeat)\n\nSocketMessage = _reflection.GeneratedProtocolMessageType('SocketMessage', (_message.Message,), {\n  'DESCRIPTOR' : _SOCKETMESSAGE,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.SocketMessage)\n  })\n_sym_db.RegisterMessage(SocketMessage)\n\nCSWebEnterRoom = _reflection.GeneratedProtocolMessageType('CSWebEnterRoom', (_message.Message,), {\n  'DESCRIPTOR' : _CSWEBENTERROOM,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.CSWebEnterRoom)\n  })\n_sym_db.RegisterMessage(CSWebEnterRoom)\n\nSCWebFeedPush = _reflection.GeneratedProtocolMessageType('SCWebFeedPush', (_message.Message,), {\n  'DESCRIPTOR' : _SCWEBFEEDPUSH,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.SCWebFeedPush)\n  })\n_sym_db.RegisterMessage(SCWebFeedPush)\n\nWebCommentFeed = _reflection.GeneratedProtocolMessageType('WebCommentFeed', (_message.Message,), {\n  'DESCRIPTOR' : _WEBCOMMENTFEED,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.WebCommentFeed)\n  })\n_sym_db.RegisterMessage(WebCommentFeed)\n\nSimpleUserInfo = _reflection.GeneratedProtocolMessageType('SimpleUserInfo', (_message.Message,), {\n  'DESCRIPTOR' : _SIMPLEUSERINFO,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.SimpleUserInfo)\n  })\n_sym_db.RegisterMessage(SimpleUserInfo)\n\nWebComboCommentFeed = _reflection.GeneratedProtocolMessageType('WebComboCommentFeed', (_message.Message,), {\n  'DESCRIPTOR' : _WEBCOMBOCOMMENTFEED,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.WebComboCommentFeed)\n  })\n_sym_db.RegisterMessage(WebComboCommentFeed)\n\nWebLikeFeed = _reflection.GeneratedProtocolMessageType('WebLikeFeed', (_message.Message,), {\n  'DESCRIPTOR' : _WEBLIKEFEED,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.WebLikeFeed)\n  })\n_sym_db.RegisterMessage(WebLikeFeed)\n\nWebGiftFeed = _reflection.GeneratedProtocolMessageType('WebGiftFeed', (_message.Message,), {\n  'DESCRIPTOR' : _WEBGIFTFEED,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.WebGiftFeed)\n  })\n_sym_db.RegisterMessage(WebGiftFeed)\n\nWebSystemNoticeFeed = _reflection.GeneratedProtocolMessageType('WebSystemNoticeFeed', (_message.Message,), {\n  'DESCRIPTOR' : _WEBSYSTEMNOTICEFEED,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.WebSystemNoticeFeed)\n  })\n_sym_db.RegisterMessage(WebSystemNoticeFeed)\n\nWebShareFeed = _reflection.GeneratedProtocolMessageType('WebShareFeed', (_message.Message,), {\n  'DESCRIPTOR' : _WEBSHAREFEED,\n  '__module__' : 'kuaishou_pb2'\n  # @@protoc_insertion_point(class_scope:KuaiShouPack.WebShareFeed)\n  })\n_sym_db.RegisterMessage(WebShareFeed)\n\n\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "danmu/danmaku/kugou.proto",
    "content": "syntax = \"proto2\";\npackage KuGouPack;\n\nmessage LoginRequest {\n    optional int32 cmd = 1;\n    optional int32 roomid = 2;\n    optional int64 kugouid = 3;\n    optional string token = 4;\n    optional string key = 5;\n    optional int32 appid = 6;\n    optional int32 platid = 7;\n    optional int32 subplatid = 8;\n    optional string version = 9;\n    optional string deviceNo = 10;\n    optional string imei = 11;\n    optional int32 v = 12;\n    optional int32 referer = 13;\n    optional int32 clientid = 14;\n    optional string soctoken = 15;\n    optional string offset = 16;\n    optional int32 appChannel = 17;\n    optional string sid = 18;\n    optional int32 source = 19;\n    optional string uuid = 20;\n    optional string systemVersion = 21;\n    optional string entryid = 22;\n    optional string socsid = 23;\n    optional string deviceid = 24;\n}\n\nmessage LoginResponse {\n    optional string nickname = 1;\n    optional int32 richlevel = 2;\n    optional int64 userid = 3;\n    optional int64 kugouid = 4;\n    optional int32 fanstags = 5;\n    optional int32 v = 6;\n    optional int32 referer = 7;\n    optional string wellcomes = 8;\n    optional string img = 9;\n}\n\nmessage ErrorResponse {\n\toptional int32 cmd = 1;\n\toptional int32 type = 2;\n\toptional int64 seq = 3;\n\toptional int32 status = 4;\n\toptional int32 errorno = 5;\n\toptional string msg = 6;\n\toptional string socsid = 7;\n}\n\nmessage ChatResponse {\n\toptional string chatmsg = 1;\n\toptional int64 senderid = 2;\n\toptional int64 senderkugouid = 3;\n\toptional string sendername = 4;\n\toptional int32 senderrichlevel = 5;\n\toptional int64 receiverid = 6;\n\toptional int64 receiverkugouid = 7;\n\toptional string receivername = 8;\n\toptional int32 receiverrichlevel = 9;\n\toptional int32 issecrect = 10;\n\toptional AdditionalInfo additionalInfo = 11;\n\toptional int32 v = 12;\n\toptional int64 seq = 13;\n\toptional int32 isa = 14;\n\toptional int32 rlight = 15;\n\toptional int32 rdiffExp = 16;\n\toptional int32 rsvip = 17;\n\toptional int32 rsvipl = 18;\n\toptional string mac = 19;\n\toptional Complain complain = 20;\n}\n\nmessage AdditionalInfo {\n\toptional int32 fanstags = 1;\n}\n\nmessage Complain {\n\toptional string msg = 1;\n\toptional string url = 2;\n}\n\nmessage Message {\n    optional string offset = 1;\n    optional int32 ack = 2;\n    optional int32 rpt = 3;\n    optional string msgId = 4;\n    optional MCompression compression = 5;\n    optional MCodec codec = 6;\n    optional bytes content = 7;\n}\n\nmessage ContentMessage {\n    optional int32 cmd = 1;\n    optional bytes content = 2;\n    optional int32 roomid = 3;\n    optional int64 receiverid = 4;\n    optional int64 receiverkugouid = 5;\n    optional int64 senderid = 6;\n    optional int64 sendkugouid = 7;\n    optional int32 appId = 8;\n    optional int64 gid = 9;\n    optional int32 rpt = 10;\n    optional int64 time = 11;\n    optional int64 plev = 12;\n    optional int64 pvalue = 13;\n    optional bytes ext = 14;\n    optional Sinfo sinfo = 15;\n    optional MCodec codec = 16;\n    optional Risk risk = 17;\n}\n\nmessage Risk {\n    optional string m = 1;\n    optional string l = 2;\n    optional int32 t = 3;\n}\n\nmessage Sinfo {\n    optional int32 light = 1;\n    optional int32 de = 2;\n    optional int32 svip = 3;\n    optional int32 svipl = 4;\n    optional int32 ck = 5;\n    optional string ckname = 6;\n    optional string skname = 7;\n    optional string ckid = 8;\n    optional string ckimg = 9;\n    optional string logo = 10;\n    optional int32 sex = 11;\n    optional int32 bt = 12;\n}\n\nenum MCompression {\n    M_NONE = 0;\n    M_GZIP = 1;\n\tM_LZ4 = 2;\n    M_SNAPPY = 3;\n\tM_ZSTD = 4;\n}\n\nenum MCodec {\n    M_JSON = 0;\n    M_PROTOBUF = 1;\n}\n\nmessage Extension {\n    optional int32 ui = 1;\n    optional int32 isSpRoom = 2;\n    optional StliVo stli = 3;\n    optional VipDataVo vipData = 4;\n    optional UsingMountVo usingMount = 5;\n    optional UsingMedalVo usingMedal = 6;\n    optional HonorMedalVo honorMedal = 7;\n    optional UserGuardVo userGuard = 8;\n    optional LittleGuardVo littleGuard = 9;\n    optional WoreUserPlateVo defaultPlate = 10;\n    optional string plateName = 11;\n    optional int32 starCard = 12;\n    optional int32 external = 13;\n    optional string exMemo = 14;\n    optional bool p = 15;\n    optional int32 worship = 16;\n    optional BubbleVo bubble = 17;\n    optional int32 z = 18;\n    optional int32 isGoldFans = 19;\n    optional string token = 20;\n    optional int64 kugouId = 21;\n    optional StarFollowerVo starFollower = 22;\n    optional int32 v_tme = 23;\n    optional int32 v_kg = 24;\n    optional string ar = 25;\n    optional int32 isAndroid = 26;\n    optional int32 clientPlat = 27;\n    optional int32 blackCard = 28;\n    optional int32 v_l = 29;\n    optional BossGroupVo bossGroup = 30;\n    optional CeremonyVo ceremony = 31;\n    optional int32 referer = 32;\n    optional int32 isNew = 33;\n}\n\nmessage StliVo {\n    optional int32 st = 1;\n    optional int32 sl = 2;\n    optional int32 isAdmin = 3;\n}\n\nmessage VipDataVo {\n    optional int32 v = 1;\n    optional string c = 2;\n    optional int32 vl = 3;\n}\n\nmessage UsingMountVo {\n    optional string id = 1;\n    optional string n = 2;\n    optional string swf = 3;\n    optional string bi = 4;\n    optional string si = 5;\n    optional string p = 6;\n    optional int32 s = 7;\n}\n\nmessage UsingMedalVo {\n    optional string medalList = 1;\n}\n\nmessage HonorMedalVo {\n    optional string honorList = 1;\n}\n\nmessage UserGuardVo {\n    optional string g = 1;\n    optional string i = 2;\n}\n\nmessage LittleGuardVo {\n    optional int32 l = 1;\n    optional int32 g = 2;\n}\n\nmessage WoreUserPlateVo {\n    optional int64 kid = 1;\n    optional string plateName = 2;\n    optional int32 type = 3;\n    optional int32 l = 4;\n    optional int32 i = 5;\n}\n\nmessage BubbleVo {\n    optional int32 id = 1;\n    optional string bg = 2;\n}\n\nmessage StarFollowerVo {\n    optional int32 l = 1;\n}\n\nmessage BossGroupVo {\n    optional int64 gid = 1;\n\toptional string gn = 2;\n\toptional int32 gr = 3;\n}\n\nmessage CeremonyVo {\n    optional int32 pl = 1;\n}"
  },
  {
    "path": "danmu/danmaku/kugou.py",
    "content": "from . import kugou_pb2 as pb\nimport struct\nimport requests\n\n\nclass InitKugou:\n\n    def __init__(self):\n        self.MAGIC = {\n            'index': 0,\n            'length': 1,\n            'value': 100\n        }\n        self.VERSION = {\n            'index': 1,\n            'length': 2,\n            'value': 1\n        }\n        self.TYPE = {\n            'index': 2,\n            'length': 1,\n            'value': 1\n        }\n        self.HEADER = {\n            'index': 3,\n            'length': 2,\n            'value': 12\n        }\n        self.CMD = {\n            'index': 4,\n            'length': 4,\n            'value': 0\n        }\n        self.PAYLOAD = {\n            'index': 5,\n            'length': 4,\n            'value': 0\n        }\n        self.ATTR = {\n            'index': 6,\n            'length': 1,\n            'value': 0\n        }\n        self.CRC = {\n            'index': 7,\n            'length': 2,\n            'value': 0\n        }\n        self.SKIP = {\n            'index': 8,\n            'length': 1,\n            'value': 0\n        }\n\n        self.f = [self.MAGIC, self.VERSION, self.TYPE, self.HEADER,\n                  self.CMD, self.PAYLOAD, self.ATTR, self.CRC, self.SKIP]\n\n    def reg(self, rid):\n        url = 'https://fx2.service.kugou.com/socket_scheduler/pc/v2/address.jsonp'\n        payload = {\n            'rid': rid,\n            '_v': '7.0.0',\n            '_p': 0,\n            'pv': 20191231,\n            'at': 102,\n            'cid': 105\n        }\n\n        with requests.Session() as s:\n            r = s.get(url, params=payload).json()\n            soctoken = r['data']['soctoken']\n\n        reg_data = {\n            'appid': 1010,\n            'clientid': 105,\n            'cmd': 201,\n            'deviceNo': '4edc0e89-ccaf-452c-bce4-00f4cb6bb5bb',\n            'kugouid': 0,\n            'platid': 18,\n            'referer': 0,\n            'roomid': rid,\n            'sid': '8b9b79a7-a742-4397-fcc0-94efa3a1c920',\n            'soctoken': soctoken,\n            'v': 20191231\n        }\n\n        a = pb.LoginRequest()\n        for k, v in reg_data.items():\n            setattr(a, k, v)\n        b = pb.Message()\n        b.content = a.SerializeToString()\n        e = b.SerializeToString()\n        reg = self.encode_(e, reg_data['cmd'])\n        return reg\n\n    def g(self, *e):\n        if len(e) > 1 and e[1]:\n            t = e[1]\n        else:\n            t = 12\n        n = 0\n        i = 0\n        e = e[0]\n        while i < e and i < len(self.f):\n            n += self.f[i]['length']\n            i += 1\n        if e == len(self.f):\n            return n + t - 12\n        else:\n            return n\n\n    def encode_(self, e, t):\n        n = len(self.f)\n        i = len(e)\n        # r = self.g(n) + i\n        self.PAYLOAD['value'] = i\n        self.CMD['value'] = t\n\n        buf = b''\n        for s in self.f:\n            # offset = self.g(s['index'])\n            value = s['value']\n            if s['length'] == 1:\n                fmt = '!b'\n            elif s['length'] == 2:\n                fmt = '!h'\n            else:\n                fmt = '!i'\n            buf += struct.pack(fmt, value)\n\n        buf += struct.pack('!i', i)\n        buf = buf[:self.g(n)] + e\n        return buf\n\n    def v(self, e, t):\n        if t['length'] == 1:\n            fmt = '!b'\n        elif t['length'] == 2:\n            fmt = '!h'\n        else:\n            fmt = '!i'\n        r, = struct.unpack_from(fmt, e, self.g(t['index']))\n        return r\n\n    # def k(self, e, i, o=False):\n    #     if i == 1:\n    #         a = zlib.decompress(e)\n    #     elif i == 2:\n    #         a = zlib.decompress(e)\n    #     else:\n    #         a = e\n    #     if o:\n    #         return self.r(a)\n    #     else:\n    #         return a\n    #\n    # def r(self, e):\n    #     pass\n\n    def decode_(self, message):\n        t = len(message)\n        n = len(self.f)\n\n        if t <= 0:\n            return {}\n\n        if self.v(message, self.TYPE) == 0:\n            return {}\n\n        r = self.v(message, self.HEADER)\n        cmd = self.v(message, self.CMD)  # cmd\n        a = self.g(n, r)\n\n        if t < a:\n            return {}\n\n        o = message[a:]  # payloadBuffer\n\n        if not o or not cmd:\n            return\n\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        if cmd == 201 or cmd == 501:\n            # CMD\n            # 201:LoginResponse,欢迎信息;\n            # 501:ChatResponse,聊天信息;\n            # 602:ContentMessage,礼物信息；\n            # 901:ErrorResponse;\n            s = pb.Message()\n            s.ParseFromString(o)\n            if s.codec == 1:\n                # if s.compression:\n                #     s.content = self.k(s.content, s.compression)\n                s1 = pb.ContentMessage()\n                s1.ParseFromString(s.content)\n                if s1.codec == 1:\n                    # if hasattr(s1, 'compression'):\n                    #     s1.content = self.k(s1.content, s1.compression)\n                    s2 = pb.ChatResponse()\n                    s2.ParseFromString(s1.content)\n                    if cmd == 201:\n                        msg['name'] = 'SYS'\n                        msg['content'] = s2.receivername.replace('%nick', s2.chatmsg)\n                        msg['msg_type'] = 'danmaku'\n                    elif cmd == 501:\n                        msg['name'] = s2.sendername\n                        msg['content'] = s2.chatmsg\n                        msg['msg_type'] = 'danmaku'\n        msgs.append(msg.copy())\n        return msgs\n\n\nclass KuGou:\n    heartbeat = b'\\x64\\x00\\x01\\x00'\n    wss_url = 'wss://chat1wss.kugou.com/acksocket'\n    heartbeatInterval = 10\n    s = InitKugou()\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('/')[-1]\n        reg_data = KuGou.s.reg(int(rid))\n        return KuGou.wss_url, [reg_data]\n\n    @staticmethod\n    def decode_msg(data):\n        msgs = KuGou.s.decode_(data)\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/kugou_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# source: kugou.proto\n\nfrom google.protobuf.internal import enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom google.protobuf import reflection as _reflection\nfrom google.protobuf import symbol_database as _symbol_database\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor.FileDescriptor(\n  name='kugou.proto',\n  package='KuGouPack',\n  syntax='proto2',\n  serialized_options=None,\n  create_key=_descriptor._internal_create_key,\n  serialized_pb=b'\\n\\x0bkugou.proto\\x12\\tKuGouPack\\\"\\x94\\x03\\n\\x0cLoginRequest\\x12\\x0b\\n\\x03\\x63md\\x18\\x01 \\x01(\\x05\\x12\\x0e\\n\\x06roomid\\x18\\x02 \\x01(\\x05\\x12\\x0f\\n\\x07kugouid\\x18\\x03 \\x01(\\x03\\x12\\r\\n\\x05token\\x18\\x04 \\x01(\\t\\x12\\x0b\\n\\x03key\\x18\\x05 \\x01(\\t\\x12\\r\\n\\x05\\x61ppid\\x18\\x06 \\x01(\\x05\\x12\\x0e\\n\\x06platid\\x18\\x07 \\x01(\\x05\\x12\\x11\\n\\tsubplatid\\x18\\x08 \\x01(\\x05\\x12\\x0f\\n\\x07version\\x18\\t \\x01(\\t\\x12\\x10\\n\\x08\\x64\\x65viceNo\\x18\\n \\x01(\\t\\x12\\x0c\\n\\x04imei\\x18\\x0b \\x01(\\t\\x12\\t\\n\\x01v\\x18\\x0c \\x01(\\x05\\x12\\x0f\\n\\x07referer\\x18\\r \\x01(\\x05\\x12\\x10\\n\\x08\\x63lientid\\x18\\x0e \\x01(\\x05\\x12\\x10\\n\\x08soctoken\\x18\\x0f \\x01(\\t\\x12\\x0e\\n\\x06offset\\x18\\x10 \\x01(\\t\\x12\\x12\\n\\nappChannel\\x18\\x11 \\x01(\\x05\\x12\\x0b\\n\\x03sid\\x18\\x12 \\x01(\\t\\x12\\x0e\\n\\x06source\\x18\\x13 \\x01(\\x05\\x12\\x0c\\n\\x04uuid\\x18\\x14 \\x01(\\t\\x12\\x15\\n\\rsystemVersion\\x18\\x15 \\x01(\\t\\x12\\x0f\\n\\x07\\x65ntryid\\x18\\x16 \\x01(\\t\\x12\\x0e\\n\\x06socsid\\x18\\x17 \\x01(\\t\\x12\\x10\\n\\x08\\x64\\x65viceid\\x18\\x18 \\x01(\\t\\\"\\xa3\\x01\\n\\rLoginResponse\\x12\\x10\\n\\x08nickname\\x18\\x01 \\x01(\\t\\x12\\x11\\n\\trichlevel\\x18\\x02 \\x01(\\x05\\x12\\x0e\\n\\x06userid\\x18\\x03 \\x01(\\x03\\x12\\x0f\\n\\x07kugouid\\x18\\x04 \\x01(\\x03\\x12\\x10\\n\\x08\\x66\\x61nstags\\x18\\x05 \\x01(\\x05\\x12\\t\\n\\x01v\\x18\\x06 \\x01(\\x05\\x12\\x0f\\n\\x07referer\\x18\\x07 \\x01(\\x05\\x12\\x11\\n\\twellcomes\\x18\\x08 \\x01(\\t\\x12\\x0b\\n\\x03img\\x18\\t \\x01(\\t\\\"u\\n\\rErrorResponse\\x12\\x0b\\n\\x03\\x63md\\x18\\x01 \\x01(\\x05\\x12\\x0c\\n\\x04type\\x18\\x02 \\x01(\\x05\\x12\\x0b\\n\\x03seq\\x18\\x03 \\x01(\\x03\\x12\\x0e\\n\\x06status\\x18\\x04 \\x01(\\x05\\x12\\x0f\\n\\x07\\x65rrorno\\x18\\x05 \\x01(\\x05\\x12\\x0b\\n\\x03msg\\x18\\x06 \\x01(\\t\\x12\\x0e\\n\\x06socsid\\x18\\x07 \\x01(\\t\\\"\\xb3\\x03\\n\\x0c\\x43hatResponse\\x12\\x0f\\n\\x07\\x63hatmsg\\x18\\x01 \\x01(\\t\\x12\\x10\\n\\x08senderid\\x18\\x02 \\x01(\\x03\\x12\\x15\\n\\rsenderkugouid\\x18\\x03 \\x01(\\x03\\x12\\x12\\n\\nsendername\\x18\\x04 \\x01(\\t\\x12\\x17\\n\\x0fsenderrichlevel\\x18\\x05 \\x01(\\x05\\x12\\x12\\n\\nreceiverid\\x18\\x06 \\x01(\\x03\\x12\\x17\\n\\x0freceiverkugouid\\x18\\x07 \\x01(\\x03\\x12\\x14\\n\\x0creceivername\\x18\\x08 \\x01(\\t\\x12\\x19\\n\\x11receiverrichlevel\\x18\\t \\x01(\\x05\\x12\\x11\\n\\tissecrect\\x18\\n \\x01(\\x05\\x12\\x31\\n\\x0e\\x61\\x64\\x64itionalInfo\\x18\\x0b \\x01(\\x0b\\x32\\x19.KuGouPack.AdditionalInfo\\x12\\t\\n\\x01v\\x18\\x0c \\x01(\\x05\\x12\\x0b\\n\\x03seq\\x18\\r \\x01(\\x03\\x12\\x0b\\n\\x03isa\\x18\\x0e \\x01(\\x05\\x12\\x0e\\n\\x06rlight\\x18\\x0f \\x01(\\x05\\x12\\x10\\n\\x08rdiffExp\\x18\\x10 \\x01(\\x05\\x12\\r\\n\\x05rsvip\\x18\\x11 \\x01(\\x05\\x12\\x0e\\n\\x06rsvipl\\x18\\x12 \\x01(\\x05\\x12\\x0b\\n\\x03mac\\x18\\x13 \\x01(\\t\\x12%\\n\\x08\\x63omplain\\x18\\x14 \\x01(\\x0b\\x32\\x13.KuGouPack.Complain\\\"\\\"\\n\\x0e\\x41\\x64\\x64itionalInfo\\x12\\x10\\n\\x08\\x66\\x61nstags\\x18\\x01 \\x01(\\x05\\\"$\\n\\x08\\x43omplain\\x12\\x0b\\n\\x03msg\\x18\\x01 \\x01(\\t\\x12\\x0b\\n\\x03url\\x18\\x02 \\x01(\\t\\\"\\xa3\\x01\\n\\x07Message\\x12\\x0e\\n\\x06offset\\x18\\x01 \\x01(\\t\\x12\\x0b\\n\\x03\\x61\\x63k\\x18\\x02 \\x01(\\x05\\x12\\x0b\\n\\x03rpt\\x18\\x03 \\x01(\\x05\\x12\\r\\n\\x05msgId\\x18\\x04 \\x01(\\t\\x12,\\n\\x0b\\x63ompression\\x18\\x05 \\x01(\\x0e\\x32\\x17.KuGouPack.MCompression\\x12 \\n\\x05\\x63odec\\x18\\x06 \\x01(\\x0e\\x32\\x11.KuGouPack.MCodec\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x07 \\x01(\\x0c\\\"\\xd6\\x02\\n\\x0e\\x43ontentMessage\\x12\\x0b\\n\\x03\\x63md\\x18\\x01 \\x01(\\x05\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x02 \\x01(\\x0c\\x12\\x0e\\n\\x06roomid\\x18\\x03 \\x01(\\x05\\x12\\x12\\n\\nreceiverid\\x18\\x04 \\x01(\\x03\\x12\\x17\\n\\x0freceiverkugouid\\x18\\x05 \\x01(\\x03\\x12\\x10\\n\\x08senderid\\x18\\x06 \\x01(\\x03\\x12\\x13\\n\\x0bsendkugouid\\x18\\x07 \\x01(\\x03\\x12\\r\\n\\x05\\x61ppId\\x18\\x08 \\x01(\\x05\\x12\\x0b\\n\\x03gid\\x18\\t \\x01(\\x03\\x12\\x0b\\n\\x03rpt\\x18\\n \\x01(\\x05\\x12\\x0c\\n\\x04time\\x18\\x0b \\x01(\\x03\\x12\\x0c\\n\\x04plev\\x18\\x0c \\x01(\\x03\\x12\\x0e\\n\\x06pvalue\\x18\\r \\x01(\\x03\\x12\\x0b\\n\\x03\\x65xt\\x18\\x0e \\x01(\\x0c\\x12\\x1f\\n\\x05sinfo\\x18\\x0f \\x01(\\x0b\\x32\\x10.KuGouPack.Sinfo\\x12 \\n\\x05\\x63odec\\x18\\x10 \\x01(\\x0e\\x32\\x11.KuGouPack.MCodec\\x12\\x1d\\n\\x04risk\\x18\\x11 \\x01(\\x0b\\x32\\x0f.KuGouPack.Risk\\\"\\'\\n\\x04Risk\\x12\\t\\n\\x01m\\x18\\x01 \\x01(\\t\\x12\\t\\n\\x01l\\x18\\x02 \\x01(\\t\\x12\\t\\n\\x01t\\x18\\x03 \\x01(\\x05\\\"\\xaf\\x01\\n\\x05Sinfo\\x12\\r\\n\\x05light\\x18\\x01 \\x01(\\x05\\x12\\n\\n\\x02\\x64\\x65\\x18\\x02 \\x01(\\x05\\x12\\x0c\\n\\x04svip\\x18\\x03 \\x01(\\x05\\x12\\r\\n\\x05svipl\\x18\\x04 \\x01(\\x05\\x12\\n\\n\\x02\\x63k\\x18\\x05 \\x01(\\x05\\x12\\x0e\\n\\x06\\x63kname\\x18\\x06 \\x01(\\t\\x12\\x0e\\n\\x06skname\\x18\\x07 \\x01(\\t\\x12\\x0c\\n\\x04\\x63kid\\x18\\x08 \\x01(\\t\\x12\\r\\n\\x05\\x63kimg\\x18\\t \\x01(\\t\\x12\\x0c\\n\\x04logo\\x18\\n \\x01(\\t\\x12\\x0b\\n\\x03sex\\x18\\x0b \\x01(\\x05\\x12\\n\\n\\x02\\x62t\\x18\\x0c \\x01(\\x05\\\"\\xe0\\x06\\n\\tExtension\\x12\\n\\n\\x02ui\\x18\\x01 \\x01(\\x05\\x12\\x10\\n\\x08isSpRoom\\x18\\x02 \\x01(\\x05\\x12\\x1f\\n\\x04stli\\x18\\x03 \\x01(\\x0b\\x32\\x11.KuGouPack.StliVo\\x12%\\n\\x07vipData\\x18\\x04 \\x01(\\x0b\\x32\\x14.KuGouPack.VipDataVo\\x12+\\n\\nusingMount\\x18\\x05 \\x01(\\x0b\\x32\\x17.KuGouPack.UsingMountVo\\x12+\\n\\nusingMedal\\x18\\x06 \\x01(\\x0b\\x32\\x17.KuGouPack.UsingMedalVo\\x12+\\n\\nhonorMedal\\x18\\x07 \\x01(\\x0b\\x32\\x17.KuGouPack.HonorMedalVo\\x12)\\n\\tuserGuard\\x18\\x08 \\x01(\\x0b\\x32\\x16.KuGouPack.UserGuardVo\\x12-\\n\\x0blittleGuard\\x18\\t \\x01(\\x0b\\x32\\x18.KuGouPack.LittleGuardVo\\x12\\x30\\n\\x0c\\x64\\x65\\x66\\x61ultPlate\\x18\\n \\x01(\\x0b\\x32\\x1a.KuGouPack.WoreUserPlateVo\\x12\\x11\\n\\tplateName\\x18\\x0b \\x01(\\t\\x12\\x10\\n\\x08starCard\\x18\\x0c \\x01(\\x05\\x12\\x10\\n\\x08\\x65xternal\\x18\\r \\x01(\\x05\\x12\\x0e\\n\\x06\\x65xMemo\\x18\\x0e \\x01(\\t\\x12\\t\\n\\x01p\\x18\\x0f \\x01(\\x08\\x12\\x0f\\n\\x07worship\\x18\\x10 \\x01(\\x05\\x12#\\n\\x06\\x62ubble\\x18\\x11 \\x01(\\x0b\\x32\\x13.KuGouPack.BubbleVo\\x12\\t\\n\\x01z\\x18\\x12 \\x01(\\x05\\x12\\x12\\n\\nisGoldFans\\x18\\x13 \\x01(\\x05\\x12\\r\\n\\x05token\\x18\\x14 \\x01(\\t\\x12\\x0f\\n\\x07kugouId\\x18\\x15 \\x01(\\x03\\x12/\\n\\x0cstarFollower\\x18\\x16 \\x01(\\x0b\\x32\\x19.KuGouPack.StarFollowerVo\\x12\\r\\n\\x05v_tme\\x18\\x17 \\x01(\\x05\\x12\\x0c\\n\\x04v_kg\\x18\\x18 \\x01(\\x05\\x12\\n\\n\\x02\\x61r\\x18\\x19 \\x01(\\t\\x12\\x11\\n\\tisAndroid\\x18\\x1a \\x01(\\x05\\x12\\x12\\n\\nclientPlat\\x18\\x1b \\x01(\\x05\\x12\\x11\\n\\tblackCard\\x18\\x1c \\x01(\\x05\\x12\\x0b\\n\\x03v_l\\x18\\x1d \\x01(\\x05\\x12)\\n\\tbossGroup\\x18\\x1e \\x01(\\x0b\\x32\\x16.KuGouPack.BossGroupVo\\x12\\'\\n\\x08\\x63\\x65remony\\x18\\x1f \\x01(\\x0b\\x32\\x15.KuGouPack.CeremonyVo\\x12\\x0f\\n\\x07referer\\x18  \\x01(\\x05\\x12\\r\\n\\x05isNew\\x18! \\x01(\\x05\\\"1\\n\\x06StliVo\\x12\\n\\n\\x02st\\x18\\x01 \\x01(\\x05\\x12\\n\\n\\x02sl\\x18\\x02 \\x01(\\x05\\x12\\x0f\\n\\x07isAdmin\\x18\\x03 \\x01(\\x05\\\"-\\n\\tVipDataVo\\x12\\t\\n\\x01v\\x18\\x01 \\x01(\\x05\\x12\\t\\n\\x01\\x63\\x18\\x02 \\x01(\\t\\x12\\n\\n\\x02vl\\x18\\x03 \\x01(\\x05\\\"`\\n\\x0cUsingMountVo\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\t\\x12\\t\\n\\x01n\\x18\\x02 \\x01(\\t\\x12\\x0b\\n\\x03swf\\x18\\x03 \\x01(\\t\\x12\\n\\n\\x02\\x62i\\x18\\x04 \\x01(\\t\\x12\\n\\n\\x02si\\x18\\x05 \\x01(\\t\\x12\\t\\n\\x01p\\x18\\x06 \\x01(\\t\\x12\\t\\n\\x01s\\x18\\x07 \\x01(\\x05\\\"!\\n\\x0cUsingMedalVo\\x12\\x11\\n\\tmedalList\\x18\\x01 \\x01(\\t\\\"!\\n\\x0cHonorMedalVo\\x12\\x11\\n\\thonorList\\x18\\x01 \\x01(\\t\\\"#\\n\\x0bUserGuardVo\\x12\\t\\n\\x01g\\x18\\x01 \\x01(\\t\\x12\\t\\n\\x01i\\x18\\x02 \\x01(\\t\\\"%\\n\\rLittleGuardVo\\x12\\t\\n\\x01l\\x18\\x01 \\x01(\\x05\\x12\\t\\n\\x01g\\x18\\x02 \\x01(\\x05\\\"U\\n\\x0fWoreUserPlateVo\\x12\\x0b\\n\\x03kid\\x18\\x01 \\x01(\\x03\\x12\\x11\\n\\tplateName\\x18\\x02 \\x01(\\t\\x12\\x0c\\n\\x04type\\x18\\x03 \\x01(\\x05\\x12\\t\\n\\x01l\\x18\\x04 \\x01(\\x05\\x12\\t\\n\\x01i\\x18\\x05 \\x01(\\x05\\\"\\\"\\n\\x08\\x42ubbleVo\\x12\\n\\n\\x02id\\x18\\x01 \\x01(\\x05\\x12\\n\\n\\x02\\x62g\\x18\\x02 \\x01(\\t\\\"\\x1b\\n\\x0eStarFollowerVo\\x12\\t\\n\\x01l\\x18\\x01 \\x01(\\x05\\\"2\\n\\x0b\\x42ossGroupVo\\x12\\x0b\\n\\x03gid\\x18\\x01 \\x01(\\x03\\x12\\n\\n\\x02gn\\x18\\x02 \\x01(\\t\\x12\\n\\n\\x02gr\\x18\\x03 \\x01(\\x05\\\"\\x18\\n\\nCeremonyVo\\x12\\n\\n\\x02pl\\x18\\x01 \\x01(\\x05*K\\n\\x0cMCompression\\x12\\n\\n\\x06M_NONE\\x10\\x00\\x12\\n\\n\\x06M_GZIP\\x10\\x01\\x12\\t\\n\\x05M_LZ4\\x10\\x02\\x12\\x0c\\n\\x08M_SNAPPY\\x10\\x03\\x12\\n\\n\\x06M_ZSTD\\x10\\x04*$\\n\\x06MCodec\\x12\\n\\n\\x06M_JSON\\x10\\x00\\x12\\x0e\\n\\nM_PROTOBUF\\x10\\x01'\n)\n\n_MCOMPRESSION = _descriptor.EnumDescriptor(\n  name='MCompression',\n  full_name='KuGouPack.MCompression',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='M_NONE', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='M_GZIP', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='M_LZ4', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='M_SNAPPY', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='M_ZSTD', index=4, number=4,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=3399,\n  serialized_end=3474,\n)\n_sym_db.RegisterEnumDescriptor(_MCOMPRESSION)\n\nMCompression = enum_type_wrapper.EnumTypeWrapper(_MCOMPRESSION)\n_MCODEC = _descriptor.EnumDescriptor(\n  name='MCodec',\n  full_name='KuGouPack.MCodec',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='M_JSON', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='M_PROTOBUF', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=3476,\n  serialized_end=3512,\n)\n_sym_db.RegisterEnumDescriptor(_MCODEC)\n\nMCodec = enum_type_wrapper.EnumTypeWrapper(_MCODEC)\nM_NONE = 0\nM_GZIP = 1\nM_LZ4 = 2\nM_SNAPPY = 3\nM_ZSTD = 4\nM_JSON = 0\nM_PROTOBUF = 1\n\n\n\n_LOGINREQUEST = _descriptor.Descriptor(\n  name='LoginRequest',\n  full_name='KuGouPack.LoginRequest',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='cmd', full_name='KuGouPack.LoginRequest.cmd', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='KuGouPack.LoginRequest.roomid', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kugouid', full_name='KuGouPack.LoginRequest.kugouid', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='token', full_name='KuGouPack.LoginRequest.token', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='key', full_name='KuGouPack.LoginRequest.key', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appid', full_name='KuGouPack.LoginRequest.appid', index=5,\n      number=6, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='platid', full_name='KuGouPack.LoginRequest.platid', index=6,\n      number=7, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='subplatid', full_name='KuGouPack.LoginRequest.subplatid', index=7,\n      number=8, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='version', full_name='KuGouPack.LoginRequest.version', index=8,\n      number=9, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceNo', full_name='KuGouPack.LoginRequest.deviceNo', index=9,\n      number=10, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='imei', full_name='KuGouPack.LoginRequest.imei', index=10,\n      number=11, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='v', full_name='KuGouPack.LoginRequest.v', index=11,\n      number=12, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='referer', full_name='KuGouPack.LoginRequest.referer', index=12,\n      number=13, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientid', full_name='KuGouPack.LoginRequest.clientid', index=13,\n      number=14, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='soctoken', full_name='KuGouPack.LoginRequest.soctoken', index=14,\n      number=15, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='offset', full_name='KuGouPack.LoginRequest.offset', index=15,\n      number=16, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appChannel', full_name='KuGouPack.LoginRequest.appChannel', index=16,\n      number=17, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sid', full_name='KuGouPack.LoginRequest.sid', index=17,\n      number=18, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='source', full_name='KuGouPack.LoginRequest.source', index=18,\n      number=19, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='KuGouPack.LoginRequest.uuid', index=19,\n      number=20, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='systemVersion', full_name='KuGouPack.LoginRequest.systemVersion', index=20,\n      number=21, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='entryid', full_name='KuGouPack.LoginRequest.entryid', index=21,\n      number=22, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='socsid', full_name='KuGouPack.LoginRequest.socsid', index=22,\n      number=23, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='deviceid', full_name='KuGouPack.LoginRequest.deviceid', index=23,\n      number=24, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=27,\n  serialized_end=431,\n)\n\n\n_LOGINRESPONSE = _descriptor.Descriptor(\n  name='LoginResponse',\n  full_name='KuGouPack.LoginResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='nickname', full_name='KuGouPack.LoginResponse.nickname', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='richlevel', full_name='KuGouPack.LoginResponse.richlevel', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userid', full_name='KuGouPack.LoginResponse.userid', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kugouid', full_name='KuGouPack.LoginResponse.kugouid', index=3,\n      number=4, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fanstags', full_name='KuGouPack.LoginResponse.fanstags', index=4,\n      number=5, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='v', full_name='KuGouPack.LoginResponse.v', index=5,\n      number=6, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='referer', full_name='KuGouPack.LoginResponse.referer', index=6,\n      number=7, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='wellcomes', full_name='KuGouPack.LoginResponse.wellcomes', index=7,\n      number=8, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='img', full_name='KuGouPack.LoginResponse.img', index=8,\n      number=9, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=434,\n  serialized_end=597,\n)\n\n\n_ERRORRESPONSE = _descriptor.Descriptor(\n  name='ErrorResponse',\n  full_name='KuGouPack.ErrorResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='cmd', full_name='KuGouPack.ErrorResponse.cmd', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='type', full_name='KuGouPack.ErrorResponse.type', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='seq', full_name='KuGouPack.ErrorResponse.seq', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='status', full_name='KuGouPack.ErrorResponse.status', index=3,\n      number=4, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='errorno', full_name='KuGouPack.ErrorResponse.errorno', index=4,\n      number=5, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='msg', full_name='KuGouPack.ErrorResponse.msg', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='socsid', full_name='KuGouPack.ErrorResponse.socsid', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=599,\n  serialized_end=716,\n)\n\n\n_CHATRESPONSE = _descriptor.Descriptor(\n  name='ChatResponse',\n  full_name='KuGouPack.ChatResponse',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='chatmsg', full_name='KuGouPack.ChatResponse.chatmsg', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='senderid', full_name='KuGouPack.ChatResponse.senderid', index=1,\n      number=2, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='senderkugouid', full_name='KuGouPack.ChatResponse.senderkugouid', index=2,\n      number=3, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendername', full_name='KuGouPack.ChatResponse.sendername', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='senderrichlevel', full_name='KuGouPack.ChatResponse.senderrichlevel', index=4,\n      number=5, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiverid', full_name='KuGouPack.ChatResponse.receiverid', index=5,\n      number=6, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiverkugouid', full_name='KuGouPack.ChatResponse.receiverkugouid', index=6,\n      number=7, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receivername', full_name='KuGouPack.ChatResponse.receivername', index=7,\n      number=8, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiverrichlevel', full_name='KuGouPack.ChatResponse.receiverrichlevel', index=8,\n      number=9, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='issecrect', full_name='KuGouPack.ChatResponse.issecrect', index=9,\n      number=10, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='additionalInfo', full_name='KuGouPack.ChatResponse.additionalInfo', index=10,\n      number=11, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='v', full_name='KuGouPack.ChatResponse.v', index=11,\n      number=12, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='seq', full_name='KuGouPack.ChatResponse.seq', index=12,\n      number=13, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isa', full_name='KuGouPack.ChatResponse.isa', index=13,\n      number=14, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rlight', full_name='KuGouPack.ChatResponse.rlight', index=14,\n      number=15, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rdiffExp', full_name='KuGouPack.ChatResponse.rdiffExp', index=15,\n      number=16, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rsvip', full_name='KuGouPack.ChatResponse.rsvip', index=16,\n      number=17, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rsvipl', full_name='KuGouPack.ChatResponse.rsvipl', index=17,\n      number=18, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='mac', full_name='KuGouPack.ChatResponse.mac', index=18,\n      number=19, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='complain', full_name='KuGouPack.ChatResponse.complain', index=19,\n      number=20, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=719,\n  serialized_end=1154,\n)\n\n\n_ADDITIONALINFO = _descriptor.Descriptor(\n  name='AdditionalInfo',\n  full_name='KuGouPack.AdditionalInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='fanstags', full_name='KuGouPack.AdditionalInfo.fanstags', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1156,\n  serialized_end=1190,\n)\n\n\n_COMPLAIN = _descriptor.Descriptor(\n  name='Complain',\n  full_name='KuGouPack.Complain',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='msg', full_name='KuGouPack.Complain.msg', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='url', full_name='KuGouPack.Complain.url', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1192,\n  serialized_end=1228,\n)\n\n\n_MESSAGE = _descriptor.Descriptor(\n  name='Message',\n  full_name='KuGouPack.Message',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='offset', full_name='KuGouPack.Message.offset', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ack', full_name='KuGouPack.Message.ack', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rpt', full_name='KuGouPack.Message.rpt', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='msgId', full_name='KuGouPack.Message.msgId', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='compression', full_name='KuGouPack.Message.compression', index=4,\n      number=5, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='codec', full_name='KuGouPack.Message.codec', index=5,\n      number=6, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='content', full_name='KuGouPack.Message.content', index=6,\n      number=7, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1231,\n  serialized_end=1394,\n)\n\n\n_CONTENTMESSAGE = _descriptor.Descriptor(\n  name='ContentMessage',\n  full_name='KuGouPack.ContentMessage',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='cmd', full_name='KuGouPack.ContentMessage.cmd', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='content', full_name='KuGouPack.ContentMessage.content', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='KuGouPack.ContentMessage.roomid', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiverid', full_name='KuGouPack.ContentMessage.receiverid', index=3,\n      number=4, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='receiverkugouid', full_name='KuGouPack.ContentMessage.receiverkugouid', index=4,\n      number=5, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='senderid', full_name='KuGouPack.ContentMessage.senderid', index=5,\n      number=6, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sendkugouid', full_name='KuGouPack.ContentMessage.sendkugouid', index=6,\n      number=7, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='appId', full_name='KuGouPack.ContentMessage.appId', index=7,\n      number=8, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gid', full_name='KuGouPack.ContentMessage.gid', index=8,\n      number=9, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rpt', full_name='KuGouPack.ContentMessage.rpt', index=9,\n      number=10, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='time', full_name='KuGouPack.ContentMessage.time', index=10,\n      number=11, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='plev', full_name='KuGouPack.ContentMessage.plev', index=11,\n      number=12, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='pvalue', full_name='KuGouPack.ContentMessage.pvalue', index=12,\n      number=13, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ext', full_name='KuGouPack.ContentMessage.ext', index=13,\n      number=14, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sinfo', full_name='KuGouPack.ContentMessage.sinfo', index=14,\n      number=15, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='codec', full_name='KuGouPack.ContentMessage.codec', index=15,\n      number=16, type=14, cpp_type=8, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='risk', full_name='KuGouPack.ContentMessage.risk', index=16,\n      number=17, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1397,\n  serialized_end=1739,\n)\n\n\n_RISK = _descriptor.Descriptor(\n  name='Risk',\n  full_name='KuGouPack.Risk',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='m', full_name='KuGouPack.Risk.m', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='l', full_name='KuGouPack.Risk.l', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='t', full_name='KuGouPack.Risk.t', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1741,\n  serialized_end=1780,\n)\n\n\n_SINFO = _descriptor.Descriptor(\n  name='Sinfo',\n  full_name='KuGouPack.Sinfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='light', full_name='KuGouPack.Sinfo.light', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='de', full_name='KuGouPack.Sinfo.de', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='svip', full_name='KuGouPack.Sinfo.svip', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='svipl', full_name='KuGouPack.Sinfo.svipl', index=3,\n      number=4, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ck', full_name='KuGouPack.Sinfo.ck', index=4,\n      number=5, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ckname', full_name='KuGouPack.Sinfo.ckname', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='skname', full_name='KuGouPack.Sinfo.skname', index=6,\n      number=7, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ckid', full_name='KuGouPack.Sinfo.ckid', index=7,\n      number=8, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ckimg', full_name='KuGouPack.Sinfo.ckimg', index=8,\n      number=9, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='logo', full_name='KuGouPack.Sinfo.logo', index=9,\n      number=10, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sex', full_name='KuGouPack.Sinfo.sex', index=10,\n      number=11, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='bt', full_name='KuGouPack.Sinfo.bt', index=11,\n      number=12, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1783,\n  serialized_end=1958,\n)\n\n\n_EXTENSION = _descriptor.Descriptor(\n  name='Extension',\n  full_name='KuGouPack.Extension',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='ui', full_name='KuGouPack.Extension.ui', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isSpRoom', full_name='KuGouPack.Extension.isSpRoom', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='stli', full_name='KuGouPack.Extension.stli', index=2,\n      number=3, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='vipData', full_name='KuGouPack.Extension.vipData', index=3,\n      number=4, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='usingMount', full_name='KuGouPack.Extension.usingMount', index=4,\n      number=5, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='usingMedal', full_name='KuGouPack.Extension.usingMedal', index=5,\n      number=6, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='honorMedal', full_name='KuGouPack.Extension.honorMedal', index=6,\n      number=7, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userGuard', full_name='KuGouPack.Extension.userGuard', index=7,\n      number=8, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='littleGuard', full_name='KuGouPack.Extension.littleGuard', index=8,\n      number=9, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='defaultPlate', full_name='KuGouPack.Extension.defaultPlate', index=9,\n      number=10, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='plateName', full_name='KuGouPack.Extension.plateName', index=10,\n      number=11, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='starCard', full_name='KuGouPack.Extension.starCard', index=11,\n      number=12, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='external', full_name='KuGouPack.Extension.external', index=12,\n      number=13, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='exMemo', full_name='KuGouPack.Extension.exMemo', index=13,\n      number=14, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='p', full_name='KuGouPack.Extension.p', index=14,\n      number=15, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='worship', full_name='KuGouPack.Extension.worship', index=15,\n      number=16, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='bubble', full_name='KuGouPack.Extension.bubble', index=16,\n      number=17, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='z', full_name='KuGouPack.Extension.z', index=17,\n      number=18, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isGoldFans', full_name='KuGouPack.Extension.isGoldFans', index=18,\n      number=19, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='token', full_name='KuGouPack.Extension.token', index=19,\n      number=20, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='kugouId', full_name='KuGouPack.Extension.kugouId', index=20,\n      number=21, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='starFollower', full_name='KuGouPack.Extension.starFollower', index=21,\n      number=22, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='v_tme', full_name='KuGouPack.Extension.v_tme', index=22,\n      number=23, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='v_kg', full_name='KuGouPack.Extension.v_kg', index=23,\n      number=24, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ar', full_name='KuGouPack.Extension.ar', index=24,\n      number=25, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isAndroid', full_name='KuGouPack.Extension.isAndroid', index=25,\n      number=26, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientPlat', full_name='KuGouPack.Extension.clientPlat', index=26,\n      number=27, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='blackCard', full_name='KuGouPack.Extension.blackCard', index=27,\n      number=28, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='v_l', full_name='KuGouPack.Extension.v_l', index=28,\n      number=29, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='bossGroup', full_name='KuGouPack.Extension.bossGroup', index=29,\n      number=30, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ceremony', full_name='KuGouPack.Extension.ceremony', index=30,\n      number=31, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='referer', full_name='KuGouPack.Extension.referer', index=31,\n      number=32, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isNew', full_name='KuGouPack.Extension.isNew', index=32,\n      number=33, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1961,\n  serialized_end=2825,\n)\n\n\n_STLIVO = _descriptor.Descriptor(\n  name='StliVo',\n  full_name='KuGouPack.StliVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='st', full_name='KuGouPack.StliVo.st', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sl', full_name='KuGouPack.StliVo.sl', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isAdmin', full_name='KuGouPack.StliVo.isAdmin', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2827,\n  serialized_end=2876,\n)\n\n\n_VIPDATAVO = _descriptor.Descriptor(\n  name='VipDataVo',\n  full_name='KuGouPack.VipDataVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='v', full_name='KuGouPack.VipDataVo.v', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='c', full_name='KuGouPack.VipDataVo.c', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='vl', full_name='KuGouPack.VipDataVo.vl', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2878,\n  serialized_end=2923,\n)\n\n\n_USINGMOUNTVO = _descriptor.Descriptor(\n  name='UsingMountVo',\n  full_name='KuGouPack.UsingMountVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuGouPack.UsingMountVo.id', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='n', full_name='KuGouPack.UsingMountVo.n', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='swf', full_name='KuGouPack.UsingMountVo.swf', index=2,\n      number=3, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='bi', full_name='KuGouPack.UsingMountVo.bi', index=3,\n      number=4, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='si', full_name='KuGouPack.UsingMountVo.si', index=4,\n      number=5, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='p', full_name='KuGouPack.UsingMountVo.p', index=5,\n      number=6, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='s', full_name='KuGouPack.UsingMountVo.s', index=6,\n      number=7, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=2925,\n  serialized_end=3021,\n)\n\n\n_USINGMEDALVO = _descriptor.Descriptor(\n  name='UsingMedalVo',\n  full_name='KuGouPack.UsingMedalVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='medalList', full_name='KuGouPack.UsingMedalVo.medalList', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3023,\n  serialized_end=3056,\n)\n\n\n_HONORMEDALVO = _descriptor.Descriptor(\n  name='HonorMedalVo',\n  full_name='KuGouPack.HonorMedalVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='honorList', full_name='KuGouPack.HonorMedalVo.honorList', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3058,\n  serialized_end=3091,\n)\n\n\n_USERGUARDVO = _descriptor.Descriptor(\n  name='UserGuardVo',\n  full_name='KuGouPack.UserGuardVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='g', full_name='KuGouPack.UserGuardVo.g', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='i', full_name='KuGouPack.UserGuardVo.i', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3093,\n  serialized_end=3128,\n)\n\n\n_LITTLEGUARDVO = _descriptor.Descriptor(\n  name='LittleGuardVo',\n  full_name='KuGouPack.LittleGuardVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='l', full_name='KuGouPack.LittleGuardVo.l', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='g', full_name='KuGouPack.LittleGuardVo.g', index=1,\n      number=2, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3130,\n  serialized_end=3167,\n)\n\n\n_WOREUSERPLATEVO = _descriptor.Descriptor(\n  name='WoreUserPlateVo',\n  full_name='KuGouPack.WoreUserPlateVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='kid', full_name='KuGouPack.WoreUserPlateVo.kid', index=0,\n      number=1, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='plateName', full_name='KuGouPack.WoreUserPlateVo.plateName', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='type', full_name='KuGouPack.WoreUserPlateVo.type', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='l', full_name='KuGouPack.WoreUserPlateVo.l', index=3,\n      number=4, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='i', full_name='KuGouPack.WoreUserPlateVo.i', index=4,\n      number=5, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3169,\n  serialized_end=3254,\n)\n\n\n_BUBBLEVO = _descriptor.Descriptor(\n  name='BubbleVo',\n  full_name='KuGouPack.BubbleVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='id', full_name='KuGouPack.BubbleVo.id', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='bg', full_name='KuGouPack.BubbleVo.bg', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3256,\n  serialized_end=3290,\n)\n\n\n_STARFOLLOWERVO = _descriptor.Descriptor(\n  name='StarFollowerVo',\n  full_name='KuGouPack.StarFollowerVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='l', full_name='KuGouPack.StarFollowerVo.l', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3292,\n  serialized_end=3319,\n)\n\n\n_BOSSGROUPVO = _descriptor.Descriptor(\n  name='BossGroupVo',\n  full_name='KuGouPack.BossGroupVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='gid', full_name='KuGouPack.BossGroupVo.gid', index=0,\n      number=1, type=3, cpp_type=2, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gn', full_name='KuGouPack.BossGroupVo.gn', index=1,\n      number=2, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gr', full_name='KuGouPack.BossGroupVo.gr', index=2,\n      number=3, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3321,\n  serialized_end=3371,\n)\n\n\n_CEREMONYVO = _descriptor.Descriptor(\n  name='CeremonyVo',\n  full_name='KuGouPack.CeremonyVo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='pl', full_name='KuGouPack.CeremonyVo.pl', index=0,\n      number=1, type=5, cpp_type=1, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=3373,\n  serialized_end=3397,\n)\n\n_CHATRESPONSE.fields_by_name['additionalInfo'].message_type = _ADDITIONALINFO\n_CHATRESPONSE.fields_by_name['complain'].message_type = _COMPLAIN\n_MESSAGE.fields_by_name['compression'].enum_type = _MCOMPRESSION\n_MESSAGE.fields_by_name['codec'].enum_type = _MCODEC\n_CONTENTMESSAGE.fields_by_name['sinfo'].message_type = _SINFO\n_CONTENTMESSAGE.fields_by_name['codec'].enum_type = _MCODEC\n_CONTENTMESSAGE.fields_by_name['risk'].message_type = _RISK\n_EXTENSION.fields_by_name['stli'].message_type = _STLIVO\n_EXTENSION.fields_by_name['vipData'].message_type = _VIPDATAVO\n_EXTENSION.fields_by_name['usingMount'].message_type = _USINGMOUNTVO\n_EXTENSION.fields_by_name['usingMedal'].message_type = _USINGMEDALVO\n_EXTENSION.fields_by_name['honorMedal'].message_type = _HONORMEDALVO\n_EXTENSION.fields_by_name['userGuard'].message_type = _USERGUARDVO\n_EXTENSION.fields_by_name['littleGuard'].message_type = _LITTLEGUARDVO\n_EXTENSION.fields_by_name['defaultPlate'].message_type = _WOREUSERPLATEVO\n_EXTENSION.fields_by_name['bubble'].message_type = _BUBBLEVO\n_EXTENSION.fields_by_name['starFollower'].message_type = _STARFOLLOWERVO\n_EXTENSION.fields_by_name['bossGroup'].message_type = _BOSSGROUPVO\n_EXTENSION.fields_by_name['ceremony'].message_type = _CEREMONYVO\nDESCRIPTOR.message_types_by_name['LoginRequest'] = _LOGINREQUEST\nDESCRIPTOR.message_types_by_name['LoginResponse'] = _LOGINRESPONSE\nDESCRIPTOR.message_types_by_name['ErrorResponse'] = _ERRORRESPONSE\nDESCRIPTOR.message_types_by_name['ChatResponse'] = _CHATRESPONSE\nDESCRIPTOR.message_types_by_name['AdditionalInfo'] = _ADDITIONALINFO\nDESCRIPTOR.message_types_by_name['Complain'] = _COMPLAIN\nDESCRIPTOR.message_types_by_name['Message'] = _MESSAGE\nDESCRIPTOR.message_types_by_name['ContentMessage'] = _CONTENTMESSAGE\nDESCRIPTOR.message_types_by_name['Risk'] = _RISK\nDESCRIPTOR.message_types_by_name['Sinfo'] = _SINFO\nDESCRIPTOR.message_types_by_name['Extension'] = _EXTENSION\nDESCRIPTOR.message_types_by_name['StliVo'] = _STLIVO\nDESCRIPTOR.message_types_by_name['VipDataVo'] = _VIPDATAVO\nDESCRIPTOR.message_types_by_name['UsingMountVo'] = _USINGMOUNTVO\nDESCRIPTOR.message_types_by_name['UsingMedalVo'] = _USINGMEDALVO\nDESCRIPTOR.message_types_by_name['HonorMedalVo'] = _HONORMEDALVO\nDESCRIPTOR.message_types_by_name['UserGuardVo'] = _USERGUARDVO\nDESCRIPTOR.message_types_by_name['LittleGuardVo'] = _LITTLEGUARDVO\nDESCRIPTOR.message_types_by_name['WoreUserPlateVo'] = _WOREUSERPLATEVO\nDESCRIPTOR.message_types_by_name['BubbleVo'] = _BUBBLEVO\nDESCRIPTOR.message_types_by_name['StarFollowerVo'] = _STARFOLLOWERVO\nDESCRIPTOR.message_types_by_name['BossGroupVo'] = _BOSSGROUPVO\nDESCRIPTOR.message_types_by_name['CeremonyVo'] = _CEREMONYVO\nDESCRIPTOR.enum_types_by_name['MCompression'] = _MCOMPRESSION\nDESCRIPTOR.enum_types_by_name['MCodec'] = _MCODEC\n_sym_db.RegisterFileDescriptor(DESCRIPTOR)\n\nLoginRequest = _reflection.GeneratedProtocolMessageType('LoginRequest', (_message.Message,), {\n  'DESCRIPTOR' : _LOGINREQUEST,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.LoginRequest)\n  })\n_sym_db.RegisterMessage(LoginRequest)\n\nLoginResponse = _reflection.GeneratedProtocolMessageType('LoginResponse', (_message.Message,), {\n  'DESCRIPTOR' : _LOGINRESPONSE,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.LoginResponse)\n  })\n_sym_db.RegisterMessage(LoginResponse)\n\nErrorResponse = _reflection.GeneratedProtocolMessageType('ErrorResponse', (_message.Message,), {\n  'DESCRIPTOR' : _ERRORRESPONSE,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.ErrorResponse)\n  })\n_sym_db.RegisterMessage(ErrorResponse)\n\nChatResponse = _reflection.GeneratedProtocolMessageType('ChatResponse', (_message.Message,), {\n  'DESCRIPTOR' : _CHATRESPONSE,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.ChatResponse)\n  })\n_sym_db.RegisterMessage(ChatResponse)\n\nAdditionalInfo = _reflection.GeneratedProtocolMessageType('AdditionalInfo', (_message.Message,), {\n  'DESCRIPTOR' : _ADDITIONALINFO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.AdditionalInfo)\n  })\n_sym_db.RegisterMessage(AdditionalInfo)\n\nComplain = _reflection.GeneratedProtocolMessageType('Complain', (_message.Message,), {\n  'DESCRIPTOR' : _COMPLAIN,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.Complain)\n  })\n_sym_db.RegisterMessage(Complain)\n\nMessage = _reflection.GeneratedProtocolMessageType('Message', (_message.Message,), {\n  'DESCRIPTOR' : _MESSAGE,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.Message)\n  })\n_sym_db.RegisterMessage(Message)\n\nContentMessage = _reflection.GeneratedProtocolMessageType('ContentMessage', (_message.Message,), {\n  'DESCRIPTOR' : _CONTENTMESSAGE,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.ContentMessage)\n  })\n_sym_db.RegisterMessage(ContentMessage)\n\nRisk = _reflection.GeneratedProtocolMessageType('Risk', (_message.Message,), {\n  'DESCRIPTOR' : _RISK,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.Risk)\n  })\n_sym_db.RegisterMessage(Risk)\n\nSinfo = _reflection.GeneratedProtocolMessageType('Sinfo', (_message.Message,), {\n  'DESCRIPTOR' : _SINFO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.Sinfo)\n  })\n_sym_db.RegisterMessage(Sinfo)\n\nExtension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), {\n  'DESCRIPTOR' : _EXTENSION,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.Extension)\n  })\n_sym_db.RegisterMessage(Extension)\n\nStliVo = _reflection.GeneratedProtocolMessageType('StliVo', (_message.Message,), {\n  'DESCRIPTOR' : _STLIVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.StliVo)\n  })\n_sym_db.RegisterMessage(StliVo)\n\nVipDataVo = _reflection.GeneratedProtocolMessageType('VipDataVo', (_message.Message,), {\n  'DESCRIPTOR' : _VIPDATAVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.VipDataVo)\n  })\n_sym_db.RegisterMessage(VipDataVo)\n\nUsingMountVo = _reflection.GeneratedProtocolMessageType('UsingMountVo', (_message.Message,), {\n  'DESCRIPTOR' : _USINGMOUNTVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.UsingMountVo)\n  })\n_sym_db.RegisterMessage(UsingMountVo)\n\nUsingMedalVo = _reflection.GeneratedProtocolMessageType('UsingMedalVo', (_message.Message,), {\n  'DESCRIPTOR' : _USINGMEDALVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.UsingMedalVo)\n  })\n_sym_db.RegisterMessage(UsingMedalVo)\n\nHonorMedalVo = _reflection.GeneratedProtocolMessageType('HonorMedalVo', (_message.Message,), {\n  'DESCRIPTOR' : _HONORMEDALVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.HonorMedalVo)\n  })\n_sym_db.RegisterMessage(HonorMedalVo)\n\nUserGuardVo = _reflection.GeneratedProtocolMessageType('UserGuardVo', (_message.Message,), {\n  'DESCRIPTOR' : _USERGUARDVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.UserGuardVo)\n  })\n_sym_db.RegisterMessage(UserGuardVo)\n\nLittleGuardVo = _reflection.GeneratedProtocolMessageType('LittleGuardVo', (_message.Message,), {\n  'DESCRIPTOR' : _LITTLEGUARDVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.LittleGuardVo)\n  })\n_sym_db.RegisterMessage(LittleGuardVo)\n\nWoreUserPlateVo = _reflection.GeneratedProtocolMessageType('WoreUserPlateVo', (_message.Message,), {\n  'DESCRIPTOR' : _WOREUSERPLATEVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.WoreUserPlateVo)\n  })\n_sym_db.RegisterMessage(WoreUserPlateVo)\n\nBubbleVo = _reflection.GeneratedProtocolMessageType('BubbleVo', (_message.Message,), {\n  'DESCRIPTOR' : _BUBBLEVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.BubbleVo)\n  })\n_sym_db.RegisterMessage(BubbleVo)\n\nStarFollowerVo = _reflection.GeneratedProtocolMessageType('StarFollowerVo', (_message.Message,), {\n  'DESCRIPTOR' : _STARFOLLOWERVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.StarFollowerVo)\n  })\n_sym_db.RegisterMessage(StarFollowerVo)\n\nBossGroupVo = _reflection.GeneratedProtocolMessageType('BossGroupVo', (_message.Message,), {\n  'DESCRIPTOR' : _BOSSGROUPVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.BossGroupVo)\n  })\n_sym_db.RegisterMessage(BossGroupVo)\n\nCeremonyVo = _reflection.GeneratedProtocolMessageType('CeremonyVo', (_message.Message,), {\n  'DESCRIPTOR' : _CEREMONYVO,\n  '__module__' : 'kugou_pb2'\n  # @@protoc_insertion_point(class_scope:KuGouPack.CeremonyVo)\n  })\n_sym_db.RegisterMessage(CeremonyVo)\n\n\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "danmu/danmaku/laifeng.py",
    "content": "import aiohttp\nimport json\nimport time\n\n\nclass LaiFeng:\n    heartbeat = '2::'\n    heartbeatInterval = 30\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('/')[-1]\n        async with aiohttp.ClientSession() as session:\n            async with session.get('http://v.laifeng.com/') as resp:\n                imk = dict(resp.cookies)['imk'].value\n        args = {\n            'name': 'enter',\n            'args': [{\n                'token': imk.replace('%3D', '='),\n                'yktk': '',\n                'uid': '2082628924',\n                'isPushHis': '1',\n                'roomid': rid,\n                'endpointtype': 'ct_,dt_1_1003|0|_{}|CTaXF+oKpB4CAatxtZHBQchJ'.format(time.time() * 1e3)\n            }]\n        }\n        reg_data = '5:::' + json.dumps(args)\n        return 'ws://normal01.chatroom.laifeng.com/socket.io/1/websocket/', [reg_data]\n\n    @staticmethod\n    def decode_msg(message):\n        type_ = message[0]\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        if type_ == '5':\n            data = json.loads(message[4:])\n            name = data.get('name', 0)\n            args = data['args']\n            for arg in args:\n                if name == 'enterMessage':  # 入场信息\n                    msg['name'] = 'SYS'\n                    msg['content'] = arg['body']['n'] + ' 进入频道'\n                    msg['msg_type'] = 'danmaku'\n                elif name == 'globalHornMessage':  # 系统消息\n                    msg['name'] = 'SYS'\n                    msg['content'] = arg['body']['m']\n                    msg['msg_type'] = 'danmaku'\n                elif name == 'chatMessage':  # 弹幕\n                    msg['name'] = arg['body']['n']\n                    msg['content'] = arg['body']['m']\n                    msg['msg_type'] = 'danmaku'\n                msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/longzhu.py",
    "content": "import json\nimport aiohttp\nimport re\n\n\nclass LongZhu:\n    heartbeat = None\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('/')[-1]\n        async with aiohttp.ClientSession() as session:\n            async with session.get('http://m.longzhu.com/' + rid) as resp:\n                res1 = await resp.text()\n                roomid = re.search(r'var roomId = (\\d+);', res1).group(1)\n            async with session.get('http://idc-gw.longzhu.com/mbidc?roomId=' + roomid) as resp2:\n                res2 = json.loads(await resp2.text())\n                ws_url = res2['data']['redirect_to'] + '?room_id=' + roomid\n        return ws_url, None\n\n    @staticmethod\n    def decode_msg(message):\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        message = json.loads(message)\n        type_ = message['type']\n        # type_ == 'gift' 礼物\n        if type_ == 'chat':\n            msg['name'] = message['msg']['user']['username']\n            msg['content'] = (message['msg']['content']).strip()\n            msg['msg_type'] = 'danmaku'\n        elif type_ == 'commonjoin':\n            msg['name'] = message['msg']['user']['username']\n            msg['content'] = message['msg']['userMessage']\n            msg['msg_type'] = 'danmaku'\n        msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/look.py",
    "content": "from Crypto.Cipher import AES\nfrom Crypto.Util.Padding import pad\nimport aiohttp\nimport json\nimport base64\n\n\nclass Look:\n    heartbeat = '2::'\n    heartbeatInterval = 30\n\n    @staticmethod\n    def aes_(t, key):\n        t = t.encode('utf-8')\n        t = pad(t, AES.block_size)\n        key = key.encode()\n        iv = b'0102030405060708'\n        mode = AES.MODE_CBC\n        c = AES.new(key, mode, iv)\n        res = c.encrypt(t)\n        return base64.b64encode(res).decode('utf-8')\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('=')[-1]\n        async with aiohttp.ClientSession() as session:\n            async with session.get('https://weblink10.netease.im/socket.io/1/') as resp:\n                res = await resp.text()\n                sessid = res.split(':')[0]\n            ws_url = 'wss://weblink10.netease.im/socket.io/1/websocket/' + sessid\n            room = {\n                'liveRoomNo': rid\n            }\n            c = json.dumps(room, separators=(',', ':'))\n            data = {\n                'params': Look.aes_(Look.aes_(c, '0CoJUm6Qyw8W8jud'), 'dV00kZnm4Au69cp2'),\n                'encSecKey': 'e08bda29630b9a9bbf9552a1e5f889972aedfe6bc4e695b60d566294043431c60e42487153c6e0df42df0aa9d40c739552d8d8ee58d9acbcab8f4ae0df997a787eefcc56bdcd12fd2f1e41bdb5f9db240b3e10b6bd762fd207853af4c78dddf8254cf6ff83599120bd041c3e7dfb3faea1cd2886bd2c40de0981a11ae2af2a33 '\n            }\n            async with session.post('https://api.look.163.com/weapi/livestream/room/get/v3', data=data) as resp:\n                res = await resp.json()\n                roomid = res['data']['roomInfo']['roomId']\n\n        args = {\n            'SID': 13,\n            'CID': 2,\n            'SER': 1,\n            'Q': [{\n                't': 'byte',\n                'v': 1\n            }, {\n                't': 'Property',\n                'v': {\n                    '1': '3a6a3e48f6854dfa4e4464f3bdaec3b4',\n                    '2': '',\n                    '3': '1713a7e3e1e4d7b99fe5bcff2fe7e178',\n                    '5': roomid,\n                    '8': 0,\n                    '20': '',\n                    '21': ' ',\n                    '26': '',\n                    '38': 1\n                }\n            }, {\n                't': 'Property',\n                'v': {\n                    '4': '',\n                    '6': '47',\n                    '8': 1,\n                    '9': 1,\n                    '13': '1713a7e3e1e4d7b99fe5bcff2fe7e178',\n                    '18': '3a6a3e48f6854dfa4e4464f3bdaec3b4',\n                    '19': '',\n                    '24': '',\n                    '26': '',\n                    '1000': ''\n                }\n            }\n            ]\n        }\n        reg_data = '3:::' + json.dumps(args, separators=(',', ':'))\n\n        return ws_url, [reg_data]\n\n    @staticmethod\n    def decode_msg(message):\n        type_ = message[0]\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        if type_ == '3':\n            data = json.loads(message[4:])\n            if data['cid'] == 10:\n                body = data['r'][1]['body']\n                body = body[0]\n                if body['2'] == '100':\n                    info = json.loads(body['4'])\n                    if info['type'] == 114:  # 入场信息\n                        msg['name'] = info['content']['user']['nickName']\n                        msg['content'] = ' 进入了直播间'\n                        msg['msg_type'] = 'danmaku'\n                    elif info['type'] == 102:  # 礼物\n                        msg['name'] = info['content']['user']['nickName']\n                        number = info['content']['number']\n                        giftname = info['content']['giftName']\n                        msg['content'] = ' 送了{}{}个'.format(giftname, number)\n                        msg['msg_type'] = 'danmaku'\n                elif body['2'] == '0':  # 发言\n                    info = json.loads(body['4'])\n                    msg['name'] = info['content']['user']['nickname']\n                    msg['content'] = body['3']\n                    msg['msg_type'] = 'danmaku'\n        msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/pps.py",
    "content": "import hashlib\nimport urllib.parse\nimport json\n\n\nclass QiXiu:\n    heartbeat = None\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('/')[-1]\n        s = bytes([57, 77, 83, 73, 53, 86, 85, 71, 50, 81, 74, 80, 66, 52, 78, 54, 68, 48, 81,\n                   83, 89, 87, 69, 72, 67, 90, 83, 75, 84, 49, 77, 50, 84, 65, 75, 88]).decode('utf-8')\n        # ua = 'User-Agent'\n        # ak = deviceid = md5(str(int(time.time() * 1e3)) + ua + '0000')\n        ak = deviceid = '118d2ae703e62992263e6741afbb5627'\n        e = {\n            'ag': 1,\n            'ak': ak,\n            'at': 3,\n            'd': deviceid,\n            'n': 1,\n            'p': 1,\n            'r': rid,\n            'v': '1.01.0801'\n        }\n        i = ''\n        for k, v in e.items():\n            i += '{}={}|'.format(k, str(v))\n        e['sg'] = hashlib.md5((i + s).encode('utf-8')).hexdigest()\n        ws_url = 'ws://qx-ws.iqiyi.com/ws?' + urllib.parse.urlencode(e)\n        return ws_url, None\n\n    @staticmethod\n    def decode_msg(data):\n        message = json.loads(data)\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        for ms in message:\n            m = ms['ct']\n            type_ = ms['t']\n            # 200001：进场消息\n            # 300001：聊天信息\n            # 102001：礼物\n            # 1100002：礼物\n            # 400001：人气值\n            # 5000010：升级\n            # 700095：live_score\n            # 700091：排名\n            # 其他：系统消息\n            if type_ == 300001:\n                msg['name'] = m['op_userInfo']['nick_name']\n                msg['content'] = m['msg']\n                msg['msg_type'] = 'danmaku'\n            elif type_ == 102001:\n                msg['name'] = m['op_userInfo']['nick_name']\n                num = m['op_info']['num']\n                gift = m['op_info']['name']\n                msg['content'] = '送出{}个{}'.format(num, gift)\n                msg['msg_type'] = 'danmaku'\n            elif type_ in [200001, 1100002, 110001, 3019, 3022, 3002, 3024]:\n                msg['name'] = 'SYS'\n                info = m['op_info'].get('public_chat_msg', 0)\n                if not info:\n                    info = m['op_info']['roll_chat_msg']\n                content = ''\n                items = info['items']\n                for item in items:\n                    content += item.get('content', '')\n                msg['content'] = content\n                msg['msg_type'] = 'danmaku'\n            msgs.append(msg.copy())\n            return msgs\n"
  },
  {
    "path": "danmu/danmaku/qf.py",
    "content": "import aiohttp\nimport json\nimport time\n\n\nclass QF:\n    heartbeat = '2::'\n    heartbeatInterval = 30\n\n    @staticmethod\n    async def get_ws_info(url):\n        rid = url.split('/')[-1]\n        async with aiohttp.ClientSession() as session:\n            async with session.get('https://conn-chat.qf.56.com/socket.io/1/') as resp:\n                res = await resp.text()\n                sessid = res.split(':')[0]\n                ws_url = 'wss://conn-chat.qf.56.com/socket.io/1/websocket/' + sessid\n                # e = 2\n                t = 'connector-sio.entryHandler.enter'\n                s = {\n                    'userId': '',\n                    'aq': 0,\n                    'roomId': rid,\n                    'token': '',\n                    'ip': '',\n                    'recet': 0,\n                    'params': {\n                        'referFrom': '0'\n                    },\n                    'apType': 0,\n                    'timestamp': int(time.time() * 1e3)\n                }\n                r = json.dumps(s, separators=(',', ':'))\n                if len(t) > 255:\n                    raise Exception('route maxlength is overflow')\n                reg_data = '3:::' + '\\x00\\x00\\x00\\x02 ' + t + r\n        return ws_url, [reg_data]\n\n    @staticmethod\n    def decode_msg(message):\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        type_ = message[0]\n        if type_ == '3':\n            data = json.loads(message[4:])\n            route = data.get('route', 0)\n            body = data['body']\n            if route == 'onUserLog':  # 入场信息\n                msg['name'] = 'SYS'\n                msg['content'] = body['userName'] + ' 来了'\n                msg['msg_type'] = 'danmaku'\n            elif route == 'onChat':  # 弹幕\n                msg['name'] = body['userName']\n                msg['content'] = body['content']\n                msg['msg_type'] = 'danmaku'\n            elif route == 'onGift':  # 弹幕\n                msg['name'] = 'SYS'\n                msg['content'] = body['userName'] + ' 送礼物 ' + body['giftName']\n                msg['msg_type'] = 'danmaku'\n            elif route == 'onBc':  # 弹幕\n                msg['name'] = 'SYS'\n                msg['content'] = body['userName'] + '：' + body['msg']\n                msg['msg_type'] = 'danmaku'\n        msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/tars/EndpointF.py",
    "content": "# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\nfrom core import tarscore\n\n\nclass EndpointF(tarscore.struct):\n    __tars_class__ = \"register.EndpointF\"\n\n    def __init__(self):\n        self.host = \"\"\n        self.port = 0\n        self.timeout = 0\n        self.istcp = 0\n        self.grid = 0\n        self.groupworkid = 0\n        self.grouprealid = 0\n        self.setId = \"\"\n        self.qos = 0\n        self.bakFlag = 0\n        self.weight = 0\n        self.weightType = 0\n\n    @staticmethod\n    def writeTo(oos, value):\n        oos.write(tarscore.string, 0, value.host)\n        oos.write(tarscore.int32, 1, value.port)\n        oos.write(tarscore.int32, 2, value.timeout)\n        oos.write(tarscore.int32, 3, value.istcp)\n        oos.write(tarscore.int32, 4, value.grid)\n        oos.write(tarscore.int32, 5, value.groupworkid)\n        oos.write(tarscore.int32, 6, value.grouprealid)\n        oos.write(tarscore.string, 7, value.setId)\n        oos.write(tarscore.int32, 8, value.qos)\n        oos.write(tarscore.int32, 9, value.bakFlag)\n        oos.write(tarscore.int32, 11, value.weight)\n        oos.write(tarscore.int32, 12, value.weightType)\n\n    @staticmethod\n    def readFrom(ios):\n        value = EndpointF()\n        value.host = ios.read(tarscore.string, 0, True, value.host)\n        value.port = ios.read(tarscore.int32, 1, True, value.port)\n        value.timeout = ios.read(tarscore.int32, 2, True, value.timeout)\n        value.istcp = ios.read(tarscore.int32, 3, True, value.istcp)\n        value.grid = ios.read(tarscore.int32, 4, True, value.grid)\n        value.groupworkid = ios.read(\n            tarscore.int32, 5, False, value.groupworkid)\n        value.grouprealid = ios.read(\n            tarscore.int32, 6, False, value.grouprealid)\n        value.setId = ios.read(tarscore.string, 7, False, value.setId)\n        value.qos = ios.read(tarscore.int32, 8, False, value.qos)\n        value.bakFlag = ios.read(tarscore.int32, 9, False, value.bakFlag)\n        value.weight = ios.read(tarscore.int32, 11, False, value.weight)\n        value.weightType = ios.read(\n            tarscore.int32, 12, False, value.weightType)\n        return value\n"
  },
  {
    "path": "danmu/danmaku/tars/QueryF.py",
    "content": "# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n# from tars.core import tarscore;\n# from tars.core import ServantProxy;\n# from tars.core import ServantProxyCallback;\n# from com.qq.register.EndpointF import *;\nfrom .__init__ import tarscore\nfrom .__servantproxy import ServantProxy\nfrom .__async import ServantProxyCallback\nfrom .EndpointF import EndpointF\n\nimport time\n\n# proxy for client\n\n\nclass QueryFProxy(ServantProxy):\n    def findObjectById(self, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        rsp = self.tars_invoke(ServantProxy.TARSNORMAL,\n                               \"findObjectById\", oos.getBuffer(), context, None)\n\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.vctclass(EndpointF), 0, True)\n\n        return (ret)\n\n    def async_findObjectById(self, callback, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        self.tars_invoke_async(\n            ServantProxy.TARSNORMAL, \"findObjectById\", oos.getBuffer(), context, None, callback)\n\n    def findObjectById4Any(self, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        rsp = self.tars_invoke(\n            ServantProxy.TARSNORMAL, \"findObjectById4Any\", oos.getBuffer(), context, None)\n\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n\n        return (ret, activeEp, inactiveEp)\n\n    def async_findObjectById4Any(self, callback, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        self.tars_invoke_async(\n            ServantProxy.TARSNORMAL, \"findObjectById4Any\", oos.getBuffer(), context, None, callback)\n\n    def findObjectById4All(self, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        rsp = self.tars_invoke(\n            ServantProxy.TARSNORMAL, \"findObjectById4All\", oos.getBuffer(), context, None)\n\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n\n        return (ret, activeEp, inactiveEp)\n\n    def async_findObjectById4All(self, callback, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        self.tars_invoke_async(\n            ServantProxy.TARSNORMAL, \"findObjectById4All\", oos.getBuffer(), context, None, callback)\n\n    def findObjectByIdInSameGroup(self, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n        rsp = self.tars_invoke(\n            ServantProxy.TARSNORMAL, \"findObjectByIdInSameGroup\", oos.getBuffer(), context, None)\n\n        startDecodeTime = time.time()\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        endDecodeTime = time.time()\n        return (ret, activeEp, inactiveEp, (endDecodeTime - startDecodeTime))\n\n    def async_findObjectByIdInSameGroup(self, callback, id, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n\n        self.tars_invoke_async(\n            ServantProxy.TARSNORMAL, \"findObjectByIdInSameGroup\", oos.getBuffer(), context, None, callback)\n\n    def findObjectByIdInSameStation(self, id, sStation, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n        oos.write(tarscore.string, 2, sStation)\n\n        rsp = self.tars_invoke(\n            ServantProxy.TARSNORMAL, \"findObjectByIdInSameStation\", oos.getBuffer(), context, None)\n\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True)\n\n        return (ret, activeEp, inactiveEp)\n\n    def async_findObjectByIdInSameStation(self, callback, id, sStation, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n        oos.write(tarscore.string, 2, sStation)\n\n        self.tars_invoke_async(\n            ServantProxy.TARSNORMAL, \"findObjectByIdInSameStation\", oos.getBuffer(), context, None, callback)\n\n    def findObjectByIdInSameSet(self, id, setId, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n        oos.write(tarscore.string, 2, setId)\n\n        rsp = self.tars_invoke(\n            ServantProxy.TARSNORMAL, \"findObjectByIdInSameSet\", oos.getBuffer(), context, None)\n\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True)\n\n        return (ret, activeEp, inactiveEp)\n\n    def async_findObjectByIdInSameSet(self, callback, id, setId, context=ServantProxy.mapcls_context()):\n        oos = tarscore.TarsOutputStream()\n        oos.write(tarscore.string, 1, id)\n        oos.write(tarscore.string, 2, setId)\n\n        self.tars_invoke_async(\n            ServantProxy.TARSNORMAL, \"findObjectByIdInSameSet\", oos.getBuffer(), context, None, callback)\n\n\n# ========================================================\n# callback of async proxy for client\n# ========================================================\nclass QueryFPrxCallback(ServantProxyCallback):\n    def __init__(self):\n        ServantProxyCallback.__init__(self)\n        self.callback_map = {\n            'findObjectById': self.__invoke_findObjectById,\n            'findObjectById4Any': self.__invoke_findObjectById4Any,\n            'findObjectById4All': self.__invoke_findObjectById4All,\n            'findObjectByIdInSameGroup': self.__invoke_findObjectByIdInSameGroup,\n            'findObjectByIdInSameStation': self.__invoke_findObjectByIdInSameStation,\n            'findObjectByIdInSameSet': self.__invoke_findObjectByIdInSameSet\n        }\n\n    def callback_findObjectById(self, ret):\n        raise NotImplementedError()\n\n    def callback_findObjectById_exception(self, ret):\n        raise NotImplementedError()\n\n    def callback_findObjectById4Any(self, ret, activeEp, inactiveEp):\n        raise NotImplementedError()\n\n    def callback_findObjectById4Any_exception(self, ret):\n        raise NotImplementedError()\n\n    def callback_findObjectById4All(self, ret, activeEp, inactiveEp):\n        raise NotImplementedError()\n\n    def callback_findObjectById4All_exception(self, ret):\n        raise NotImplementedError()\n\n    def callback_findObjectByIdInSameGroup(self, ret, activeEp, inactiveEp):\n        raise NotImplementedError()\n\n    def callback_findObjectByIdInSameGroup_exception(self, ret):\n        raise NotImplementedError()\n\n    def callback_findObjectByIdInSameStation(self, ret, activeEp, inactiveEp):\n        raise NotImplementedError()\n\n    def callback_findObjectByIdInSameStation_exception(self, ret):\n        raise NotImplementedError()\n\n    def callback_findObjectByIdInSameSet(self, ret, activeEp, inactiveEp):\n        raise NotImplementedError()\n\n    def callback_findObjectByIdInSameSet_exception(self, ret):\n        raise NotImplementedError()\n\n    def __invoke_findObjectById(self, reqmsg):\n        rsp = reqmsg.response\n        if rsp.iRet != ServantProxy.TARSSERVERSUCCESS:\n            self.callback_findObjectById_exception(rsp.iRet)\n            return rsp.iRet\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.vctclass(EndpointF), 0, True)\n        self.callback_findObjectById(ret)\n\n    def __invoke_findObjectById4Any(self, reqmsg):\n        rsp = reqmsg.response\n        if rsp.iRet != ServantProxy.TARSSERVERSUCCESS:\n            self.callback_findObjectById4Any_exception(rsp.iRet)\n            return rsp.iRet\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        self.callback_findObjectById4Any(ret, activeEp, inactiveEp)\n\n    def __invoke_findObjectById4All(self, reqmsg):\n        rsp = reqmsg.response\n        if rsp.iRet != ServantProxy.TARSSERVERSUCCESS:\n            self.callback_findObjectById4All_exception(rsp.iRet)\n            return rsp.iRet\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        self.callback_findObjectById4All(ret, activeEp, inactiveEp)\n\n    def __invoke_findObjectByIdInSameGroup(self, reqmsg):\n        rsp = reqmsg.response\n        if rsp.iRet != ServantProxy.TARSSERVERSUCCESS:\n            self.callback_findObjectByIdInSameGroup_exception(rsp.iRet)\n            return rsp.iRet\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        self.callback_findObjectByIdInSameGroup(ret, activeEp, inactiveEp)\n\n    def __invoke_findObjectByIdInSameStation(self, reqmsg):\n        rsp = reqmsg.response\n        if rsp.iRet != ServantProxy.TARSSERVERSUCCESS:\n            self.callback_findObjectByIdInSameStation_exception(rsp.iRet)\n            return rsp.iRet\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True)\n        self.callback_findObjectByIdInSameStation(ret, activeEp, inactiveEp)\n\n    def __invoke_findObjectByIdInSameSet(self, reqmsg):\n        rsp = reqmsg.response\n        if rsp.iRet != ServantProxy.TARSSERVERSUCCESS:\n            self.callback_findObjectByIdInSameSet_exception(rsp.iRet)\n            return rsp.iRet\n        ios = tarscore.TarsInputStream(rsp.sBuffer)\n        ret = ios.read(tarscore.int32, 0, True)\n        activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True)\n        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True)\n        self.callback_findObjectByIdInSameSet(ret, activeEp, inactiveEp)\n\n    def onDispatch(self, reqmsg):\n        self.callback_map[reqmsg.request.sFuncName](reqmsg)\n"
  },
  {
    "path": "danmu/danmaku/tars/__TimeoutQueue.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# filename: __timeQueue.py\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n'''\n@version: 0.01\n@brief: 请求响应报文和超时队列\n'''\n\nimport threading\nimport time\nimport struct\n\nfrom .__logger import tarsLogger\nfrom .__tars import TarsInputStream\nfrom .__tars import TarsOutputStream\nfrom .__packet import RequestPacket\nfrom .__packet import ResponsePacket\nfrom .__util import (NewLock, LockGuard)\n\n\nclass ReqMessage:\n    '''\n    @brief: 请求响应报文，保存一个请求响应所需要的数据\n    '''\n    SYNC_CALL = 1\n    ASYNC_CALL = 2\n    ONE_WAY = 3\n\n    def __init__(self):\n        self.type = ReqMessage.SYNC_CALL\n        self.servant = None\n        self.lock = None\n        self.adapter = None\n        self.request = None\n        self.response = None\n        self.callback = None\n        self.begtime = None\n        self.endtime = None\n        self.isHash = False\n        self.isConHash = False\n        self.hashCode = 0\n\n    def packReq(self):\n        '''\n        @brief: 序列化请求报文\n        @return: 序列化后的请求报文\n        @rtype: str\n        '''\n        if not self.request:\n            return ''\n        oos = TarsOutputStream()\n        RequestPacket.writeTo(oos, self.request)\n        reqpkt = oos.getBuffer()\n        plen = len(reqpkt) + 4\n        reqpkt = struct.pack('!i', plen) + reqpkt\n        return reqpkt\n\n    @staticmethod\n    def unpackRspList(buf):\n        '''\n        @brief: 解码响应报文\n        @param buf: 多个序列化后的响应报文数据\n        @type buf: str\n        @return: 解码出来的响应报文和解码的buffer长度\n        @rtype: rsplist: 装有ResponsePacket的list\n                unpacklen: int\n        '''\n        rsplist = []\n        if not buf:\n            return rsplist\n\n        unpacklen = 0\n        buf = buffer(buf)\n        while True:\n            if len(buf) - unpacklen < 4:\n                break\n            packsize = buf[unpacklen: unpacklen+4]\n            packsize, = struct.unpack_from('!i', packsize)\n            if len(buf) < unpacklen + packsize:\n                break\n\n            ios = TarsInputStream(buf[unpacklen+4: unpacklen+packsize])\n            rsp = ResponsePacket.readFrom(ios)\n            rsplist.append(rsp)\n            unpacklen += packsize\n\n        return rsplist, unpacklen\n\n# 超时队列，加锁，线程安全\n\n\nclass TimeoutQueue:\n    '''\n    @brief: 超时队列，加锁，线程安全\n            可以像队列一样FIFO，也可以像字典一样按key取item\n    @todo: 限制队列长度\n    '''\n\n    def __init__(self, timeout=3):\n        self.__uniqId = 0\n        # self.__lock = threading.Lock()\n        self.__lock = NewLock()\n        self.__data = {}\n        self.__queue = []\n        self.__timeout = timeout\n\n    def getTimeout(self):\n        '''\n        @brief: 获取超时时间，单位为s\n        @return: 超时时间\n        @rtype: float\n        '''\n        return self.__timeout\n\n    def setTimeout(self, timeout):\n        '''\n        @brief: 设置超时时间，单位为s\n        @param timeout: 超时时间\n        @type timeout: float\n        @return: None\n        @rtype: None\n        '''\n        self.__timeout = timeout\n\n    def size(self):\n        '''\n        @brief: 获取队列长度\n        @return: 队列长度\n        @rtype: int\n        '''\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n        ret = len(self.__data)\n        # self.__lock.release()\n        return ret\n\n    def generateId(self):\n        '''\n        @brief: 生成唯一id，0 < id < 2 ** 32\n        @return: id\n        @rtype: int\n        '''\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n        ret = self.__uniqId\n        ret = (ret + 1) % 0x7FFFFFFF\n        while ret <= 0:\n            ret = (ret + 1) % 0x7FFFFFFF\n        self.__uniqId = ret\n        # self.__lock.release()\n        return ret\n\n    def pop(self, uniqId=0, erase=True):\n        '''\n        @brief: 弹出item\n        @param uniqId: item的id，如果为0，按FIFO弹出\n        @type uniqId: int\n        @param erase: 弹出后是否从字典里删除item\n        @type erase: bool\n        @return: item\n        @rtype: any type\n        '''\n        ret = None\n\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n\n        if not uniqId:\n            if len(self.__queue):\n                uniqId = self.__queue.pop(0)\n        if uniqId:\n            if erase:\n                ret = self.__data.pop(uniqId, None)\n            else:\n                ret = self.__data.get(uniqId, None)\n\n        # self.__lock.release()\n\n        return ret[0] if ret else None\n\n    def push(self, item, uniqId):\n        '''\n        @brief: 数据入队列，如果队列已经有了uniqId，插入失败\n        @param item: 插入的数据\n        @type item: any type\n        @return: 插入是否成功\n        @rtype: bool\n        '''\n        begtime = time.time()\n        ret = True\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n\n        if uniqId in self.__data:\n            ret = False\n        else:\n            self.__data[uniqId] = [item, begtime]\n            self.__queue.append(uniqId)\n        # self.__lock.release()\n        return ret\n\n    def peek(self, uniqId):\n        '''\n        @brief: 根据uniqId获取item，不会删除item\n        @param uniqId: item的id\n        @type uniqId: int\n        @return: item\n        @rtype: any type\n        '''\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n\n        ret = self.__data.get(uniqId, None)\n        # self.__lock.release()\n        if not ret:\n            return None\n        return ret[0]\n\n    def timeout(self):\n        '''\n        @brief: 检测是否有item超时，如果有就删除\n        @return: None\n        @rtype: None\n        '''\n        endtime = time.time()\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n\n        # 处理异常情况，防止死锁\n        try:\n            new_data = {}\n            for uniqId, item in self.__data.items():\n                if endtime - item[1] < self.__timeout:\n                    new_data[uniqId] = item\n                else:\n                    tarsLogger.debug(\n                        'TimeoutQueue:timeout remove id : %d' % uniqId)\n            self.__data = new_data\n        finally:\n            # self.__lock.release()\n            pass\n\n\nclass QueueTimeout(threading.Thread):\n    \"\"\"\n    超时线程，定时触发超时事件\n    \"\"\"\n\n    def __init__(self, timeout=0.1):\n        # threading.Thread.__init__(self)\n        tarsLogger.debug('QueueTimeout:__init__')\n        super(QueueTimeout, self).__init__()\n        self.timeout = timeout\n        self.__terminate = False\n        self.__handler = None\n        self.__lock = threading.Condition()\n\n    def terminate(self):\n        tarsLogger.debug('QueueTimeout:terminate')\n        self.__terminate = True\n        self.__lock.acquire()\n        self.__lock.notifyAll()\n        self.__lock.release()\n\n    def setHandler(self, handler):\n        self.__handler = handler\n\n    def run(self):\n        while not self.__terminate:\n            try:\n                self.__lock.acquire()\n                self.__lock.wait(self.timeout)\n                self.__lock.release()\n                if self.__terminate:\n                    break\n                self.__handler()\n            except Exception as msg:\n                tarsLogger.error('QueueTimeout:run exception : %s', msg)\n\n        tarsLogger.debug('QueueTimeout:run finished')\n\n\nif __name__ == '__main__':\n    pass\n"
  },
  {
    "path": "danmu/danmaku/tars/__adapterproxy.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# filename: __adapterproxymanager.py_compiler\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n'''\n@version: 0.01\n@brief: 将rpc部分中的adapterproxymanager抽离出来，实现不同的负载均衡\n'''\n\nfrom enum import Enum\nimport random\nimport socket\nimport select\nimport os\nimport time\n\n\nfrom .__util import (LockGuard, NewLock, ConsistentHashNew)\nfrom .__trans import EndPointInfo\nfrom .__logger import tarsLogger\nfrom . import exception\nfrom .__trans import TcpTransceiver\nfrom .__TimeoutQueue import ReqMessage\nfrom .exception import TarsException\n\n\n# 因为循环import的问题只能放这里，不能放文件开始处\nfrom .QueryF import QueryFProxy\nfrom .QueryF import QueryFPrxCallback\n\n\nclass AdapterProxy:\n    '''\n    @brief: 每一个Adapter管理一个服务端端口的连接，数据收发\n    '''\n\n    def __init__(self):\n        tarsLogger.debug('AdapterProxy:__init__')\n        self.__closeTrans = False\n        self.__trans = None\n        self.__object = None\n        self.__reactor = None\n        self.__lock = None\n        self.__asyncProc = None\n        self.__activeStateInReg = True\n\n    @property\n    def activatestateinreg(self):\n        return self.__activeStateInReg\n\n    @activatestateinreg.setter\n    def activatestateinreg(self, value):\n        self.__activeStateInReg = value\n\n    def __del__(self):\n        tarsLogger.debug('AdapterProxy:__del__')\n\n    def initialize(self, endPointInfo, objectProxy, reactor, asyncProc):\n        '''\n        @brief: 初始化\n        @param endPointInfo: 连接对端信息\n        @type endPointInfo: EndPointInfo\n        @type objectProxy: ObjectProxy\n        @type reactor: FDReactor\n        @type asyncProc: AsyncProcThread\n        '''\n        tarsLogger.debug('AdapterProxy:initialize')\n        self.__closeTrans = False\n        self.__trans = TcpTransceiver(endPointInfo)\n        self.__object = objectProxy\n        self.__reactor = reactor\n        # self.__lock = threading.Lock()\n        self.__lock = NewLock()\n        self.__asyncProc = asyncProc\n\n    def terminate(self):\n        '''\n        @brief: 关闭\n        '''\n        tarsLogger.debug('AdapterProxy:terminate')\n        self.setCloseTrans(True)\n\n    def trans(self):\n        '''\n        @brief: 获取传输类\n        @return: 负责网络传输的trans\n        @rtype: Transceiver\n        '''\n        return self.__trans\n\n    def invoke(self, reqmsg):\n        '''\n        @brief: 远程过程调用处理方法\n        @param reqmsg: 请求响应报文\n        @type reqmsg: ReqMessage\n        @return: 错误码：0表示成功，-1表示连接失败\n        @rtype: int\n        '''\n        tarsLogger.debug('AdapterProxy:invoke')\n        assert(self.__trans)\n\n        if (not self.__trans.hasConnected() and\n                not self.__trans.isConnecting):\n            # -1表示连接失败\n            return -1\n\n        reqmsg.request.iRequestId = self.__object.getTimeoutQueue().generateId()\n        self.__object.getTimeoutQueue().push(reqmsg, reqmsg.request.iRequestId)\n\n        self.__reactor.notify(self)\n\n        return 0\n\n    def finished(self, rsp):\n        '''\n        @brief: 远程过程调用返回处理\n        @param rsp: 响应报文\n        @type rsp: ResponsePacket\n        @return: 函数是否执行成功\n        @rtype: bool\n        '''\n        tarsLogger.debug('AdapterProxy:finished')\n        reqmsg = self.__object.getTimeoutQueue().pop(rsp.iRequestId)\n        if not reqmsg:\n            tarsLogger.error(\n                'finished, can not get ReqMessage, may be timeout, id: %d',\n                rsp.iRequestId)\n            return False\n\n        reqmsg.response = rsp\n        if reqmsg.type == ReqMessage.SYNC_CALL:\n            return reqmsg.servant._finished(reqmsg)\n        elif reqmsg.callback:\n            self.__asyncProc.put(reqmsg)\n            return True\n\n        tarsLogger.error('finished, adapter proxy finish fail, id: %d, ret: %d',\n                         rsp.iRequestId, rsp.iRet)\n        return False\n\n    # 检测连接是否失败，失效时重连\n    def checkActive(self, forceConnect=False):\n        '''\n        @brief: 检测连接是否失效\n        @param forceConnect: 是否强制发起连接，为true时不对状态进行判断就发起连接\n        @type forceConnect: bool\n        @return: 连接是否有效\n        @rtype: bool\n        '''\n        tarsLogger.debug('AdapterProxy:checkActive')\n        # self.__lock.acquire()\n        lock = LockGuard(self.__lock)\n        tarsLogger.info('checkActive, %s, forceConnect: %s',\n                        self.__trans.getEndPointInfo(), forceConnect)\n\n        if not self.__trans.isConnecting() and not self.__trans.hasConnected():\n            self.doReconnect()\n\n        # self.__lock.release()\n        return self.__trans.isConnecting() or self.__trans.hasConnected()\n\n    def doReconnect(self):\n        '''\n        @brief: 重新发起连接\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AdapterProxy:doReconnect')\n        assert(self.__trans)\n\n        self.__trans.reInit()\n        tarsLogger.info('doReconnect, connect: %s, fd:%d',\n                        self.__trans.getEndPointInfo(),\n                        self.__trans.getFd())\n\n        self.__reactor.registerAdapter(self, select.EPOLLIN | select.EPOLLOUT)\n\n    def sendRequest(self):\n        '''\n        @brief: 把队列中的请求放到Transceiver的发送缓存里\n        @return: 放入缓存的数据长度\n        @rtype: int\n        '''\n        tarsLogger.debug('AdapterProxy:sendRequest')\n        if not self.__trans.hasConnected():\n            return False\n\n        reqmsg = self.__object.popRequest()\n        blen = 0\n        while reqmsg:\n            reqmsg.adapter = self\n            buf = reqmsg.packReq()\n            self.__trans.writeToSendBuf(buf)\n            tarsLogger.info('sendRequest, id: %d, len: %d',\n                            reqmsg.request.iRequestId, len(buf))\n            blen += len(buf)\n            # 合并一次发送的包 最大合并至8k 提高异步时客户端效率?\n            if (self.__trans.getEndPointInfo().getConnType() == EndPointInfo.SOCK_UDP\n                    or blen > 8192):\n                break\n            reqmsg = self.__object.popRequest()\n\n        return blen\n\n    def finishConnect(self):\n        '''\n        @brief: 使用的非阻塞socket连接不能立刻判断是否连接成功，\n                在epoll响应后调用此函数处理connect结束后的操作\n        @return: 是否连接成功\n        @rtype: bool\n        '''\n        tarsLogger.debug('AdapterProxy:finishConnect')\n        success = True\n        errmsg = ''\n        try:\n            ret = self.__trans.getSock().getsockopt(\n                socket.SOL_SOCKET, socket.SO_ERROR)\n            if ret:\n                success = False\n                errmsg = os.strerror(ret)\n        except Exception as msg:\n            errmsg = msg\n            success = False\n\n        if not success:\n            self.__reactor.unregisterAdapter(\n                self, socket.EPOLLIN | socket.EPOLLOUT)\n            self.__trans.close()\n            self.__trans.setConnFailed()\n            tarsLogger.error(\n                'AdapterProxy finishConnect, exception: %s, error: %s',\n                self.__trans.getEndPointInfo(), errmsg)\n            return False\n        self.__trans.setConnected()\n        self.__reactor.notify(self)\n        tarsLogger.info('AdapterProxy finishConnect, connect %s success',\n                        self.__trans.getEndPointInfo())\n        return True\n\n    def finishInvoke(self, isTimeout):\n        pass\n\n    # 弹出请求报文\n    def popRequest(self):\n        pass\n\n    def shouldCloseTrans(self):\n        '''\n        @brief: 是否设置关闭连接\n        @return: 关闭连接的flag的值\n        @rtype: bool\n        '''\n        return self.__closeTrans\n\n    def setCloseTrans(self, closeTrans):\n        '''\n        @brief: 设置关闭连接flag的值\n        @param closeTrans: 是否关闭连接\n        @type closeTrans: bool\n        @return: None\n        @rtype: None\n        '''\n        self.__closeTrans = closeTrans\n\n\nclass QueryRegisterCallback(QueryFPrxCallback):\n    def __init__(self, adpManager):\n        self.__adpManager = adpManager\n        super(QueryRegisterCallback, self).__init__()\n        # QueryFPrxCallback.__init__(self)\n\n    def callback_findObjectById4All(self, ret, activeEp, inactiveEp):\n        eplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType)\n                  for x in activeEp if ret == 0 and x.istcp]\n        ieplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType)\n                   for x in inactiveEp if ret == 0 and x.istcp]\n        self.__adpManager.setEndpoints(eplist, ieplist)\n\n    def callback_findObjectById4All_exception(self, ret):\n        tarsLogger.error('callback_findObjectById4All_exception ret: %d', ret)\n\n\nclass EndpointWeightType(Enum):\n    E_LOOP = 0\n    E_STATIC_WEIGHT = 1\n\n\nclass AdapterProxyManager:\n    '''\n    @brief: 管理Adapter\n    '''\n\n    def __init__(self):\n        tarsLogger.debug('AdapterProxyManager:__init__')\n        self.__comm = None\n        self.__object = None\n        # __adps的key=str(EndPointInfo) value=[EndPointInfo, AdapterProxy, cnt]\n        # cnt是访问次数\n        self.__adps = {}\n        self.__iadps = {}\n        self.__newLock = None\n        self.__isDirectProxy = True\n        self.__lastFreshTime = 0\n        self.__queryRegisterCallback = QueryRegisterCallback(self)\n        self.__regAdapterProxyDict = {}\n        self.__lastConHashPrxList = []\n        self.__consistentHashWeight = None\n        self.__weightType = EndpointWeightType.E_LOOP\n        self.__update = True\n        self.__lastWeightedProxyData = {}\n\n    def initialize(self, comm, objectProxy, eplist):\n        '''\n        @brief: 初始化\n        '''\n        tarsLogger.debug('AdapterProxyManager:initialize')\n        self.__comm = comm\n        self.__object = objectProxy\n        self.__newLock = NewLock()\n\n        self.__isDirectProxy = len(eplist) > 0\n        if self.__isDirectProxy:\n            self.setEndpoints(eplist, {})\n        else:\n            self.refreshEndpoints()\n\n    def terminate(self):\n        '''\n        @brief: 释放资源\n        '''\n        tarsLogger.debug('AdapterProxyManager:terminate')\n        # self.__lock.acquire()\n        lock = LockGuard(self.__newLock)\n        for ep, epinfo in self.__adps.items():\n            epinfo[1].terminate()\n        self.__adps = {}\n        self.__lock.release()\n\n    def refreshEndpoints(self):\n        '''\n        @brief: 刷新服务器列表\n        @return: 新的服务列表\n        @rtype: EndPointInfo列表\n        '''\n        tarsLogger.debug('AdapterProxyManager:refreshEndpoints')\n        if self.__isDirectProxy:\n            return\n\n        interval = self.__comm.getProperty(\n            'refresh-endpoint-interval', float) / 1000\n        locator = self.__comm.getProperty('locator')\n\n        if '@' not in locator:\n            raise exception.TarsRegistryException(\n                'locator is not valid: ' + locator)\n\n        now = time.time()\n        last = self.__lastFreshTime\n        epSize = len(self.__adps)\n        if last + interval < now or (epSize <= 0 and last + 2 < now):\n            queryFPrx = self.__comm.stringToProxy(QueryFProxy, locator)\n            # 首次访问是同步调用，之后访问是异步调用\n            if epSize == 0 or last == 0:\n                ret, activeEps, inactiveEps = (\n                    queryFPrx.findObjectById4All(self.__object.name()))\n                # 目前只支持TCP\n                eplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType)\n                          for x in activeEps if ret == 0 and x.istcp]\n                ieplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType)\n                           for x in inactiveEps if ret == 0 and x.istcp]\n                self.setEndpoints(eplist, ieplist)\n            else:\n                queryFPrx.async_findObjectById4All(self.__queryRegisterCallback,\n                                                   self.__object.name())\n            self.__lastFreshTime = now\n\n    def getEndpoints(self):\n        '''\n        @brief: 获取可用服务列表 如果启用分组,只返回同分组的服务端ip\n        @return: 获取节点列表\n        @rtype: EndPointInfo列表\n        '''\n        tarsLogger.debug('AdapterProxyManager:getEndpoints')\n        # self.__lock.acquire()\n        lock = LockGuard(self.__newLock)\n        ret = [x[1][0] for x in list(self.__adps.items())]\n        # self.__lock.release()\n\n        return ret\n\n    def setEndpoints(self, eplist, ieplist):\n        '''\n        @brief: 设置服务端信息\n        @para eplist: 活跃的被调节点列表\n        @para ieplist: 不活跃的被调节点列表\n        '''\n        tarsLogger.debug('AdapterProxyManager:setEndpoints')\n        adps = {}\n        iadps = {}\n        comm = self.__comm\n        isNeedNotify = False\n        # self.__lock.acquire()\n        lock = LockGuard(self.__newLock)\n        isStartStatic = True\n\n        for ep in eplist:\n            if ep.getWeightType() == 0:\n                isStartStatic = False\n            epstr = str(ep)\n            if epstr in self.__adps:\n                adps[epstr] = self.__adps[epstr]\n                continue\n            isNeedNotify = True\n            self.__update = True\n            adapter = AdapterProxy()\n            adapter.initialize(ep, self.__object,\n                               comm.getReactor(), comm.getAsyncProc())\n            adapter.activatestateinreg = True\n            adps[epstr] = [ep, adapter, 0]\n        self.__adps, adps = adps, self.__adps\n\n        for iep in ieplist:\n            iepstr = str(iep)\n            if iepstr in self.__iadps:\n                iadps[iepstr] = self.__iadps[iepstr]\n                continue\n            isNeedNotify = True\n            adapter = AdapterProxy()\n            adapter.initialize(iep, self.__object,\n                               comm.getReactor(), comm.getAsyncProc())\n            adapter.activatestateinreg = False\n            iadps[iepstr] = [iep, adapter, 0]\n        self.__iadps, iadps = iadps, self.__iadps\n\n        if isStartStatic:\n            self.__weightType = EndpointWeightType.E_STATIC_WEIGHT\n        else:\n            self.__weightType = EndpointWeightType.E_LOOP\n\n        # self.__lock.release()\n        if isNeedNotify:\n            self.__notifyEndpoints(self.__adps, self.__iadps)\n        # 关闭已经失效的连接\n        for ep in adps:\n            if ep not in self.__adps:\n                adps[ep][1].terminate()\n\n    def __notifyEndpoints(self, actives, inactives):\n        # self.__lock.acquire()\n        lock = LockGuard(self.__newLock)\n        self.__regAdapterProxyDict.clear()\n        self.__regAdapterProxyDict.update(actives)\n        self.__regAdapterProxyDict.update(inactives)\n        # self.__lock.release()\n\n    def __getNextValidProxy(self):\n        '''\n        @brief: 刷新本地缓存列表，如果服务下线了，要求删除本地缓存\n        @return:\n        @rtype: EndPointInfo列表\n        @todo: 优化负载均衡算法\n        '''\n        tarsLogger.debug('AdapterProxyManager:getNextValidProxy')\n        lock = LockGuard(self.__newLock)\n        if len(self.__adps) == 0:\n            raise TarsException(\"the activate adapter proxy is empty\")\n\n        sortedActivateAdp = sorted(\n            list(self.__adps.items()), key=lambda item: item[1][2])\n        # self.refreshEndpoints()\n        # self.__lock.acquire()\n        sortedActivateAdpSize = len(sortedActivateAdp)\n\n        while sortedActivateAdpSize != 0:\n            if sortedActivateAdp[0][1][1].checkActive():\n                self.__adps[sortedActivateAdp[0][0]][2] += 1\n                # 返回的是 adapterProxy\n                return self.__adps[sortedActivateAdp[0][0]][1]\n            sortedActivateAdp.pop(0)\n            sortedActivateAdpSize -= 1\n        # 随机重连一个可用节点\n        adpPrx = list(self.__adps.items())[random.randint(\n            0, len(self.__adps))][1][1]\n        adpPrx.checkActive()\n        return None\n        # self.__lock.release()\n\n    def __getHashProxy(self, reqmsg):\n        if self.__weightType == EndpointWeightType.E_LOOP:\n            if reqmsg.isConHash:\n                return self.__getConHashProxyForNormal(reqmsg.hashCode)\n            else:\n                return self.__getHashProxyForNormal(reqmsg.hashCode)\n        else:\n            if reqmsg.isConHash:\n                return self.__getConHashProxyForWeight(reqmsg.hashCode)\n            else:\n                return self.__getHashProxyForWeight(reqmsg.hashCode)\n\n    def __getHashProxyForNormal(self, hashCode):\n        tarsLogger.debug('AdapterProxyManager:getHashProxyForNormal')\n        # self.__lock.acquire()\n        lock = LockGuard(self.__newLock)\n        regAdapterProxyList = sorted(\n            list(self.__regAdapterProxyDict.items()), key=lambda item: item[0])\n\n        allPrxSize = len(regAdapterProxyList)\n        if allPrxSize == 0:\n            raise TarsException(\"the adapter proxy is empty\")\n        hashNum = hashCode % allPrxSize\n\n        if regAdapterProxyList[hashNum][1][1].activatestateinreg and regAdapterProxyList[hashNum][1][1].checkActive():\n            epstr = regAdapterProxyList[hashNum][0]\n            self.__regAdapterProxyDict[epstr][2] += 1\n            if epstr in self.__adps:\n                self.__adps[epstr][2] += 1\n            elif epstr in self.__iadps:\n                self.__iadps[epstr][2] += 1\n            return self.__regAdapterProxyDict[epstr][1]\n        else:\n            if len(self.__adps) == 0:\n                raise TarsException(\"the activate adapter proxy is empty\")\n            activeProxyList = list(self.__adps.items())\n            actPrxSize = len(activeProxyList)\n            while actPrxSize != 0:\n                hashNum = hashCode % actPrxSize\n                if activeProxyList[hashNum][1][1].checkActive():\n                    self.__adps[activeProxyList[hashNum][0]][2] += 1\n                    return self.__adps[activeProxyList[hashNum][0]][1]\n                activeProxyList.pop(hashNum)\n                actPrxSize -= 1\n            # 随机重连一个可用节点\n            adpPrx = list(self.__adps.items())[random.randint(\n                0, len(self.__adps))][1][1]\n            adpPrx.checkActive()\n            return None\n\n    def __getConHashProxyForNormal(self, hashCode):\n        tarsLogger.debug('AdapterProxyManager:getConHashProxyForNormal')\n        lock = LockGuard(self.__newLock)\n        if len(self.__regAdapterProxyDict) == 0:\n            raise TarsException(\"the adapter proxy is empty\")\n        if self.__consistentHashWeight is None or self.__checkConHashChange(self.__lastConHashPrxList):\n            self.__updateConHashProxyWeighted()\n\n        if len(self.__consistentHashWeight.nodes) > 0:\n            conHashIndex = self.__consistentHashWeight.getNode(hashCode)\n            if conHashIndex in self.__regAdapterProxyDict and self.__regAdapterProxyDict[conHashIndex][1].activatestateinreg and self.__regAdapterProxyDict[conHashIndex][1].checkActive():\n                self.__regAdapterProxyDict[conHashIndex][2] += 1\n                if conHashIndex in self.__adps:\n                    self.__adps[conHashIndex][2] += 1\n                elif conHashIndex in self.__iadps:\n                    self.__iadps[conHashIndex][2] += 1\n                return self.__regAdapterProxyDict[conHashIndex][1]\n            else:\n                if len(self.__adps) == 0:\n                    raise TarsException(\"the activate adapter proxy is empty\")\n                activeProxyList = list(self.__adps.items())\n                actPrxSize = len(activeProxyList)\n                while actPrxSize != 0:\n                    hashNum = hashCode % actPrxSize\n                    if activeProxyList[hashNum][1][1].checkActive():\n                        self.__adps[activeProxyList[hashNum][0]][2] += 1\n                        return self.__adps[activeProxyList[hashNum][0]][1]\n                    activeProxyList.pop(hashNum)\n                    actPrxSize -= 1\n                # 随机重连一个可用节点\n                adpPrx = list(self.__adps.items())[random.randint(\n                    0, len(self.__adps))][1][1]\n                adpPrx.checkActive()\n                return None\n            pass\n        else:\n            return self.__getHashProxyForNormal(hashCode)\n\n    def __getHashProxyForWeight(self, hashCode):\n        return None\n        pass\n\n    def __getConHashProxyForWeight(self, hashCode):\n        return None\n        pass\n\n    def __checkConHashChange(self, lastConHashPrxList):\n        tarsLogger.debug('AdapterProxyManager:checkConHashChange')\n        lock = LockGuard(self.__newLock)\n        if len(lastConHashPrxList) != len(self.__regAdapterProxyDict):\n            return True\n        regAdapterProxyList = sorted(\n            list(self.__regAdapterProxyDict.items()), key=lambda item: item[0])\n        regAdapterProxyListSize = len(regAdapterProxyList)\n        for index in range(regAdapterProxyListSize):\n            if cmp(lastConHashPrxList[index][0], regAdapterProxyList[index][0]) != 0:\n                return True\n        return False\n\n    def __updateConHashProxyWeighted(self):\n        tarsLogger.debug('AdapterProxyManager:updateConHashProxyWeighted')\n        lock = LockGuard(self.__newLock)\n        if len(self.__regAdapterProxyDict) == 0:\n            raise TarsException(\"the adapter proxy is empty\")\n        self.__lastConHashPrxList = sorted(\n            list(self.__regAdapterProxyDict.items()), key=lambda item: item[0])\n        nodes = []\n        for var in self.__lastConHashPrxList:\n            nodes.append(var[0])\n        if self.__consistentHashWeight is None:\n            self.__consistentHashWeight = ConsistentHashNew(nodes)\n        else:\n            theOldActiveNodes = [\n                var for var in nodes if var in self.__consistentHashWeight.nodes]\n\n            theOldInactiveNodes = [\n                var for var in self.__consistentHashWeight.nodes if var not in theOldActiveNodes]\n            for var in theOldInactiveNodes:\n                self.__consistentHashWeight.removeNode(var)\n\n            theNewActiveNodes = [\n                var for var in nodes if var not in theOldActiveNodes]\n            for var in theNewActiveNodes:\n                self.__consistentHashWeight.addNode(var)\n\n            self.__consistentHashWeight.nodes = nodes\n        pass\n\n    def __getWeightedProxy(self):\n        tarsLogger.debug('AdapterProxyManager:getWeightedProxy')\n        lock = LockGuard(self.__newLock)\n        if len(self.__adps) == 0:\n            raise TarsException(\"the activate adapter proxy is empty\")\n\n        if self.__update is True:\n            self.__lastWeightedProxyData.clear()\n            weightedProxyData = {}\n            minWeight = (list(self.__adps.items())[0][1][0]).getWeight()\n            for item in list(self.__adps.items()):\n                weight = (item[1][0].getWeight())\n                weightedProxyData[item[0]] = (weight)\n                if minWeight > weight:\n                    minWeight = weight\n\n            if minWeight <= 0:\n                addWeight = -minWeight + 1\n                for item in list(weightedProxyData.items()):\n                    item[1] += addWeight\n\n            self.__update = False\n            self.__lastWeightedProxyData = weightedProxyData\n\n        weightedProxyData = self.__lastWeightedProxyData\n        while len(weightedProxyData) > 0:\n            total = sum(weightedProxyData.values())\n            rand = random.randint(1, total)\n            temp = 0\n            for item in list(weightedProxyData.items()):\n                temp += item[1]\n                if rand <= temp:\n                    if self.__adps[item[0]][1].checkActive():\n                        self.__adps[item[0]][2] += 1\n                        return self.__adps[item[0]][1]\n                    else:\n                        weightedProxyData.pop(item[0])\n                        break\n        # 没有一个活跃的节点\n        # 随机重连一个可用节点\n        adpPrx = list(self.__adps.items())[random.randint(\n            0, len(self.__adps))][1][1]\n        adpPrx.checkActive()\n        return None\n\n    def selectAdapterProxy(self, reqmsg):\n        '''\n        @brief: 刷新本地缓存列表，如果服务下线了，要求删除本地缓存，通过一定算法返回AdapterProxy\n        @param: reqmsg:请求响应报文\n        @type reqmsg: ReqMessage\n        @return:\n        @rtype: EndPointInfo列表\n        @todo: 优化负载均衡算法\n        '''\n        tarsLogger.debug('AdapterProxyManager:selectAdapterProxy')\n        self.refreshEndpoints()\n        if reqmsg.isHash:\n            return self.__getHashProxy(reqmsg)\n        else:\n            if self.__weightType == EndpointWeightType.E_STATIC_WEIGHT:\n                return self.__getWeightedProxy()\n            else:\n                return self.__getNextValidProxy()\n"
  },
  {
    "path": "danmu/danmaku/tars/__async.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# filename: __rpc.py\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n'''\n@version: 0.01\n@brief: 异步rpc实现\n'''\n\nimport threading\nimport Queue\nfrom __logger import tarsLogger\nfrom __packet import ResponsePacket\nfrom __servantproxy import ServantProxy\n\n\nclass AsyncProcThread:\n    '''\n    @brief: 异步调用线程管理类\n    '''\n\n    def __init__(self):\n        tarsLogger.debug('AsyncProcThread:__init__')\n        self.__initialize = False\n        self.__runners = []\n        self.__queue = None\n        self.__nrunner = 0\n        self.__popTimeout = 0.1\n\n    def __del__(self):\n        tarsLogger.debug('AsyncProcThread:__del__')\n\n    def initialize(self, nrunner=3):\n        '''\n        @brief: 使用AsyncProcThread前必须先调用此函数\n        @param nrunner: 异步线程个数\n        @type nrunner: int\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AsyncProcThread:initialize')\n        if self.__initialize:\n            return\n        self.__nrunner = nrunner\n        self.__queue = Queue.Queue()\n        self.__initialize = True\n\n    def terminate(self):\n        '''\n        @brief: 关闭所有异步线程\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AsyncProcThread:terminate')\n\n        for runner in self.__runners:\n            runner.terminate()\n\n        for runner in self.__runners:\n            runner.join()\n        self.__runners = []\n\n    def put(self, reqmsg):\n        '''\n        @brief: 处理数据入队列\n        @param reqmsg: 待处理数据\n        @type reqmsg: ReqMessage\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AsyncProcThread:put')\n        # 异步请求超时\n        if not reqmsg.response:\n            reqmsg.response = ResponsePacket()\n            reqmsg.response.iVerson = reqmsg.request.iVerson\n            reqmsg.response.cPacketType = reqmsg.request.cPacketType\n            reqmsg.response.iRequestId = reqmsg.request.iRequestId\n            reqmsg.response.iRet = ServantProxy.TARSASYNCCALLTIMEOUT\n\n        self.__queue.put(reqmsg)\n\n    def pop(self):\n        '''\n        @brief: 处理数据出队列\n        @return: ReqMessage\n        @rtype: ReqMessage\n        '''\n        # tarsLogger.debug('AsyncProcThread:pop')\n        ret = None\n        try:\n            ret = self.__queue.get(True, self.__popTimeout)\n        except Queue.Empty:\n            pass\n        return ret\n\n    def start(self):\n        '''\n        @brief: 启动异步线程\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AsyncProcThread:start')\n        for i in xrange(self.__nrunner):\n            runner = AsyncProcThreadRunner()\n            runner.initialize(self)\n            runner.start()\n            self.__runners.append(runner)\n\n\nclass AsyncProcThreadRunner(threading.Thread):\n    '''\n    @brief: 异步调用线程\n    '''\n\n    def __init__(self):\n        tarsLogger.debug('AsyncProcThreadRunner:__init__')\n        super(AsyncProcThreadRunner, self).__init__()\n        # threading.Thread.__init__(self)\n        self.__terminate = False\n        self.__initialize = False\n        self.__procQueue = None\n\n    def __del__(self):\n        tarsLogger.debug('AsyncProcThreadRunner:__del__')\n\n    def initialize(self, queue):\n        '''\n        @brief: 使用AsyncProcThreadRunner前必须调用此函数\n        @param queue: 有pop()的类，用于提取待处理数据\n        @type queue: AsyncProcThread\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AsyncProcThreadRunner:initialize')\n        self.__procQueue = queue\n\n    def terminate(self):\n        '''\n        @brief: 关闭线程\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('AsyncProcThreadRunner:terminate')\n        self.__terminate = True\n\n    def run(self):\n        '''\n        @brief: 线程启动函数，执行异步调用\n        '''\n        tarsLogger.debug('AsyncProcThreadRunner:run')\n        while not self.__terminate:\n            if self.__terminate:\n                break\n            reqmsg = self.__procQueue.pop()\n            if not reqmsg or not reqmsg.callback:\n                continue\n\n            if reqmsg.adapter:\n                succ = reqmsg.response.iRet == ServantProxy.TARSSERVERSUCCESS\n                reqmsg.adapter.finishInvoke(succ)\n\n            try:\n                reqmsg.callback.onDispatch(reqmsg)\n            except Exception, msg:\n                tarsLogger.error('AsyncProcThread excepttion: %s', msg)\n\n        tarsLogger.debug('AsyncProcThreadRunner:run finished')\n\n\nclass ServantProxyCallback(object):\n    '''\n    @brief: 异步回调对象基类\n    '''\n\n    def __init__(self):\n        tarsLogger.debug('ServantProxyCallback:__init__')\n\n    def onDispatch(reqmsg):\n        '''\n        @brief: 分配响应报文到对应的回调函数\n        @param queue: 有pop()的类，用于提取待处理数据\n        @type queue: AsyncProcThread\n        @return: None\n        @rtype: None\n        '''\n        raise NotImplementedError()\n"
  },
  {
    "path": "danmu/danmaku/tars/__init__.py",
    "content": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n__version__ = \"0.0.1\"\n\nfrom .__util import util\nfrom .__tars import TarsInputStream\nfrom .__tars import TarsOutputStream\nfrom .__tup import TarsUniPacket\n\n\nclass tarscore:\n    class TarsInputStream(TarsInputStream):\n        pass\n\n    class TarsOutputStream(TarsOutputStream):\n        pass\n\n    class TarsUniPacket(TarsUniPacket):\n        pass\n\n    class boolean(util.boolean):\n        pass\n\n    class int8(util.int8):\n        pass\n\n    class uint8(util.uint8):\n        pass\n\n    class int16(util.int16):\n        pass\n\n    class uint16(util.uint16):\n        pass\n\n    class int32(util.int32):\n        pass\n\n    class uint32(util.uint32):\n        pass\n\n    class int64(util.int64):\n        pass\n\n    class float(util.float):\n        pass\n\n    class double(util.double):\n        pass\n\n    class bytes(util.bytes):\n        pass\n\n    class string(util.string):\n        pass\n\n    class struct(util.struct):\n        pass\n\n    @staticmethod\n    def mapclass(ktype, vtype): return util.mapclass(ktype, vtype)\n\n    @staticmethod\n    def vctclass(vtype): return util.vectorclass(vtype)\n\n    @staticmethod\n    def printHex(buff): util.printHex(buff)\n\n"
  },
  {
    "path": "danmu/danmaku/tars/__logger.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# filename: __logger.py\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n'''\n@version: 0.01\n@brief: 日志模块\n'''\n\n# 仅用于调试\n\nimport logging\nfrom logging.handlers import RotatingFileHandler\nimport os\nimport re\n\ntarsLogger = logging.getLogger('TARS client')\nstrToLoggingLevel = {\n    \"critical\": logging.CRITICAL,\n    \"error\": logging.ERROR,\n    \"warn\": logging.WARNING,\n    \"info\": logging.INFO,\n    \"debug\": logging.DEBUG,\n    \"none\": logging.NOTSET\n}\n#console = logging.StreamHandler()\n# console.setLevel(logging.DEBUG)\n#filelog = logging.FileHandler('tars.log')\n# filelog.setLevel(logging.DEBUG)\n#formatter = logging.Formatter('%(asctime)s | %(levelname)8s | [%(name)s] %(message)s', '%Y-%m-%d %H:%M:%S')\n# console.setFormatter(formatter)\n# filelog.setFormatter(formatter)\n# tarsLogger.addHandler(console)\n# tarsLogger.addHandler(filelog)\n# tarsLogger.setLevel(logging.DEBUG)\n# tarsLogger.setLevel(logging.INFO)\n# tarsLogger.setLevel(logging.ERROR)\n\n\ndef createLogFile(filename):\n    if filename.endswith('/'):\n        raise ValueError(\"The logfile is a dir not a file\")\n    if os.path.exists(filename) and os.path.isfile(filename):\n        pass\n    else:\n        fileComposition = str.split(filename, '/')\n        print(fileComposition)\n        currentFile = ''\n        for item in fileComposition:\n            if item == fileComposition[-1]:\n                currentFile += item\n                if not os.path.exists(currentFile) or not os.path.isfile(currentFile):\n                    while True:\n                        try:\n                            os.mknod(currentFile)\n                            break\n                        except OSError as msg:\n                            errno = re.findall(r\"\\d+\", str(msg))\n                            if len(errno) > 0 and errno[0] == '17':\n                                currentFile += '.log'\n                                continue\n                break\n            currentFile += (item + '/')\n            if not os.path.exists(currentFile):\n                os.mkdir(currentFile)\n\n\ndef initLog(logpath, logsize, lognum, loglevel):\n    createLogFile(logpath)\n    handler = RotatingFileHandler(filename=logpath, maxBytes=logsize,\n                                  backupCount=lognum)\n    formatter = logging.Formatter(\n        '%(asctime)s | %(levelname)6s | [%(filename)18s:%(lineno)4d] | [%(thread)d] %(message)s', '%Y-%m-%d %H:%M:%S')\n    handler.setFormatter(formatter)\n    tarsLogger.addHandler(handler)\n    if loglevel in strToLoggingLevel:\n        tarsLogger.setLevel(strToLoggingLevel[loglevel])\n    else:\n        tarsLogger.setLevel(strToLoggingLevel[\"error\"])\n\n\nif __name__ == '__main__':\n    tarsLogger.debug('debug log')\n    tarsLogger.info('info log')\n    tarsLogger.warning('warning log')\n    tarsLogger.error('error log')\n    tarsLogger.critical('critical log')\n"
  },
  {
    "path": "danmu/danmaku/tars/__packet.py",
    "content": "# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n\nfrom .__util import util\n\n\nclass RequestPacket(util.struct):\n    mapcls_context = util.mapclass(util.string, util.string)\n    mapcls_status = util.mapclass(util.string, util.string)\n\n    def __init__(self):\n        self.iVersion = 0\n        self.cPacketType = 0\n        self.iMessageType = 0\n        self.iRequestId = 0\n        self.sServantName = ''\n        self.sFuncName = ''\n        self.sBuffer = bytes()\n        self.iTimeout = 0\n        self.context = RequestPacket.mapcls_context()\n        self.status = RequestPacket.mapcls_status()\n\n    @staticmethod\n    def writeTo(oos, value):\n        oos.write(util.int16, 1, value.iVersion)\n        oos.write(util.int8, 2, value.cPacketType)\n        oos.write(util.int32, 3, value.iMessageType)\n        oos.write(util.int32, 4, value.iRequestId)\n        oos.write(util.string, 5, value.sServantName)\n        oos.write(util.string, 6, value.sFuncName)\n        oos.write(util.bytes, 7, value.sBuffer)\n        oos.write(util.int32, 8, value.iTimeout)\n        oos.write(RequestPacket.mapcls_context, 9, value.context)\n        oos.write(RequestPacket.mapcls_status, 10, value.status)\n\n    @staticmethod\n    def readFrom(ios):\n        value = RequestPacket()\n        value.iVersion = ios.read(util.int16, 1, True, 0)\n        print((\"iVersion = %d\" % value.iVersion))\n        value.cPacketType = ios.read(util.int8, 2, True, 0)\n        print((\"cPackerType = %d\" % value.cPacketType))\n        value.iMessageType = ios.read(util.int32, 3, True, 0)\n        print((\"iMessageType = %d\" % value.iMessageType))\n        value.iRequestId = ios.read(util.int32, 4, True, 0)\n        print((\"iRequestId = %d\" % value.iRequestId))\n        value.sServantName = ios.read(util.string, 5, True, '22222222')\n        value.sFuncName = ios.read(util.string, 6, True, '')\n        value.sBuffer = ios.read(util.bytes, 7, True, value.sBuffer)\n        value.iTimeout = ios.read(util.int32, 8, True, 0)\n        value.context = ios.read(\n            RequestPacket.mapcls_context, 9, True, value.context)\n        value.status = ios.read(\n            RequestPacket.mapcls_status, 10, True, value.status)\n        return value\n\n\nclass ResponsePacket(util.struct):\n    __tars_class__ = \"tars.RpcMessage.ResponsePacket\"\n    mapcls_status = util.mapclass(util.string, util.string)\n\n    def __init__(self):\n        self.iVersion = 0\n        self.cPacketType = 0\n        self.iRequestId = 0\n        self.iMessageType = 0\n        self.iRet = 0\n        self.sBuffer = bytes()\n        self.status = RequestPacket.mapcls_status()\n\n    @staticmethod\n    def writeTo(oos, value):\n        oos.write(util.int16, 1, value.iVersion)\n        oos.write(util.int8, 2, value.cPacketType)\n        oos.write(util.int32, 3, value.iRequestId)\n        oos.write(util.int32, 4, value.iMessageType)\n        oos.write(util.int32, 5, value.iRet)\n        oos.write(util.bytes, 6, value.sBuffer)\n        oos.write(value.mapcls_status, 7, value.status)\n\n    @staticmethod\n    def readFrom(ios):\n        value = ResponsePacket()\n        value.iVersion = ios.read(util.int16, 1, True)\n        value.cPacketType = ios.read(util.int8, 2, True)\n        value.iRequestId = ios.read(util.int32, 3, True)\n        value.iMessageType = ios.read(util.int32, 4, True)\n        value.iRet = ios.read(util.int32, 5, True)\n        value.sBuffer = ios.read(util.bytes, 6, True)\n        value.status = ios.read(value.mapcls_status, 7, True)\n        return value\n"
  },
  {
    "path": "danmu/danmaku/tars/__rpc.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# filename: __rpc.py\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n\n'''\n@version: 0.01\n@brief: rpc调用逻辑实现\n'''\n\nimport time\nimport argparse\n\nfrom .__logger import tarsLogger\nfrom .__logger import initLog\nfrom .__trans import EndPointInfo\nfrom .__TimeoutQueue import TimeoutQueue\nfrom .__TimeoutQueue import QueueTimeout\nfrom .__trans import FDReactor\nfrom .__adapterproxy import AdapterProxyManager\nfrom .__servantproxy import ServantProxy\nfrom .exception import (TarsException)\nfrom .__async import AsyncProcThread\n\n\nclass Communicator:\n    '''\n    @brief: 通讯器，创建和维护ServantProxy、ObjectProxy、FDReactor线程和超时线程\n    '''\n    default_config = {'tars':\n                      {'application':\n                       {'client':\n                        {'async-invoke-timeout': 20000,\n                         'asyncthread': 0,\n                         'locator': '',\n                            'loglevel': 'error',\n                            'logpath': 'tars.log',\n                            'logsize': 15728640,\n                            'lognum': 0,\n                            'refresh-endpoint-interval': 60000,\n                            'sync-invoke-timeout': 5000}}}}\n\n    def __init__(self, config={}):\n        tarsLogger.debug('Communicator:__init__')\n        self.__terminate = False\n        self.__initialize = False\n        self.__objects = {}\n        self.__servants = {}\n        self.__reactor = None\n        self.__qTimeout = None\n        self.__asyncProc = None\n        self.__config = Communicator.default_config.copy()\n        self.__config.update(config)\n        self.initialize()\n\n    def __del__(self):\n        tarsLogger.debug('Communicator:__del__')\n\n    def initialize(self):\n        '''\n        @brief: 使用通讯器前必须先调用此函数\n        '''\n        tarsLogger.debug('Communicator:initialize')\n        if self.__initialize:\n            return\n        logpath = self.getProperty('logpath')\n        logsize = self.getProperty('logsize', int)\n        lognum = self.getProperty('lognum', int)\n        loglevel = self.getProperty('loglevel')\n        initLog(logpath, logsize, lognum, loglevel)\n\n        self.__reactor = FDReactor()\n        self.__reactor.initialize()\n        self.__reactor.start()\n\n        self.__qTimeout = QueueTimeout()\n        self.__qTimeout.setHandler(self.handleTimeout)\n        self.__qTimeout.start()\n\n        async_num = self.getProperty('asyncthread', int)\n        self.__asyncProc = AsyncProcThread()\n        self.__asyncProc.initialize(async_num)\n        self.__asyncProc.start()\n\n        self.__initialize = True\n\n    def terminate(self):\n        '''\n        @brief: 不再使用通讯器需调用此函数释放资源\n        '''\n        tarsLogger.debug('Communicator:terminate')\n\n        if not self.__initialize:\n            return\n\n        self.__reactor.terminate()\n        self.__qTimeout.terminate()\n        self.__asyncProc.terminate()\n\n        for objName in self.__servants:\n            self.__servants[objName]._terminate()\n\n        for objName in self.__objects:\n            self.__objects[objName].terminate()\n\n        self.__objects = {}\n        self.__servants = {}\n        self.__reactor = None\n        self.__initialize = False\n\n    def parseConnAddr(self, connAddr):\n        '''\n        @brief: 解析connAddr字符串\n        @param connAddr: 连接地址\n        @type connAddr: str\n        @return: 解析结果\n        @rtype: dict, key是str，val里name是str，\n                timeout是float，endpoint是EndPointInfo的list\n        '''\n        tarsLogger.debug('Communicator:parseConnAddr')\n        connAddr = connAddr.strip()\n        connInfo = {\n            'name': '',\n            'timeout': -1,\n            'endpoint': []\n        }\n        if '@' not in connAddr:\n            connInfo['name'] = connAddr\n            return connInfo\n\n        try:\n            tks = connAddr.split('@')\n            connInfo['name'] = tks[0]\n            tks = tks[1].lower().split(':')\n            parser = argparse.ArgumentParser(add_help=False)\n            parser.add_argument('-h')\n            parser.add_argument('-p')\n            parser.add_argument('-t')\n            for tk in tks:\n                argv = tk.split()\n                if argv[0] != 'tcp':\n                    raise TarsException(\n                        'unsupport transmission protocal : %s' % connInfo['name'])\n                mes = parser.parse_args(argv[1:])\n                try:\n                    ip = mes.h if mes.h is not None else ''\n                    port = int(mes.p) if mes.p is not None else '-1'\n                    timeout = int(mes.t) if mes.t is not None else '-1'\n                    connInfo['endpoint'].append(\n                        EndPointInfo(ip, port, timeout))\n                except Exception:\n                    raise TarsException('Unrecognized option : %s' % mes)\n        except TarsException:\n            raise\n\n        except Exception as exp:\n            raise TarsException(exp)\n\n        return connInfo\n\n    def getReactor(self):\n        '''\n        @brief: 获取reactor\n        '''\n        return self.__reactor\n\n    def getAsyncProc(self):\n        '''\n        @brief: 获取asyncProc\n        '''\n        return self.__asyncProc\n\n    def getProperty(self, name, dt_type=str):\n        '''\n        @brief: 获取配置\n        @param name: 配置名称\n        @type name: str\n        @param dt_type: 数据类型\n        @type name: type\n        @return: 配置内容\n        @rtype: str\n        '''\n        try:\n            ret = self.__config['tars']['application']['client'][name]\n            ret = dt_type(ret)\n        except:\n            ret = Communicator.default_config['tars']['application']['client'][name]\n\n        return ret\n\n    def setProperty(self, name, value):\n        '''\n        @brief: 修改配置\n        @param name: 配置名称\n        @type propertys: str\n        @param value: 配置内容\n        @type propertys: str\n        @return: 设置是否成功\n        @rtype: bool\n        '''\n        try:\n            self.__config['tars']['application']['client'][name] = value\n            return True\n        except:\n            return False\n\n    def setPropertys(self, propertys):\n        '''\n        @brief: 修改配置\n        @param propertys: 配置集合\n        @type propertys: map, key type: str, value type: str\n        @return: 无\n        @rtype: None\n        '''\n        pass\n\n    def updateConfig(self):\n        '''\n        @brief: 重新设置配置\n        '''\n\n    def stringToProxy(self, servantProxy, connAddr):\n        '''\n        @brief: 初始化ServantProxy\n        @param connAddr: 服务器地址信息\n        @type connAddr: str\n        @param servant: servant proxy\n        @type servant: ServantProxy子类\n        @return: 无\n        @rtype: None\n        @note: 如果connAddr的ServantObj连接过，返回连接过的ServantProxy\n               如果没有连接过，用参数servant初始化，返回servant\n        '''\n        tarsLogger.debug('Communicator:stringToProxy')\n\n        connInfo = self.parseConnAddr(connAddr)\n        objName = connInfo['name']\n        if objName in self.__servants:\n            return self.__servants[objName]\n\n        objectPrx = ObjectProxy()\n        objectPrx.initialize(self, connInfo)\n\n        servantPrx = servantProxy()\n        servantPrx._initialize(self.__reactor, objectPrx)\n        self.__objects[objName] = objectPrx\n        self.__servants[objName] = servantPrx\n        return servantPrx\n\n    def handleTimeout(self):\n        '''\n        @brief: 处理超时事件\n        @return: 无\n        @rtype: None\n        '''\n        # tarsLogger.debug('Communicator:handleTimeout')\n        for obj in self.__objects.values():\n            obj.handleQueueTimeout()\n\n\nclass ObjectProxy:\n    '''\n    @brief: 一个object name在一个Communicator里有一个objectproxy\n            管理收发的消息队列\n    '''\n    DEFAULT_TIMEOUT = 3.0\n\n    def __init__(self):\n        tarsLogger.debug('ObjectProxy:__init__')\n        self.__name = ''\n        self.__timeout = ObjectProxy.DEFAULT_TIMEOUT\n        self.__comm = None\n        self.__epi = None\n        self.__adpmanager = None\n        self.__timeoutQueue = None\n        # self.__adapter = None\n        self.__initialize = False\n\n    def __del__(self):\n        tarsLogger.debug('ObjectProxy:__del__')\n\n    def initialize(self, comm, connInfo):\n        '''\n        @brief: 初始化，使用ObjectProxy前必须调用\n        @param comm: 通讯器\n        @type comm: Communicator\n        @param connInfo: 连接信息\n        @type comm: dict\n        @return: None\n        @rtype: None\n        '''\n        if self.__initialize:\n            return\n        tarsLogger.debug('ObjectProxy:initialize')\n        self.__comm = comm\n        # async-invoke-timeout来设置队列时间\n        async_timeout = self.__comm.getProperty(\n            'async-invoke-timeout', float) / 1000\n        self.__timeoutQueue = TimeoutQueue(async_timeout)\n\n        self.__name = connInfo['name']\n\n        self.__timeout = self.__comm.getProperty(\n            'sync-invoke-timeout', float) / 1000\n\n        # 通过Communicator的配置设置超时\n        # 不再通过连接信息的-t来设置\n        # if connInfo['timeout'] != -1:\n        # self.__timeout = connInfo['timeout']\n        eplist = connInfo['endpoint']\n\n        self.__adpmanager = AdapterProxyManager()\n        self.__adpmanager.initialize(comm, self, eplist)\n\n        self.__initialize = True\n\n    def terminate(self):\n        '''\n        @brief: 回收资源，不再使用ObjectProxy时调用\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('ObjectProxy:terminate')\n        self.__timeoutQueue = None\n        self.__adpmanager.terminate()\n        self.__initialize = False\n\n    def name(self):\n        '''\n        @brief: 获取object name\n        @return: object name\n        @rtype: str\n        '''\n        return self.__name\n\n    # def setTimeout(self, timeout):\n        # '''\n        # @brief: 设置超时\n        # @param timeout: 超时时间，单位为s\n        # @type timeout: float\n        # @return: None\n        # @rtype: None\n        # '''\n        # self.__timeout = timeout\n        # self.__timeoutQueue.setTimeout(timeout)\n\n    def timeout(self):\n        '''\n        @brief: 获取超时时间\n        @return: 超时时间，单位为s\n        @rtype: float\n        '''\n        return self.__timeout\n\n    def getTimeoutQueue(self):\n        '''\n        @brief: 获取超时队列\n        @return: 超时队列\n        @rtype: TimeoutQueue\n        '''\n        return self.__timeoutQueue\n\n    def handleQueueTimeout(self):\n        '''\n        @brief: 超时事件发生时处理超时事务\n        @return: None\n        @rtype: None\n        '''\n        # tarsLogger.debug('ObjectProxy:handleQueueTimeout')\n        self.__timeoutQueue.timeout()\n\n    def invoke(self, reqmsg):\n        '''\n        @brief: 远程过程调用\n        @param reqmsg: 请求响应报文\n        @type reqmsg: ReqMessage\n        @return: 错误码\n        @rtype:\n        '''\n        tarsLogger.debug('ObjectProxy:invoke, objname: %s, func: %s',\n                         self.__name, reqmsg.request.sFuncName)\n        # 负载均衡\n        # adapter = self.__adpmanager.getNextValidProxy()\n        adapter = self.__adpmanager.selectAdapterProxy(reqmsg)\n        if not adapter:\n            tarsLogger.error(\"invoke %s, select adapter proxy return None\",\n                             self.__name)\n            return -2\n\n        adapter.checkActive(True)\n        reqmsg.adapter = adapter\n        return adapter.invoke(reqmsg)\n\n    # 弹出请求报文\n    def popRequest(self):\n        '''\n        @brief: 返回消息队列里的请求响应报文，FIFO\n                不删除TimeoutQueue里的数据，响应时要用\n        @return: 请求响应报文\n        @rtype: ReqMessage\n        '''\n        return self.__timeoutQueue.pop(erase=False)\n\n\nif __name__ == '__main__':\n    connAddr = \"apptest.lightServer.lightServantObj@tcp -h 10.130.64.220 -p 10001 -t 10000\"\n    connAddr = 'MTT.BookMarksUnifyServer.BookMarksUnifyObj@tcp -h 172.17.149.77 -t 60000 -p 10023'\n    comm = Communicator()\n    comm.initialize()\n    servant = ServantProxy()\n    servant = comm.stringToProxy(connAddr, servant)\n    print(servant.tars_timeout())\n    try:\n        rsp = servant.tars_invoke(\n            ServantProxy.TARSNORMAL, \"test\", '', ServantProxy.mapcls_context(), None)\n        print('Servant invoke success, request id: %d, iRet: %d' % (\n            rsp.iRequestId, rsp.iRet))\n    except Exception as msg:\n        print(msg)\n    finally:\n        servant.tars_terminate()\n    time.sleep(2)\n    print('app closing ...')\n    comm.terminate()\n    time.sleep(2)\n    print('cpp closed')\n"
  },
  {
    "path": "danmu/danmaku/tars/__servantproxy.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# filename: __servantproxy.py\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n\n'''\n@version: 0.01\n@brief: rpc抽离出servantproxy\n'''\nimport threading\nimport time\n\nfrom __logger import tarsLogger\nfrom __util import util\nfrom __packet import RequestPacket\n# from __packet import ResponsePacket\nfrom __TimeoutQueue import ReqMessage\nimport exception\nfrom exception import TarsException\n\n\nclass ServantProxy(object):\n    '''\n    @brief: 1、远程对象的本地代理\n            2、同名servant在一个通信器中最多只有一个实例\n            3、防止和用户在Tars中定义的函数名冲突，接口以tars_开头\n    '''\n\n    # 服务器响应的错误码\n    TARSSERVERSUCCESS = 0  # 服务器端处理成功\n    TARSSERVERDECODEERR = -1  # 服务器端解码异常\n    TARSSERVERENCODEERR = -2  # 服务器端编码异常\n    TARSSERVERNOFUNCERR = -3  # 服务器端没有该函数\n    TARSSERVERNOSERVANTERR = -4  # 服务器端五该Servant对象\n    TARSSERVERRESETGRID = -5  # 服务器端灰度状态不一致\n    TARSSERVERQUEUETIMEOUT = -6  # 服务器队列超过限制\n    TARSASYNCCALLTIMEOUT = -7  # 异步调用超时\n    TARSPROXYCONNECTERR = -8  # proxy链接异常\n    TARSSERVERUNKNOWNERR = -99  # 服务器端未知异常\n\n    TARSVERSION = 1\n    TUPVERSION = 2\n    TUPVERSION2 = 3\n\n    TARSNORMAL = 0\n    TARSONEWAY = 1\n\n    TARSMESSAGETYPENULL = 0\n    TARSMESSAGETYPEHASH = 1\n    TARSMESSAGETYPEGRID = 2\n    TARSMESSAGETYPEDYED = 4\n    TARSMESSAGETYPESAMPLE = 8\n    TARSMESSAGETYPEASYNC = 16\n\n    mapcls_context = util.mapclass(util.string, util.string)\n\n    def __init__(self):\n        tarsLogger.debug('ServantProxy:__init__')\n        self.__reactor = None\n        self.__object = None\n        self.__initialize = False\n\n    def __del__(self):\n        tarsLogger.debug('ServantProxy:__del__')\n\n    def _initialize(self, reactor, obj):\n        '''\n        @brief: 初始化函数，需要调用才能使用ServantProxy\n        @param reactor: 网络管理的reactor实例\n        @type reactor: FDReactor\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('ServantProxy:_initialize')\n\n        assert(reactor and obj)\n        if self.__initialize:\n            return\n        self.__reactor = reactor\n        self.__object = obj\n        self.__initialize = True\n\n    def _terminate(self):\n        '''\n        @brief: 不再使用ServantProxy时调用，会释放相应资源\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('ServantProxy:_terminate')\n        self.__object = None\n        self.__reactor = None\n        self.__initialize = False\n\n    def tars_name(self):\n        '''\n        @brief: 获取ServantProxy的名字\n        @return: ServantProxy的名字\n        @rtype: str\n        '''\n        return self.__object.name()\n\n    def tars_timeout(self):\n        '''\n        @brief: 获取超时时间，单位是ms\n        @return: 超时时间\n        @rtype: int\n        '''\n        # 默认的为3S = ObjectProxy.DEFAULT_TIMEOUT\n        return int(self.__timeout() * 1000)\n\n    def tars_ping(self):\n        pass\n\n    # def tars_initialize(self):\n        # pass\n\n    # def tars_terminate(self):\n        # pass\n\n    def tars_invoke(self, cPacketType, sFuncName, sBuffer, context, status):\n        '''\n        @brief: TARS协议同步方法调用\n        @param cPacketType: 请求包类型\n        @type cPacketType: int\n        @param sFuncName: 调用函数名\n        @type sFuncName: str\n        @param sBuffer: 序列化后的发送参数\n        @type sBuffer: str\n        @param context: 上下文件信息\n        @type context: ServantProxy.mapcls_context\n        @param status: 状态信息\n        @type status:\n        @return: 响应报文\n        @rtype: ResponsePacket\n        '''\n        tarsLogger.debug('ServantProxy:tars_invoke, func: %s', sFuncName)\n        req = RequestPacket()\n        req.iVersion = ServantProxy.TARSVERSION\n        req.cPacketType = cPacketType\n        req.iMessageType = ServantProxy.TARSMESSAGETYPENULL\n        req.iRequestId = 0\n        req.sServantName = self.tars_name()\n        req.sFuncName = sFuncName\n        req.sBuffer = sBuffer\n        req.iTimeout = self.tars_timeout()\n\n        reqmsg = ReqMessage()\n        reqmsg.type = ReqMessage.SYNC_CALL\n        reqmsg.servant = self\n        reqmsg.lock = threading.Condition()\n        reqmsg.request = req\n        reqmsg.begtime = time.time()\n        # # test\n        reqmsg.isHash = True\n        reqmsg.isConHash = True\n        reqmsg.hashCode = 123456\n\n        rsp = None\n        try:\n            rsp = self.__invoke(reqmsg)\n        except exception.TarsSyncCallTimeoutException:\n            if reqmsg.adapter:\n                reqmsg.adapter.finishInvoke(True)\n            raise\n        except TarsException:\n            raise\n        except:\n            raise TarsException('ServantProxy::tars_invoke excpetion')\n\n        if reqmsg.adapter:\n            reqmsg.adapter.finishInvoke(False)\n\n        return rsp\n\n    def tars_invoke_async(self, cPacketType, sFuncName, sBuffer,\n                          context, status, callback):\n        '''\n        @brief: TARS协议同步方法调用\n        @param cPacketType: 请求包类型\n        @type cPacketType: int\n        @param sFuncName: 调用函数名\n        @type sFuncName: str\n        @param sBuffer: 序列化后的发送参数\n        @type sBuffer: str\n        @param context: 上下文件信息\n        @type context: ServantProxy.mapcls_context\n        @param status: 状态信息\n        @type status:\n        @param callback: 异步调用回调对象\n        @type callback: ServantProxyCallback的子类\n        @return: 响应报文\n        @rtype: ResponsePacket\n        '''\n        tarsLogger.debug('ServantProxy:tars_invoke')\n        req = RequestPacket()\n        req.iVersion = ServantProxy.TARSVERSION\n        req.cPacketType = cPacketType if callback else ServantProxy.TARSONEWAY\n        req.iMessageType = ServantProxy.TARSMESSAGETYPENULL\n        req.iRequestId = 0\n        req.sServantName = self.tars_name()\n        req.sFuncName = sFuncName\n        req.sBuffer = sBuffer\n        req.iTimeout = self.tars_timeout()\n\n        reqmsg = ReqMessage()\n        reqmsg.type = ReqMessage.ASYNC_CALL if callback else ReqMessage.ONE_WAY\n        reqmsg.callback = callback\n        reqmsg.servant = self\n        reqmsg.request = req\n        reqmsg.begtime = time.time()\n\n        rsp = None\n        try:\n            rsp = self.__invoke(reqmsg)\n        except TarsException:\n            raise\n        except Exception:\n            raise TarsException('ServantProxy::tars_invoke excpetion')\n\n        if reqmsg.adapter:\n            reqmsg.adapter.finishInvoke(False)\n\n        return rsp\n\n    def __timeout(self):\n        '''\n        @brief: 获取超时时间，单位是s\n        @return: 超时时间\n        @rtype: float\n        '''\n        return self.__object.timeout()\n\n    def __invoke(self, reqmsg):\n        '''\n        @brief: 远程过程调用\n        @param reqmsg: 请求数据\n        @type reqmsg: ReqMessage\n        @return: 调用成功或失败\n        @rtype: bool\n        '''\n        tarsLogger.debug('ServantProxy:invoke, func: %s',\n                         reqmsg.request.sFuncName)\n        ret = self.__object.invoke(reqmsg)\n        if ret == -2:\n            errmsg = ('ServantProxy::invoke fail, no valid servant,' +\n                      ' servant name : %s, function name : %s' %\n                      (reqmsg.request.sServantName,\n                       reqmsg.request.sFuncName))\n            raise TarsException(errmsg)\n        if ret == -1:\n            errmsg = ('ServantProxy::invoke connect fail,' +\n                      ' servant name : %s, function name : %s, adapter : %s' %\n                      (reqmsg.request.sServantName,\n                       reqmsg.request.sFuncName,\n                       reqmsg.adapter.getEndPointInfo()))\n            raise TarsException(errmsg)\n        elif ret != 0:\n            errmsg = ('ServantProxy::invoke unknown fail, ' +\n                      'Servant name : %s, function name : %s' %\n                      (reqmsg.request.sServantName,\n                       reqmsg.request.sFuncName))\n            raise TarsException(errmsg)\n\n        if reqmsg.type == ReqMessage.SYNC_CALL:\n            reqmsg.lock.acquire()\n            reqmsg.lock.wait(self.__timeout())\n            reqmsg.lock.release()\n\n            if not reqmsg.response:\n                errmsg = ('ServantProxy::invoke timeout: %d, servant name'\n                          ': %s, adapter: %s, request id: %d' % (\n                              self.tars_timeout(),\n                              self.tars_name(),\n                              reqmsg.adapter.trans().getEndPointInfo(),\n                              reqmsg.request.iRequestId))\n                raise exception.TarsSyncCallTimeoutException(errmsg)\n            elif reqmsg.response.iRet == ServantProxy.TARSSERVERSUCCESS:\n                return reqmsg.response\n            else:\n                errmsg = 'servant name: %s, function name: %s' % (\n                         self.tars_name(), reqmsg.request.sFuncName)\n                self.tarsRaiseException(reqmsg.response.iRet, errmsg)\n\n    def _finished(self, reqmsg):\n        '''\n        @brief: 通知远程过程调用线程响应报文到了\n        @param reqmsg: 请求响应报文\n        @type reqmsg: ReqMessage\n        @return: 函数执行成功或失败\n        @rtype: bool\n        '''\n        tarsLogger.debug('ServantProxy:finished')\n        if not reqmsg.lock:\n            return False\n        reqmsg.lock.acquire()\n        reqmsg.lock.notifyAll()\n        reqmsg.lock.release()\n        return True\n\n    def tarsRaiseException(self, errno, desc):\n        '''\n        @brief: 服务器调用失败，根据服务端给的错误码抛出异常\n        @param errno: 错误码\n        @type errno: int\n        @param desc: 错误描述\n        @type desc: str\n        @return: 没有返回值，函数会抛出异常\n        @rtype:\n        '''\n        if errno == ServantProxy.TARSSERVERSUCCESS:\n            return\n\n        elif errno == ServantProxy.TARSSERVERDECODEERR:\n            raise exception.TarsServerDecodeException(\n                \"server decode exception: errno: %d, msg: %s\" % (errno, desc))\n\n        elif errno == ServantProxy.TARSSERVERENCODEERR:\n            raise exception.TarsServerEncodeException(\n                \"server encode exception: errno: %d, msg: %s\" % (errno, desc))\n\n        elif errno == ServantProxy.TARSSERVERNOFUNCERR:\n            raise exception.TarsServerNoFuncException(\n                \"server function mismatch exception: errno: %d, msg: %s\" % (errno, desc))\n\n        elif errno == ServantProxy.TARSSERVERNOSERVANTERR:\n            raise exception.TarsServerNoServantException(\n                \"server servant mismatch exception: errno: %d, msg: %s\" % (errno, desc))\n\n        elif errno == ServantProxy.TARSSERVERRESETGRID:\n            raise exception.TarsServerResetGridException(\n                \"server reset grid exception: errno: %d, msg: %s\" % (errno, desc))\n\n        elif errno == ServantProxy.TARSSERVERQUEUETIMEOUT:\n            raise exception.TarsServerQueueTimeoutException(\n                \"server queue timeout exception: errno: %d, msg: %s\" % (errno, desc))\n\n        elif errno == ServantProxy.TARSPROXYCONNECTERR:\n            raise exception.TarsServerQueueTimeoutException(\n                \"server connection lost: errno: %d, msg: %s\" % (errno, desc))\n\n        else:\n            raise exception.TarsServerUnknownException(\n                \"server unknown exception: errno: %d, msg: %s\" % (errno, desc))\n"
  },
  {
    "path": "danmu/danmaku/tars/__tars.py",
    "content": "# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\nimport struct\nfrom .__util import util\nfrom .exception import *\n\n\nclass BinBuffer:\n    def __init__(self, buff=bytes()):\n        self.buffer = buff\n        self.position = 0\n\n    def writeBuf(self, buff):\n        self.buffer += buff\n\n    def getBuffer(self):\n        return self.buffer\n\n    def length(self):\n        return len(self.buffer)\n\n\nclass DataHead:\n    EN_INT8 = 0\n    EN_INT16 = 1\n    EN_INT32 = 2\n    EN_INT64 = 3\n    EN_FLOAT = 4\n    EN_DOUBLE = 5\n    EN_STRING1 = 6\n    EN_STRING4 = 7\n    EN_MAP = 8\n    EN_LIST = 9\n    EN_STRUCTBEGIN = 10\n    EN_STRUCTEND = 11\n    EN_ZERO = 12\n    EN_BYTES = 13\n\n    @staticmethod\n    def writeTo(buff, tag, vtype):\n        if tag < 15:\n            helper = (tag << 4) | vtype\n            buff.writeBuf(struct.pack('!B', helper))\n        else:\n            helper = (0xF0 | vtype) << 8 | tag\n            buff.writeBuf(struct.pack('!H', helper))\n\n\nclass TarsOutputStream(object):\n    def __init__(self):\n        self.__buffer = BinBuffer()\n\n    def __writeBoolean(self, tag, value):\n        self.__writeInt8(tag, int(value))\n\n    def __writeInt8(self, tag, value):\n        if value == 0:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_ZERO)\n        else:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT8)\n            self.__buffer.writeBuf(struct.pack('!b', value))\n\n    def __writeInt16(self, tag, value):\n        if value >= -128 and value <= 127:\n            self.__writeInt8(tag, value)\n        else:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT16)\n            self.__buffer.writeBuf(struct.pack('!h', value))\n\n    def __writeInt32(self, tag, value):\n        if value >= -32768 and value <= 32767:\n            self.__writeInt16(tag, value)\n        else:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT32)\n            self.__buffer.writeBuf(struct.pack('!i', value))\n\n    def __writeInt64(self, tag, value):\n        if value >= (-2147483648) and value <= 2147483647:\n            self.__writeInt32(tag, value)\n        else:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT64)\n            self.__buffer.writeBuf(struct.pack('!q', value))\n\n    def __writeFloat(self, tag, value):\n        DataHead.writeTo(self.__buffer, tag, DataHead.EN_FLOAT)\n        self.__buffer.writeBuf(struct.pack('!f', value))\n\n    def __writeDouble(self, tag, value):\n        DataHead.writeTo(self.__buffer, tag, DataHead.EN_DOUBLE)\n        self.__buffer.writeBuf(struct.pack('!d', value))\n\n    def __writeString(self, tag, value):\n        length = len(value)\n        if length <= 255:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_STRING1)\n            self.__buffer.writeBuf(struct.pack('!B', length))\n            self.__buffer.writeBuf(str.encode(value))\n        else:\n            DataHead.writeTo(self.__buffer, tag, DataHead.EN_STRING4)\n            self.__buffer.writeBuf(struct.pack('!I', length))\n            self.__buffer.writeBuf(str.encode(value))\n\n    def __writeBytes(self, tag, value):\n        DataHead.writeTo(self.__buffer, tag, DataHead.EN_BYTES)\n        DataHead.writeTo(self.__buffer, 0,   DataHead.EN_INT8)\n        length = len(value)\n        self.__writeInt32(0, length)\n        self.__buffer.buffer += value\n        self.__buffer.position += length\n\n    def __writeMap(self, coder, tag, value):\n        DataHead.writeTo(self.__buffer, tag, DataHead.EN_MAP)\n        self.__writeInt32(0, len(value))\n        for key in value:\n            self.write(coder.ktype, 0, key)\n            self.write(coder.vtype, 1, value.get(key))\n\n    def __writeVector(self, coder, tag, value):\n        DataHead.writeTo(self.__buffer, tag, DataHead.EN_LIST)\n        n = len(value)\n        self.__writeInt32(0, n)\n        for i in range(0, n):\n            self.write(value.vtype, 0, value[i])\n\n    def __writeStruct(self, coder, tag, value):\n        DataHead.writeTo(self.__buffer, tag, DataHead.EN_STRUCTBEGIN)\n        value.writeTo(self, value)\n        DataHead.writeTo(self.__buffer, 0,   DataHead.EN_STRUCTEND)\n\n    def write(self, coder, tag, value):\n        if coder.__tars_index__ == 999:\n            self.__writeBoolean(tag, value)\n        elif coder.__tars_index__ == 0:\n            self.__writeInt8(tag, value)\n        elif coder.__tars_index__ == 1:\n            self.__writeInt16(tag, value)\n        elif coder.__tars_index__ == 2:\n            self.__writeInt32(tag, value)\n        elif coder.__tars_index__ == 3:\n            self.__writeInt64(tag, value)\n        elif coder.__tars_index__ == 4:\n            self.__writeFloat(tag, value)\n        elif coder.__tars_index__ == 5:\n            self.__writeDouble(tag, value)\n        elif coder.__tars_index__ == 13:\n            self.__writeBytes(tag, value)\n        elif coder.__tars_index__ == 67:\n            self.__writeString(tag, value)\n        elif coder.__tars_index__ == 8:\n            self.__writeMap(coder, tag, value)\n        elif coder.__tars_index__ == 9:\n            self.__writeVector(coder, tag, value)\n        elif coder.__tars_index__ == 1011:\n            self.__writeStruct(coder, tag, value)\n        else:\n            raise TarsTarsUnsupportType(\n                \"tars unsupport data type:\" % coder.__tars_index__)\n\n    def getBuffer(self):\n        return self.__buffer.getBuffer()\n\n    def printHex(self):\n        util.printHex(self.__buffer.getBuffer())\n\n\nclass TarsInputStream(object):\n    def __init__(self, buff):\n        self.__buffer = BinBuffer(buff)\n\n    def __peekFrom(self):\n        helper, = struct.unpack_from(\n            '!B', self.__buffer.buffer, self.__buffer.position)\n        t = (helper & 0xF0) >> 4\n        p = (helper & 0x0F)\n        l = 1\n        if t >= 15:\n            l = 2\n            t, = struct.unpack_from(\n                '!B', self.__buffer.buffer, self.__buffer.position + 1)\n        return (t, p, l)\n\n    def __readFrom(self):\n        t, p, l = self.__peekFrom()\n        self.__buffer.position += l\n        return (t, p, l)\n\n    def __skipToStructEnd(self):\n        t, p, l = self.__readFrom()\n        while p != DataHead.EN_STRUCTEND:\n            self.__skipField(p)\n            t, p, l = self.__readFrom()\n\n    def __skipField(self, p):\n        if p == DataHead.EN_INT8:\n            self.__buffer.position += 1\n        elif p == DataHead.EN_INT16:\n            self.__buffer.position += 2\n        elif p == DataHead.EN_INT32:\n            self.__buffer.position += 4\n        elif p == DataHead.EN_INT64:\n            self.__buffer.position += 8\n        elif p == DataHead.EN_FLOAT:\n            self.__buffer.position += 4\n        elif p == DataHead.EN_DOUBLE:\n            self.__buffer.position += 8\n        elif p == DataHead.EN_STRING1:\n            length, = struct.unpack_from(\n                '!B', self.__buffer.buffer, self.__buffer.position)\n            self.__buffer.position += length + 1\n        elif p == DataHead.EN_STRING4:\n            length, = struct.unpack_from(\n                '!i', self.__buffer.buffer, self.__buffer.position)\n            self.__buffer.position += length + 4\n        elif p == DataHead.EN_MAP:\n            size = self.__readInt32(0, True)\n            for i in range(0, size * 2):\n                ti, pi, li = self.__readFrom()\n                self.__skipField(pi)\n        elif p == DataHead.EN_LIST:\n            size = self.__readInt32(0, True)\n            for i in range(0, size):\n                ti, pi, li = self.__readFrom()\n                self.__skipField(pi)\n        elif p == DataHead.EN_BYTES:\n            ti, pi, li = self.__readFrom()\n            if pi != DataHead.EN_INT8:\n                raise TarsTarsDecodeInvalidValue(\n                    \"skipField with invalid type, type value: %d, %d.\" % (p, pi))\n            size = self.__readInt32(0, True)\n            self.__buffer.position += size\n        elif p == DataHead.EN_STRUCTBEGIN:\n            self.__skipToStructEnd()\n        elif p == DataHead.EN_STRUCTEND:\n            pass\n            #self.__buffer.position += length + 1;\n        elif p == DataHead.EN_ZERO:\n            pass\n            #self.__buffer.position += length + 1;\n        else:\n            raise TarsTarsDecodeMismatch(\n                \"skipField with invalid type, type value:%d\" % p)\n\n    def __skipToTag(self, tag):\n        length = self.__buffer.length()\n        while self.__buffer.position < length:\n            t, p, l = self.__peekFrom()\n            if tag <= t or p == DataHead.EN_STRUCTEND:\n                return False if (p == DataHead.EN_STRUCTEND) else (t == tag)\n\n            self.__buffer.position += l\n            self.__skipField(p)\n        return False\n\n    def __readBoolean(self, tag, require, default=None):\n        v = self.__readInt8(tag, require)\n        if v is None:\n            return default\n        else:\n            return (v != 0)\n\n    def __readInt8(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_ZERO:\n                return 0\n            elif p == DataHead.EN_INT8:\n                value, = struct.unpack_from(\n                    '!b', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 1\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'Char' type mismatch, tag: %d , get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readInt16(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_ZERO:\n                return 0\n            elif p == DataHead.EN_INT8:\n                value, = struct.unpack_from(\n                    '!b', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 1\n                return value\n            elif p == DataHead.EN_INT16:\n                value, = struct.unpack_from(\n                    '!h', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 2\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'Short' type mismatch, tag: %d , get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readInt32(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_ZERO:\n                return 0\n            elif p == DataHead.EN_INT8:\n                value, = struct.unpack_from(\n                    '!b', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 1\n                return value\n            elif p == DataHead.EN_INT16:\n                value, = struct.unpack_from(\n                    '!h', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 2\n                return value\n            elif p == DataHead.EN_INT32:\n                value, = struct.unpack_from(\n                    '!i', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 4\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'Int32' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readInt64(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_ZERO:\n                return 0\n            elif p == DataHead.EN_INT8:\n                value, = struct.unpack_from(\n                    '!b', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 1\n                return value\n            elif p == DataHead.EN_INT16:\n                value, = struct.unpack_from(\n                    '!h', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 2\n                return value\n            elif p == DataHead.EN_INT32:\n                value, = struct.unpack_from(\n                    '!i', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 4\n                return value\n            elif p == DataHead.EN_INT64:\n                value, = struct.unpack_from(\n                    '!q', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 8\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'Int64' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readString(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_STRING1:\n                length, = struct.unpack_from(\n                    '!B', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 1\n                value, = struct.unpack_from(\n                    str(length) + \"s\", self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += length\n                return value\n            elif p == DataHead.EN_STRING4:\n                length, = struct.unpack_from(\n                    '!i', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 4\n                value, = struct.unpack_from(\n                    str(length) + \"s\", self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += length\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'string' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readBytes(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_BYTES:\n                ti, pi, li = self.__readFrom()\n                if pi != DataHead.EN_INT8:\n                    raise TarsTarsDecodeMismatch(\n                        \"type mismatch, tag: %d, type: %d, %d\" % (tag, p, pi))\n                size = self.__readInt32(0, True)\n                value, = struct.unpack_from(\n                    str(size) + 's', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += size\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"type mismatch, tag: %d, type: %d\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readFloat(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_ZERO:\n                return 0\n            elif p == DataHead.EN_FLOAT:\n                value, = struct.unpack_from(\n                    '!f', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 4\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'Float' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readDouble(self, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_ZERO:\n                return 0\n            elif p == DataHead.EN_FLOAT:\n                value, = struct.unpack_from(\n                    '!f', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 4\n                return value\n            elif p == DataHead.EN_DOUBLE:\n                value, = struct.unpack_from(\n                    '!d', self.__buffer.buffer, self.__buffer.position)\n                self.__buffer.position += 8\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'Double' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readStruct(self, coder, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p != DataHead.EN_STRUCTBEGIN:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'struct' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n            value = coder.readFrom(self)\n            self.__skipToStructEnd()\n            return value\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readMap(self, coder, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_MAP:\n                size = self.__readInt32(0, True)\n                omap = coder()\n                for i in range(0, size):\n                    k = self.read(coder.ktype, 0, True)\n                    v = self.read(coder.vtype, 1, True)\n                    omap[k] = v\n                return omap\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'map' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def __readVector(self, coder, tag, require, default=None):\n        if self.__skipToTag(tag):\n            t, p, l = self.__readFrom()\n            if p == DataHead.EN_LIST:\n                size = self.__readInt32(0, True)\n                value = coder()\n                for i in range(0, size):\n                    k = self.read(coder.vtype, 0, True)\n                    value.append(k)\n                return value\n            else:\n                raise TarsTarsDecodeMismatch(\n                    \"read 'vector' type mismatch, tag: %d, get type: %d.\" % (tag, p))\n        elif require:\n            raise TarsTarsDecodeRequireNotExist(\n                \"require field not exist, tag: %d\" % tag)\n        return default\n\n    def read(self, coder, tag, require, default=None):\n        if coder.__tars_index__ == 999:\n            return self.__readBoolean(tag, require, default)\n        elif coder.__tars_index__ == 0:\n            return self.__readInt8(tag, require, default)\n        elif coder.__tars_index__ == 1:\n            return self.__readInt16(tag, require, default)\n        elif coder.__tars_index__ == 2:\n            return self.__readInt32(tag, require, default)\n        elif coder.__tars_index__ == 3:\n            return self.__readInt64(tag, require, default)\n        elif coder.__tars_index__ == 4:\n            return self.__readFloat(tag, require, default)\n        elif coder.__tars_index__ == 5:\n            return self.__readDouble(tag, require, default)\n        elif coder.__tars_index__ == 13:\n            return self.__readBytes(tag, require, default)\n        elif coder.__tars_index__ == 67:\n            return self.__readString(tag, require, default)\n        elif coder.__tars_index__ == 8:\n            return self.__readMap(coder, tag, require, default)\n        elif coder.__tars_index__ == 9:\n            return self.__readVector(coder, tag, require, default)\n        elif coder.__tars_index__ == 1011:\n            return self.__readStruct(coder, tag, require, default)\n        else:\n            raise TarsTarsUnsupportType(\n                \"tars unsupport data type:\" % coder.__tars_index__)\n\n    def printHex(self):\n        util.printHex(self.__buffer.buffer)\n"
  },
  {
    "path": "danmu/danmaku/tars/__trans.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# filename: __trans.py\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n\n'''\n@version: 0.01\n@brief: 网络相关模块\n'''\n\nimport socket\nimport select\nimport errno\nimport threading\n\nfrom .__logger import tarsLogger\nfrom .__TimeoutQueue import ReqMessage\n\n\nclass EndPointInfo:\n    '''\n    @brief: 保存每个连接端口的信息\n    '''\n    SOCK_TCP = 'TCP'\n    SOCK_UDP = 'UDP'\n\n    def __init__(self,\n                 ip='',\n                 port=0,\n                 timeout=-1,\n                 weight=0,\n                 weightType=0,\n                 connType=SOCK_TCP):\n        self.__ip = ip\n        self.__port = port\n        self.__timeout = timeout\n        self.__connType = connType\n        self.__weightType = weightType\n        self.__weight = weight\n\n    def getIp(self):\n        return self.__ip\n\n    def getPort(self):\n        return self.__port\n\n    def getConnType(self):\n        '''\n        @return: 传输层连接类型\n        @rtype: EndPointInfo.SOCK_TCP 或 EndPointInfo.SOCK_UDP\n        '''\n        return self.__connType\n\n    def getWeightType(self):\n        return self.__weightType\n\n    def getWeight(self):\n        return self.__weight\n\n    def __str__(self):\n        return '%s %s:%s %d:%d' % (self.__connType, self.__ip, self.__port, self.__weightType, self.__weight)\n\n\nclass Transceiver:\n    '''\n    @brief: 网络传输基类，提供网络send/recv接口\n    '''\n    CONNECTED = 0\n    CONNECTING = 1\n    UNCONNECTED = 2\n\n    def __init__(self, endPointInfo):\n        tarsLogger.debug('Transceiver:__init__, %s', endPointInfo)\n        self.__epi = endPointInfo\n        self.__sock = None\n        self.__connStatus = Transceiver.UNCONNECTED\n        self.__connFailed = False\n        # 这两个变量要给子类用，不能用name mangling隐藏\n        self._sendBuff = ''\n        self._recvBuf = ''\n\n    def __del__(self):\n        tarsLogger.debug('Transceiver:__del__')\n        self.close()\n\n    def getSock(self):\n        '''\n        @return: socket对象\n        @rtype: socket.socket\n        '''\n        return self.__sock\n\n    def getFd(self):\n        '''\n        @brief: 获取socket的文件描述符\n        @return: 如果self.__sock没有建立返回-1\n        @rtype: int\n        '''\n        if self.__sock:\n            return self.__sock.fileno()\n        else:\n            return -1\n\n    def getEndPointInfo(self):\n        '''\n        @return: 端口信息\n        @rtype: EndPointInfo\n        '''\n        return self.__epi\n\n    def isValid(self):\n        '''\n        @return: 是否创建了socket\n        @rtype: bool\n        '''\n        return self.__sock is not None\n\n    def hasConnected(self):\n        '''\n        @return: 是否连接上了\n        @rtype: bool\n        '''\n        return self.isValid() and self.__connStatus == Transceiver.CONNECTED\n\n    def isConnFailed(self):\n        '''\n        @return: 是否连接失败\n        @rtype: bool\n        '''\n        return self.__connFailed\n\n    def isConnecting(self):\n        '''\n        @return: 是否正在连接\n        @rtype: bool\n        '''\n        return self.isValid() and self.__connStatus == Transceiver.CONNECTING\n\n    def setConnFailed(self):\n        '''\n        @brief: 设置为连接失败\n        @return: None\n        @rtype: None\n        '''\n        self.__connFailed = True\n        self.__connStatus = Transceiver.UNCONNECTED\n\n    def setConnected(self):\n        '''\n        @brief: 设置为连接完\n        @return: None\n        @rtype: None\n        '''\n        self.__connFailed = False\n        self.__connStatus = Transceiver.CONNECTED\n\n    def close(self):\n        '''\n        @brief: 关闭连接\n        @return: None\n        @rtype: None\n        @note: 多次调用不会有问题\n        '''\n        tarsLogger.debug('Transceiver:close')\n        if not self.isValid():\n            return\n        self.__sock.close()\n        self.__sock = None\n        self.__connStatus = Transceiver.UNCONNECTED\n        self.__connFailed = False\n        self._sendBuff = ''\n        self._recvBuf = ''\n        tarsLogger.info('trans close : %s' % self.__epi)\n\n    def writeToSendBuf(self, msg):\n        '''\n        @brief: 把数据添加到send buffer里\n        @param msg: 发送的数据\n        @type msg: str\n        @return: None\n        @rtype: None\n        @note: 没有加锁，多线程调用会有race conditions\n        '''\n        self._sendBuff += msg\n\n    def recv(self, bufsize, flag=0):\n        raise NotImplementedError()\n\n    def send(self, buf, flag=0):\n        raise NotImplementedError()\n\n    def doResponse(self):\n        raise NotImplementedError()\n\n    def doRequest(self):\n        '''\n        @brief: 将请求数据发送出去\n        @return: 发送的字节数\n        @rtype: int\n        '''\n        tarsLogger.debug('Transceiver:doRequest')\n        if not self.isValid():\n            return -1\n\n        nbytes = 0\n        buf = buffer(self._sendBuff)\n        while True:\n            if not buf:\n                break\n            ret = self.send(buf[nbytes:])\n            if ret > 0:\n                nbytes += ret\n            else:\n                break\n\n        # 发送前面的字节后将后面的字节拷贝上来\n        self._sendBuff = buf[nbytes:]\n        return nbytes\n\n    def reInit(self):\n        '''\n        @brief: 初始化socket，并连接服务器\n        @return: 成功返回0，失败返回-1\n        @rtype: int\n        '''\n        tarsLogger.debug('Transceiver:reInit')\n        assert(self.isValid() is False)\n        if self.__epi.getConnType() != EndPointInfo.SOCK_TCP:\n            return -1\n        try:\n            self.__sock = socket.socket()\n            self.__sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n            self.__sock.setblocking(0)\n            self.__sock.connect((self.__epi.getIp(), self.__epi.getPort()))\n            self.__connStatus = Transceiver.CONNECTED\n        except socket.error as msg:\n            if msg.errno == errno.EINPROGRESS:\n                self.__connStatus = Transceiver.CONNECTING\n            else:\n                tarsLogger.info('reInit, %s, faild!, %s',\n                                self.__epi, msg)\n                self.__sock = None\n                return -1\n        tarsLogger.info('reInit, connect: %s, fd: %d',\n                        self.__epi, self.getFd())\n        return 0\n\n\nclass TcpTransceiver(Transceiver):\n    '''\n    @brief: TCP传输实现\n    '''\n\n    def send(self, buf, flag=0):\n        '''\n        @brief: 实现tcp的发送\n        @param buf: 发送的数据\n        @type buf: str\n        @param flag: 发送标志\n        @param flag: int\n        @return: 发送字节数\n        @rtype: int\n        '''\n        tarsLogger.debug('TcpTransceiver:send')\n        if not self.isValid():\n            return -1\n\n        nbytes = 0\n        try:\n            nbytes = self.getSock().send(buf, flag)\n            tarsLogger.info('tcp send, fd: %d, %s, len: %d',\n                            self.getFd(), self.getEndPointInfo(), nbytes)\n        except socket.error as msg:\n            if msg.errno != errno.EAGAIN:\n                tarsLogger.error('tcp send, fd: %d, %s, fail!, %s, close',\n                                 self.getFd(), self.getEndPointInfo(), msg)\n                self.close()\n                return 0\n        return nbytes\n\n    def recv(self, bufsize, flag=0):\n        '''\n        @brief: 实现tcp的recv\n        @param bufsize: 接收大小\n        @type bufsize: int\n        @param flag: 接收标志\n        @param flag: int\n        @return: 接收的内容，接收出错返回None\n        @rtype: str\n        '''\n        tarsLogger.debug('TcpTransceiver:recv')\n        assert(self.isValid())\n\n        buf = ''\n        try:\n            buf = self.getSock().recv(bufsize, flag)\n            if len(buf) == 0:\n                tarsLogger.info('tcp recv, fd: %d, %s, recv 0 bytes, close',\n                                self.getFd(), self.getEndPointInfo())\n                self.close()\n                return None\n        except socket.error as msg:\n            if msg.errno != errno.EAGAIN:\n                tarsLogger.info('tcp recv, fd: %d, %s, faild!, %s, close',\n                                self.getFd(), self.getEndPointInfo(), msg)\n                self.close()\n                return None\n\n        tarsLogger.info('tcp recv, fd: %d, %s, nbytes: %d',\n                        self.getFd(), self.getEndPointInfo(), len(buf))\n        return buf\n\n    def doResponse(self):\n        '''\n        @brief: 处理接收的数据\n        @return: 返回响应报文的列表，如果出错返回None\n        @rtype: list: ResponsePacket\n        '''\n        tarsLogger.debug('TcpTransceiver:doResponse')\n        if not self.isValid():\n            return None\n\n        bufs = [self._recvBuf]\n        while True:\n            buf = self.recv(8292)\n            if not buf:\n                break\n            bufs.append(buf)\n        self._recvBuf = ''.join(bufs)\n        tarsLogger.info('tcp doResponse, fd: %d, recvbuf: %d',\n                        self.getFd(), len(self._recvBuf))\n\n        if not self._recvBuf:\n            return None\n\n        rsplist = None\n        try:\n            rsplist, bufsize = ReqMessage.unpackRspList(self._recvBuf)\n            self._recvBuf = self._recvBuf[bufsize:]\n        except Exception as msg:\n            tarsLogger.error(\n                'tcp doResponse, fd: %d, %s, tcp recv unpack error: %s',\n                self.getFd(), self.getEndPointInfo(), msg)\n            self.close()\n\n        return rsplist\n\n\nclass FDReactor(threading.Thread):\n    '''\n    @brief: 监听FD事件并解发注册的handle\n    '''\n\n    def __init__(self):\n        tarsLogger.debug('FDReactor:__init__')\n        # threading.Thread.__init__(self)\n        super(FDReactor, self).__init__()\n        self.__terminate = False\n        self.__ep = None\n        self.__shutdown = None\n        # {fd : adapterproxy}\n        self.__adapterTab = {}\n\n    def __del__(self):\n        tarsLogger.debug('FDReactor:__del__')\n        self.__ep.close()\n        self.__shutdown.close()\n        self.__ep = None\n        self.__shutdown = None\n\n    def initialize(self):\n        '''\n        @brief: 初始化，使用FDReactor前必须调用\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('FDReactor:initialize')\n        self.__ep = select.epoll()\n        self.__shutdown = socket.socket()\n        self.__ep.register(self.__shutdown.fileno(),\n                           select.EPOLLET | select.EPOLLIN)\n        tarsLogger.debug('FDReactor init, shutdown fd : %d',\n                         self.__shutdown.fileno())\n\n    def terminate(self):\n        '''\n        @brief: 结束FDReactor的线程\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('FDReactor:terminate')\n        self.__terminate = True\n        self.__ep.modify(self.__shutdown.fileno(), select.EPOLLOUT)\n        self.__adapterTab = {}\n\n    def handle(self, adapter, events):\n        '''\n        @brief: 处理epoll事件\n        @param adapter: 事件对应的adapter\n        @type adapter: AdapterProxy\n        @param events: epoll事件\n        @param events: int\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('FDReactor:handle events : %d', events)\n        assert(adapter)\n\n        try:\n            if events == 0:\n                return\n\n            if events & (select.EPOLLERR | select.EPOLLHUP):\n                tarsLogger.debug('FDReactor::handle EPOLLERR or EPOLLHUP: %s',\n                                 adapter.trans().getEndPointInfo())\n                adapter.trans().close()\n                return\n\n            if adapter.shouldCloseTrans():\n                tarsLogger.debug('FDReactor::handle should close trans: %s',\n                                 adapter.trans().getEndPointInfo())\n                adapter.setCloseTrans(False)\n                adapter.trans().close()\n                return\n\n            if adapter.trans().isConnecting():\n                if not adapter.finishConnect():\n                    return\n\n            if events & select.EPOLLIN:\n                self.handleInput(adapter)\n\n            if events & select.EPOLLOUT:\n                self.handleOutput(adapter)\n\n        except Exception as msg:\n            tarsLogger.error('FDReactor handle exception: %s', msg)\n\n    def handleExcept(self):\n        pass\n\n    def handleInput(self, adapter):\n        '''\n        @brief: 处理接收事件\n        @param adapter: 事件对应的adapter\n        @type adapter: AdapterProxy\n        @return: None\n        @rtype: None\n        '''\n\n        tarsLogger.debug('FDReactor:handleInput')\n        if not adapter.trans().isValid():\n            return\n\n        rsplist = adapter.trans().doResponse()\n        if not rsplist:\n            return\n        for rsp in rsplist:\n            adapter.finished(rsp)\n\n    def handleOutput(self, adapter):\n        '''\n        @brief: 处理发送事件\n        @param adapter: 事件对应的adapter\n        @type adapter: AdapterProxy\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('FDReactor:handleOutput')\n        if not adapter.trans().isValid():\n            return\n        while adapter.trans().doRequest() >= 0 and adapter.sendRequest():\n            pass\n\n    def notify(self, adapter):\n        '''\n        @brief: 更新adapter对应的fd的epoll状态\n        @return: None\n        @rtype: None\n        @note: FDReactor使用的epoll是EPOLLET模式，同一事件只通知一次\n               希望某一事件再次通知需调用此函数\n        '''\n        tarsLogger.debug('FDReactor:notify')\n        fd = adapter.trans().getFd()\n        if fd != -1:\n            self.__ep.modify(fd,\n                             select.EPOLLET | select.EPOLLOUT | select.EPOLLIN)\n\n    def registerAdapter(self, adapter, events):\n        '''\n        @brief: 注册adapter\n        @param adapter: 收发事件处理类\n        @type adapter: AdapterProxy\n        @param events: 注册事件\n        @type events: int\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('FDReactor:registerAdapter events : %d', events)\n        events |= select.EPOLLET\n        try:\n            self.__ep.unregister(adapter.trans().getFd())\n        except:\n            pass\n        self.__ep.register(adapter.trans().getFd(), events)\n        self.__adapterTab[adapter.trans().getFd()] = adapter\n\n    def unregisterAdapter(self, adapter):\n        '''\n        @brief: 注销adapter\n        @param adapter: 收发事件处理类\n        @type adapter: AdapterProxy\n        @return: None\n        @rtype: None\n        '''\n        tarsLogger.debug('FDReactor:registerAdapter')\n        self.__ep.unregister(adapter.trans().getFd())\n        self.__adapterTab.pop(adapter.trans().getFd(), None)\n\n    def run(self):\n        '''\n        @brief: 线程启动函数，循环监听网络事件\n        '''\n        tarsLogger.debug('FDReactor:run')\n\n        while not self.__terminate:\n            try:\n                eplist = self.__ep.poll(1)\n                if eplist:\n                    tarsLogger.debug('FDReactor run get eplist : %s, terminate : %s', str(\n                        eplist), self.__terminate)\n                if self.__terminate:\n                    tarsLogger.debug('FDReactor terminate')\n                    break\n                for fd, events in eplist:\n                    adapter = self.__adapterTab.get(fd, None)\n                    if not adapter:\n                        continue\n                    self.handle(adapter, events)\n            except Exception as msg:\n                tarsLogger.error('FDReactor run exception: %s', msg)\n\n        tarsLogger.debug('FDReactor:run finished')\n\n\nif __name__ == '__main__':\n    print('hello world')\n    epi = EndPointInfo('127.0.0.1', 1313)\n    print(epi)\n    trans = TcpTransceiver(epi)\n    print(trans.getSock())\n    print(trans.getFd())\n    print(trans.reInit())\n    print(trans.isConnecting())\n    print(trans.hasConnected())\n    buf = 'hello world'\n    print(trans.send(buf))\n    buf = trans.recv(1024)\n    print(buf)\n    trans.close()\n"
  },
  {
    "path": "danmu/danmaku/tars/__tup.py",
    "content": "# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\nimport struct\nimport string\nfrom .__util import util\nfrom .__tars import TarsOutputStream\nfrom .__tars import TarsInputStream\nfrom .__packet import RequestPacket\n\n\nclass TarsUniPacket(object):\n    def __init__(self):\n        self.__mapa = util.mapclass(util.string, util.bytes)\n        self.__mapv = util.mapclass(util.string, self.__mapa)\n        self.__buffer = self.__mapv()\n        self.__code = RequestPacket()\n\n    # @property\n    # def version(self):\n    #     return self.__code.iVersion\n\n    # @version.setter\n    # def version(self, value):\n    #     self.__code.iVersion = value\n\n    @property\n    def servant(self):\n        return self.__code.sServantName\n\n    @servant.setter\n    def servant(self, value):\n        self.__code.sServantName = value\n\n    @property\n    def func(self):\n        return self.__code.sFuncName\n\n    @func.setter\n    def func(self, value):\n        self.__code.sFuncName = value\n\n    @property\n    def requestid(self):\n        return self.__code.iRequestId\n\n    @requestid.setter\n    def requestid(self, value):\n        self.__code.iRequestId = value\n\n    @property\n    def result_code(self):\n        if (\"STATUS_RESULT_CODE\" in self.__code.status) == False:\n            return 0\n\n        return string.atoi(self.__code.status[\"STATUS_RESULT_CODE\"])\n\n    @property\n    def result_desc(self):\n        if (\"STATUS_RESULT_DESC\" in self.__code.status) == False:\n            return ''\n\n        return self.__code.status[\"STATUS_RESULT_DESC\"]\n\n    def put(self, vtype, name, value):\n        oos = TarsOutputStream()\n        oos.write(vtype, 0, value)\n        self.__buffer[name] = {vtype.__tars_class__: oos.getBuffer()}\n\n    def get(self, vtype, name):\n        if (name in self.__buffer) == False:\n            raise Exception(\"UniAttribute not found key:%s,type:%s\" %\n                            (name, vtype.__tars_class__))\n\n        t = self.__buffer[name]\n        if (vtype.__tars_class__ in t) == False:\n            raise Exception(\"UniAttribute not found type:\" +\n                            vtype.__tars_class__)\n\n        o = TarsInputStream(t[vtype.__tars_class__])\n        return o.read(vtype, 0, True)\n\n    def encode(self):\n        oos = TarsOutputStream()\n        oos.write(self.__mapv, 0, self.__buffer)\n\n        self.__code.iVersion = 2\n        self.__code.sBuffer = oos.getBuffer()\n\n        sos = TarsOutputStream()\n        RequestPacket.writeTo(sos, self.__code)\n\n        return struct.pack('!i', 4 + len(sos.getBuffer())) + sos.getBuffer()\n\n    def decode(self, buf):\n        ois = TarsInputStream(buf[4:])\n        self.__code = RequestPacket.readFrom(ois)\n\n        sis = TarsInputStream(self.__code.sBuffer)\n        self.__buffer = sis.read(self.__mapv, 0, True)\n\n    def clear(self):\n        self.__code.__init__()\n\n    def haskey(self, name):\n        return name in self.__buffer\n"
  },
  {
    "path": "danmu/danmaku/tars/__util.py",
    "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n\nimport sys\nfrom threading import Lock\nimport hashlib\nfrom xml.etree import cElementTree as ET\nfrom .exception import TarsException\n\n\nclass util:\n    @staticmethod\n    def printHex(buff):\n        count = 0\n        for c in buff:\n            sys.stdout.write(\"0X%02X \" % ord(c))\n            count += 1\n            if count % 16 == 0:\n                sys.stdout.write(\"\\n\")\n        sys.stdout.write(\"\\n\")\n        sys.stdout.flush()\n\n    @staticmethod\n    def mapclass(ktype, vtype):\n        class mapklass(dict):\n            def size(self): return len(self)\n        setattr(mapklass, '__tars_index__', 8)\n        setattr(mapklass, '__tars_class__', \"map<\" +\n                ktype.__tars_class__ + \",\" + vtype.__tars_class__ + \">\")\n        setattr(mapklass, 'ktype', ktype)\n        setattr(mapklass, 'vtype', vtype)\n        return mapklass\n\n    @staticmethod\n    def vectorclass(vtype):\n        class klass(list):\n            def size(self): return len(self)\n        setattr(klass, '__tars_index__', 9)\n        setattr(klass, '__tars_class__', \"list<\" + vtype.__tars_class__ + \">\")\n        setattr(klass, 'vtype', vtype)\n        return klass\n\n    class boolean:\n        __tars_index__ = 999\n        __tars_class__ = \"bool\"\n\n    class int8:\n        __tars_index__ = 0\n        __tars_class__ = \"char\"\n\n    class uint8:\n        __tars_index__ = 1\n        __tars_class__ = \"short\"\n\n    class int16:\n        __tars_index__ = 1\n        __tars_class__ = \"short\"\n\n    class uint16:\n        __tars_index__ = 2\n        __tars_class__ = \"int32\"\n\n    class int32:\n        __tars_index__ = 2\n        __tars_class__ = \"int32\"\n\n    class uint32:\n        __tars_index__ = 3\n        __tars_class__ = \"int64\"\n\n    class int64:\n        __tars_index__ = 3\n        __tars_class__ = \"int64\"\n\n    class float:\n        __tars_index__ = 4\n        __tars_class__ = \"float\"\n\n    class double:\n        __tars_index__ = 5\n        __tars_class__ = \"double\"\n\n    class bytes:\n        __tars_index__ = 13\n        __tars_class__ = \"list<char>\"\n\n    class string:\n        __tars_index__ = 67\n        __tars_class__ = \"string\"\n\n    class struct:\n        __tars_index__ = 1011\n\n\ndef xml2dict(node, dic={}):\n    '''\n    @brief: 将xml解析树转成字典\n    @param node: 树的根节点\n    @type node: cElementTree.Element\n    @param dic: 存储信息的字典\n    @type dic: dict\n    @return: 转换好的字典\n    @rtype: dict\n    '''\n    dic[node.tag] = ndic = {}\n    [xml2dict(child, ndic) for child in node.getchildren() if child != node]\n    ndic.update([list(map(str.strip, exp.split('=')[:2]))\n                 for exp in node.text.splitlines() if '=' in exp])\n    return dic\n\n\ndef configParse(filename):\n    '''\n    @brief: 解析tars配置文件\n    @param filename: 文件名\n    @type filename: str\n    @return: 解析出来的配置信息\n    @rtype: dict\n    '''\n    tree = ET.parse(filename)\n    return xml2dict(tree.getroot())\n\n\nclass NewLock(object):\n    def __init__(self):\n        self.__count = 0\n        self.__lock = Lock()\n        self.__lockForCount = Lock()\n        pass\n\n    def newAcquire(self):\n        self.__lockForCount.acquire()\n        self.__count += 1\n        if self.__count == 1:\n            self.__lock.acquire()\n        self.__lockForCount.release()\n        pass\n\n    def newRelease(self):\n        self.__lockForCount.acquire()\n        self.__count -= 1\n        if self.__count == 0:\n            self.__lock.release()\n        self.__lockForCount.release()\n\n\nclass LockGuard(object):\n    def __init__(self, newLock):\n        self.__newLock = newLock\n        self.__newLock.newAcquire()\n\n    def __del__(self):\n        self.__newLock.newRelease()\n\n\nclass ConsistentHashNew(object):\n    def __init__(self, nodes=None, nodeNumber=3):\n        \"\"\"\n        :param nodes:           服务器的节点的epstr列表\n        :param n_number:        一个节点对应的虚拟节点数量\n        :return:\n        \"\"\"\n        self.__nodes = nodes\n        self.__nodeNumber = nodeNumber  # 每一个节点对应多少个虚拟节点，这里默认是3个\n        self.__nodeDict = dict()  # 用于记录虚拟节点的hash值与服务器epstr的对应关系\n        self.__sortListForKey = []  # 用于存放所有的虚拟节点的hash值，这里需要保持排序，以找出对应的服务器\n        if nodes:\n            for node in nodes:\n                self.addNode(node)\n\n    @property\n    def nodes(self):\n        return self.__nodes\n\n    @nodes.setter\n    def nodes(self, value):\n        self.__nodes = value\n\n    def addNode(self, node):\n        \"\"\"\n        添加node，首先要根据虚拟节点的数目，创建所有的虚拟节点，并将其与对应的node对应起来\n        当然还需要将虚拟节点的hash值放到排序的里面\n        这里在添加了节点之后，需要保持虚拟节点hash值的顺序\n        :param node:\n        :return:\n        \"\"\"\n        for i in range(self.__nodeNumber):\n            nodeStr = \"%s%s\" % (node, i)\n            key = self.__genKey(nodeStr)\n            self.__nodeDict[key] = node\n            self.__sortListForKey.append(key)\n        self.__sortListForKey.sort()\n\n    def removeNode(self, node):\n        \"\"\"\n        这里一个节点的退出，需要将这个节点的所有的虚拟节点都删除\n        :param node:\n        :return:\n        \"\"\"\n        for i in range(self.__nodeNumber):\n            nodeStr = \"%s%s\" % (node, i)\n            key = self.__genKey(nodeStr)\n            del self.__nodeDict[key]\n            self.__sortListForKey.remove(key)\n\n    def getNode(self, key):\n        \"\"\"\n        返回这个字符串应该对应的node，这里先求出字符串的hash值，然后找到第一个小于等于的虚拟节点，然后返回node\n        如果hash值大于所有的节点，那么用第一个虚拟节点\n        :param : hashNum or keyStr\n        :return:\n        \"\"\"\n        keyStr = ''\n        if isinstance(key, int):\n            keyStr = \"the keyStr is %d\" % key\n        elif isinstance(key, type('a')):\n            keyStr = key\n        else:\n            raise TarsException(\"the hash code has wrong type\")\n        if self.__sortListForKey:\n            key = self.__genKey(keyStr)\n            for keyItem in self.__sortListForKey:\n                if key <= keyItem:\n                    return self.__nodeDict[keyItem]\n            return self.__nodeDict[self.__sortListForKey[0]]\n        else:\n            return None\n\n    def __genKey(self, keyStr):\n        \"\"\"\n        通过key，返回当前key的hash值，这里采用md5\n        :param key:\n        :return:\n        \"\"\"\n        md5Str = hashlib.md5(keyStr).hexdigest()\n        return int(md5Str, 16)\n"
  },
  {
    "path": "danmu/danmaku/tars/core.py",
    "content": "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\n# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed\n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n# CONDITIONS OF ANY KIND, either express or implied. See the License for the\n# specific language governing permissions and limitations under the License.\n#\n\n__version__ = \"0.0.1\"\n\nfrom __util import util\nfrom __tars import TarsInputStream\nfrom __tars import TarsOutputStream\nfrom __tup import TarsUniPacket\n\n\nclass tarscore:\n    class TarsInputStream(TarsInputStream):\n        pass\n\n    class TarsOutputStream(TarsOutputStream):\n        pass\n\n    class TarsUniPacket(TarsUniPacket):\n        pass\n\n    class boolean(util.boolean):\n        pass\n\n    class int8(util.int8):\n        pass\n\n    class uint8(util.uint8):\n        pass\n\n    class int16(util.int16):\n        pass\n\n    class uint16(util.uint16):\n        pass\n\n    class int32(util.int32):\n        pass\n\n    class uint32(util.uint32):\n        pass\n\n    class int64(util.int64):\n        pass\n\n    class float(util.float):\n        pass\n\n    class double(util.double):\n        pass\n\n    class bytes(util.bytes):\n        pass\n\n    class string(util.string):\n        pass\n\n    class struct(util.struct):\n        pass\n\n    @staticmethod\n    def mapclass(ktype, vtype): return util.mapclass(ktype, vtype)\n\n    @staticmethod\n    def vctclass(vtype): return util.vectorclass(vtype)\n\n    @staticmethod\n    def printHex(buff): util.printHex(buff)\n\n\n# 被用户引用\nfrom __util import configParse\nfrom __rpc import Communicator\nfrom exception import *\nfrom __logger import tarsLogger\n"
  },
  {
    "path": "danmu/danmaku/tars/exception.py",
    "content": "# Tencent is pleased to support the open source community by making Tars available.\n#\n# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except \n# in compliance with the License. You may obtain a copy of the License at\n#\n# https://opensource.org/licenses/BSD-3-Clause\n#\n# Unless required by applicable law or agreed to in writing, software distributed \n# under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR \n# CONDITIONS OF ANY KIND, either express or implied. See the License for the \n# specific language governing permissions and limitations under the License.\n#\n\nclass TarsException(Exception): pass\n\nclass TarsTarsDecodeRequireNotExist(TarsException):    pass\nclass TarsTarsDecodeMismatch(TarsException):           pass\nclass TarsTarsDecodeInvalidValue(TarsException):       pass\nclass TarsTarsUnsupportType(TarsException):            pass\n\nclass TarsNetConnectException(TarsException):         pass\nclass TarsNetConnectLostException(TarsException):     pass\nclass TarsNetSocketException(TarsException):          pass\nclass TarsProxyDecodeException(TarsException):        pass\nclass TarsProxyEncodeException(TarsException):        pass\nclass TarsServerEncodeException(TarsException):       pass\nclass TarsServerDecodeException(TarsException):       pass\nclass TarsServerNoFuncException(TarsException):       pass\nclass TarsServerNoServantException(TarsException):    pass\nclass TarsServerQueueTimeoutException(TarsException): pass\nclass TarsServerUnknownException(TarsException):      pass\nclass TarsSyncCallTimeoutException(TarsException):    pass\nclass TarsRegistryException(TarsException):           pass\nclass TarsServerResetGridException(TarsException):    pass\n"
  },
  {
    "path": "danmu/danmaku/tars/tars/EndpointF.tars",
    "content": "\nmodule register\n{\n    /**\n     * ˿Ϣ\n     */\n    struct EndpointF\n    {\n        0 require string host;\n        1 require int port;\n        2 require int timeout;\n        3 require int istcp;\n        4 require int grid;\n        5 optional int groupworkid;\n        6 optional int grouprealid;\n        7 optional string setId;\n        8 optional int qos;\n        9 optional int bakFlag;\n        11 optional int weight;\n        12 optional int weightType;\n    };\n    key[EndpointF, host, port, timeout, istcp, grid, qos, weight, weightType];\n};\n\n\n"
  },
  {
    "path": "danmu/danmaku/tars/tars/QueryF.tars",
    "content": "#include \"EndpointF.tars\"\n\nmodule register\n{\n    /** \n     * ȡendpointqueryӿ\n     */\n\n    interface QueryF\n    {\n        /** idȡ\n         *\n         * @param id \n         *\n         * @return  иöĻendpointб\n         */\n        vector<EndpointF> findObjectById(string id);\n\n        /**idȡж,ͷǻ\n         *\n         * @param id         \n         * @param activeEp   endpointб\n         * @param inactiveEp Ǵendpointб\n         * @return:  0-ɹ  others-ʧ\n         */\n        int findObjectById4Any(string id, out vector<EndpointF> activeEp, out vector<EndpointF> inactiveEp);\n\n        /** idȡendpointб,ͬfindObjectByIdInSameGroup\n         *\n         * @param id         \n         * @param activeEp   endpointб\n         * @param inactiveEp Ǵendpointб\n         * @return:  0-ɹ  others-ʧ\n         */\n        int findObjectById4All(string id, out vector<EndpointF> activeEp, out vector<EndpointF> inactiveEp);\n\n        /** idȡͬendpointб\n         *\n         * @param id         \n         * @param activeEp   endpointб\n         * @param inactiveEp Ǵendpointб\n         * @return:  0-ɹ  others-ʧ\n         */\n        int findObjectByIdInSameGroup(string id, out vector<EndpointF> activeEp, out vector<EndpointF> inactiveEp);\n\n\n        /** idȡָصendpointб\n         *\n         * @param id         \n         * @param activeEp   endpointб\n         * @param inactiveEp Ǵendpointб\n         * @return:  0-ɹ  others-ʧ\n         */\n        int findObjectByIdInSameStation(string id, string sStation, out vector<EndpointF> activeEp, out vector<EndpointF> inactiveEp);\n\n        /** idȡͬendpointб\n         *\n         * @param id         \n         * @param setId      setȫ,ʽΪsetname.setarea.setgroup\n         * @param activeEp   endpointб\n         * @param inactiveEp Ǵendpointб\n         * @return:  0-ɹ  others-ʧ\n         */\n        int findObjectByIdInSameSet(string id, string setId, out vector<EndpointF> activeEp, out vector<EndpointF> inactiveEp);\n\n    };\n\n};\n\n\n"
  },
  {
    "path": "danmu/danmaku/tars/tars/__init__.py",
    "content": ""
  },
  {
    "path": "danmu/danmaku/yqs.proto",
    "content": "syntax = \"proto2\";\npackage YiQishanPack;\n\nmessage CSHead {\n    optional uint32 command = 1;\n    optional uint32 subcmd = 2;\n    optional uint32 seq = 3;\n    optional bytes uuid = 4;\n    optional uint32 clientType = 5;\n    optional uint32 headFlag = 6;\n    optional uint32 clientVer = 7;\n    optional bytes signature = 8;\n    optional uint32 routeKey = 9;\n}\n\nmessage TCPAccessReq {\n    optional bytes AccessToken = 1;\n    optional bytes MachineCode = 2;\n}\n\nmessage TcpHelloReq {\n    optional string uuid = 1;\n}\n\nmessage EnterRoomReq {\n    optional bytes uuid = 1;\n    optional bytes roomid = 2;\n    optional uint32 neednum = 3;\n    optional bool isfake = 4;\n    optional bool needbroadcast = 5;\n    optional bytes nick = 6;\n    optional bytes clientip = 7;\n    optional bytes subroomid = 8;\n    optional uint32 gameid = 10;\n}\n\nmessage RoomHelloReq {\n    optional bytes uuid = 1;\n    optional bytes roomid = 2;\n    optional bytes roomsig = 3;\n    optional uint32 connsvrip = 4;\n    optional bool isinternal = 5;\n    optional bytes subroomid = 6;\n}\n\nmessage Token {\n    optional string uuid = 1;\n    optional bytes gtkey = 2;\n    optional uint32 ip = 3;\n    optional uint32 expiresstime = 4;\n    optional uint32 gentime = 5;\n}\n\nmessage PublicChatNotify {\n    optional bytes roomid = 1;\n    optional bytes uuid = 2;\n    optional bytes nick = 3;\n    optional ChatInfo info = 4;\n    optional bytes touuid = 5;\n    optional bytes tonick = 6;\n    optional uint32 privilege = 7;\n    optional uint32 rank = 8;\n    optional uint32 fromgame = 9;\n    optional bytes gameid = 10;\n    repeated BadgeType badges = 11;\n    optional RoomUserInfo userinfo = 12;\n    optional bool isnoble = 13;\n    optional uint32 noblelevelid = 14;\n    optional string noblelevelname = 15;\n    optional bool isnoblemessage = 16;\n}\n\nenum BadgeType {\n    NOBARRAGE = 0;\n    FIRST_CHARGE_BADGE = 1;\n    FIRST_CHARGE_COPPER = 2;\n    FIRST_CHARGE_SLIVER = 3;\n    FIRST_CHARGE_GOLD = 4;\n}\n\nmessage ChatInfo {\n    optional uint32 chattype = 1;\n    optional bytes textmsg = 2;\n}\n\nmessage RoomUserInfo {\n    optional bytes uuid = 1;\n    optional bytes nick = 2;\n    optional uint32 weekartistconsume = 3;\n    optional uint32 artisttotalconsume = 4;\n    optional uint32 totalconsume = 5;\n    optional uint32 guardendtime = 6;\n    optional uint32 peerageid = 7;\n}\n\nmessage GiftNotyInfo {\n    optional bytes roomid = 1;\n    optional bytes giftid = 2;\n    optional uint32 giftcnt = 3;\n    optional bytes fromuuid = 4;\n    optional bytes fromnick = 5;\n    optional bytes touuid = 6;\n    optional bytes tonick = 7;\n    optional uint32 consume = 8;\n    optional bytes sessid = 9;\n    optional uint32 hits = 10;\n    optional uint32 hitsall = 11;\n    optional uint32 flag = 12;\n    optional uint32 fromviplevel = 13;\n    optional uint32 fanslevel = 14;\n    optional bool fromisnoble = 15;\n    optional uint32 fromnoblelevelid = 16;\n}\n\nmessage NotifyFreeGift {\n    optional bytes uuid = 1;\n    optional bytes fromnick = 2;\n    optional bytes touuid = 3;\n    optional bytes tonick = 4;\n    optional bytes roomid = 5;\n    optional uint32 giftid = 6;\n    optional uint32 giftcnt = 7;\n    optional uint32 fromviplevel = 8;\n    optional uint32 fanslevel = 9;\n    optional bool fromisnoble = 11;\n    optional uint32 fromnoblelevelid = 12;\n}\n\nmessage SendBroadcastPkg {\n    optional bytes uuid = 1;\n    repeated BroadcastMsg broadcastmsg = 2;\n\n    message BroadcastMsg {\n        optional uint32 businesstype = 1;\n        optional bytes title = 2;\n        optional bytes content = 3;\n        optional uint32 msgseq = 4;\n    }\n}\n"
  },
  {
    "path": "danmu/danmaku/yqs.py",
    "content": "import binascii\nimport struct\n\nimport requests\nfrom Crypto.Cipher import DES\nfrom Crypto.Util.Padding import pad\n\nfrom . import yqs_pb2 as pb\n\n\nclass YiQiShan:\n    ws_url = 'wss://websocket.173.com/'\n\n    def __init__(self, rid):\n        self.rid = str(rid)\n        self.key = b'e#>&*m16'\n        with requests.Session() as se:\n            res = se.get('http://www.173.com/{}'.format(rid))\n            try:\n                self.uuid, _, token, _ = res.cookies.values()\n            except ValueError:\n                raise Exception('房间不存在')\n        self.accesstoken = binascii.a2b_hex(token)\n        s = YiQiShan.des_decode(self.accesstoken, self.key)\n        p = pb.Token()\n        p.ParseFromString(s)\n        self.gtkey = p.gtkey[:8]\n\n    @staticmethod\n    def des_encode(t, key):\n        t = pad(t, DES.block_size)\n        c = DES.new(key, DES.MODE_ECB)\n        res = c.encrypt(t)\n        return res\n\n    @staticmethod\n    def des_decode(t, key):\n        c = DES.new(key, DES.MODE_ECB)\n        res = c.decrypt(t)\n        length = len(res)\n        padding = res[length - 1]\n        res = res[0:length - padding]\n        return res\n\n    def startup(self):\n        p = pb.TCPAccessReq()\n        p.AccessToken = self.accesstoken\n        return p.SerializeToString()\n\n    def tcphelloreq(self):\n        p = pb.TcpHelloReq()\n        p.uuid = self.uuid\n        return p.SerializeToString()\n\n    def enterroomreq(self):\n        p = pb.EnterRoomReq()\n        p.uuid = self.uuid.encode()\n        p.roomid = self.rid.encode()\n        return p.SerializeToString()\n\n    def roomhelloreq(self):\n        p = pb.RoomHelloReq()\n        p.uuid = self.uuid.encode()\n        p.roomid = self.rid.encode()\n        return p.SerializeToString()\n\n    def pack(self, paylod_type):\n        command = {\n            'startup': 123,\n            'tcphelloreq': 122,\n            'enterroomreq': 601,\n            'roomhelloreq': 600\n        }\n        subcmd = {\n            'startup': 0,\n            'tcphelloreq': 0,\n            'enterroomreq': 1,\n            'roomhelloreq': 1\n        }\n        p = pb.CSHead()\n        p.command = command[paylod_type]\n        p.subcmd = subcmd[paylod_type]\n        p.uuid = self.uuid.encode()\n        p.clientType = 4\n        p.routeKey = int(self.rid)\n        n = p.SerializeToString()\n\n        key = self.key if paylod_type == 'startup' else self.gtkey\n        payload = getattr(self, paylod_type)()\n        s = YiQiShan.des_encode(payload, key)\n\n        buf = struct.pack('!HcH', len(n) + len(s) + 8, b'W', len(n))\n        buf += n\n        buf += struct.pack('!H', len(s))\n        buf += s + b'M'\n        return buf\n\n    def unpack(self, data):\n        msgs = [{'name': '', 'content': '', 'msg_type': 'other'}]\n\n        s, = struct.unpack_from('!h', data, 3)\n        p, = struct.unpack_from('!h', data, 5 + s)\n        u = data[7 + s:7 + s + p]\n\n        a = pb.CSHead()\n        a.ParseFromString(data[5:5 + s])\n        cmd = a.command\n        key = self.key if cmd == 123 else self.gtkey\n        t = u if cmd == 102 else YiQiShan.des_decode(u, key)\n\n        o = cmd\n        # r = a.subcmd\n        if o == 102:\n            p = pb.SendBroadcastPkg()\n            p.ParseFromString(t)\n            for i in p.broadcastmsg:\n                # PublicChatNotify = 1\n                # BUSINESS_TYPE_FREE_GIFT = 2\n                # BUSINESS_TYPE_PAY_GIFT = 3\n                if i.businesstype == 1:  # 发言\n                    q = pb.PublicChatNotify()\n                    q.ParseFromString(i.content)\n                    user = q.nick.decode()\n                    content = q.info.textmsg.decode()\n                # elif i.businesstype == 2: # 免费礼物\n                #     print(i.businesstype)\n                #     q = pb.NotifyFreeGift()\n                #     q.ParseFromString(i.content)\n                # elif i.businesstype == 3: # 收费礼物\n                #     print(i.businesstype)\n                #     q = pb.GiftNotyInfo()\n                #     q.ParseFromString(i.content)\n                # else:\n                #     pass\n                    msg = {'name': user, 'content': content, 'msg_type': 'danmaku'}\n                    msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/danmaku/yqs_pb2.py",
    "content": "# -*- coding: utf-8 -*-\n# Generated by the protocol buffer compiler.  DO NOT EDIT!\n# source: yqs.proto\n\nfrom google.protobuf.internal import enum_type_wrapper\nfrom google.protobuf import descriptor as _descriptor\nfrom google.protobuf import message as _message\nfrom google.protobuf import reflection as _reflection\nfrom google.protobuf import symbol_database as _symbol_database\n# @@protoc_insertion_point(imports)\n\n_sym_db = _symbol_database.Default()\n\n\n\n\nDESCRIPTOR = _descriptor.FileDescriptor(\n  name='yqs.proto',\n  package='YiQishanPack',\n  syntax='proto2',\n  serialized_options=None,\n  create_key=_descriptor._internal_create_key,\n  serialized_pb=b'\\n\\tyqs.proto\\x12\\x0cYiQishanPack\\\"\\xa2\\x01\\n\\x06\\x43SHead\\x12\\x0f\\n\\x07\\x63ommand\\x18\\x01 \\x01(\\r\\x12\\x0e\\n\\x06subcmd\\x18\\x02 \\x01(\\r\\x12\\x0b\\n\\x03seq\\x18\\x03 \\x01(\\r\\x12\\x0c\\n\\x04uuid\\x18\\x04 \\x01(\\x0c\\x12\\x12\\n\\nclientType\\x18\\x05 \\x01(\\r\\x12\\x10\\n\\x08headFlag\\x18\\x06 \\x01(\\r\\x12\\x11\\n\\tclientVer\\x18\\x07 \\x01(\\r\\x12\\x11\\n\\tsignature\\x18\\x08 \\x01(\\x0c\\x12\\x10\\n\\x08routeKey\\x18\\t \\x01(\\r\\\"8\\n\\x0cTCPAccessReq\\x12\\x13\\n\\x0b\\x41\\x63\\x63\\x65ssToken\\x18\\x01 \\x01(\\x0c\\x12\\x13\\n\\x0bMachineCode\\x18\\x02 \\x01(\\x0c\\\"\\x1b\\n\\x0bTcpHelloReq\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\t\\\"\\xa7\\x01\\n\\x0c\\x45nterRoomReq\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\x0c\\x12\\x0e\\n\\x06roomid\\x18\\x02 \\x01(\\x0c\\x12\\x0f\\n\\x07neednum\\x18\\x03 \\x01(\\r\\x12\\x0e\\n\\x06isfake\\x18\\x04 \\x01(\\x08\\x12\\x15\\n\\rneedbroadcast\\x18\\x05 \\x01(\\x08\\x12\\x0c\\n\\x04nick\\x18\\x06 \\x01(\\x0c\\x12\\x10\\n\\x08\\x63lientip\\x18\\x07 \\x01(\\x0c\\x12\\x11\\n\\tsubroomid\\x18\\x08 \\x01(\\x0c\\x12\\x0e\\n\\x06gameid\\x18\\n \\x01(\\r\\\"w\\n\\x0cRoomHelloReq\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\x0c\\x12\\x0e\\n\\x06roomid\\x18\\x02 \\x01(\\x0c\\x12\\x0f\\n\\x07roomsig\\x18\\x03 \\x01(\\x0c\\x12\\x11\\n\\tconnsvrip\\x18\\x04 \\x01(\\r\\x12\\x12\\n\\nisinternal\\x18\\x05 \\x01(\\x08\\x12\\x11\\n\\tsubroomid\\x18\\x06 \\x01(\\x0c\\\"W\\n\\x05Token\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\t\\x12\\r\\n\\x05gtkey\\x18\\x02 \\x01(\\x0c\\x12\\n\\n\\x02ip\\x18\\x03 \\x01(\\r\\x12\\x14\\n\\x0c\\x65xpiresstime\\x18\\x04 \\x01(\\r\\x12\\x0f\\n\\x07gentime\\x18\\x05 \\x01(\\r\\\"\\xf5\\x02\\n\\x10PublicChatNotify\\x12\\x0e\\n\\x06roomid\\x18\\x01 \\x01(\\x0c\\x12\\x0c\\n\\x04uuid\\x18\\x02 \\x01(\\x0c\\x12\\x0c\\n\\x04nick\\x18\\x03 \\x01(\\x0c\\x12$\\n\\x04info\\x18\\x04 \\x01(\\x0b\\x32\\x16.YiQishanPack.ChatInfo\\x12\\x0e\\n\\x06touuid\\x18\\x05 \\x01(\\x0c\\x12\\x0e\\n\\x06tonick\\x18\\x06 \\x01(\\x0c\\x12\\x11\\n\\tprivilege\\x18\\x07 \\x01(\\r\\x12\\x0c\\n\\x04rank\\x18\\x08 \\x01(\\r\\x12\\x10\\n\\x08\\x66romgame\\x18\\t \\x01(\\r\\x12\\x0e\\n\\x06gameid\\x18\\n \\x01(\\x0c\\x12\\'\\n\\x06\\x62\\x61\\x64ges\\x18\\x0b \\x03(\\x0e\\x32\\x17.YiQishanPack.BadgeType\\x12,\\n\\x08userinfo\\x18\\x0c \\x01(\\x0b\\x32\\x1a.YiQishanPack.RoomUserInfo\\x12\\x0f\\n\\x07isnoble\\x18\\r \\x01(\\x08\\x12\\x14\\n\\x0cnoblelevelid\\x18\\x0e \\x01(\\r\\x12\\x16\\n\\x0enoblelevelname\\x18\\x0f \\x01(\\t\\x12\\x16\\n\\x0eisnoblemessage\\x18\\x10 \\x01(\\x08\\\"-\\n\\x08\\x43hatInfo\\x12\\x10\\n\\x08\\x63hattype\\x18\\x01 \\x01(\\r\\x12\\x0f\\n\\x07textmsg\\x18\\x02 \\x01(\\x0c\\\"\\xa0\\x01\\n\\x0cRoomUserInfo\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\x0c\\x12\\x0c\\n\\x04nick\\x18\\x02 \\x01(\\x0c\\x12\\x19\\n\\x11weekartistconsume\\x18\\x03 \\x01(\\r\\x12\\x1a\\n\\x12\\x61rtisttotalconsume\\x18\\x04 \\x01(\\r\\x12\\x14\\n\\x0ctotalconsume\\x18\\x05 \\x01(\\r\\x12\\x14\\n\\x0cguardendtime\\x18\\x06 \\x01(\\r\\x12\\x11\\n\\tpeerageid\\x18\\x07 \\x01(\\r\\\"\\xa9\\x02\\n\\x0cGiftNotyInfo\\x12\\x0e\\n\\x06roomid\\x18\\x01 \\x01(\\x0c\\x12\\x0e\\n\\x06giftid\\x18\\x02 \\x01(\\x0c\\x12\\x0f\\n\\x07giftcnt\\x18\\x03 \\x01(\\r\\x12\\x10\\n\\x08\\x66romuuid\\x18\\x04 \\x01(\\x0c\\x12\\x10\\n\\x08\\x66romnick\\x18\\x05 \\x01(\\x0c\\x12\\x0e\\n\\x06touuid\\x18\\x06 \\x01(\\x0c\\x12\\x0e\\n\\x06tonick\\x18\\x07 \\x01(\\x0c\\x12\\x0f\\n\\x07\\x63onsume\\x18\\x08 \\x01(\\r\\x12\\x0e\\n\\x06sessid\\x18\\t \\x01(\\x0c\\x12\\x0c\\n\\x04hits\\x18\\n \\x01(\\r\\x12\\x0f\\n\\x07hitsall\\x18\\x0b \\x01(\\r\\x12\\x0c\\n\\x04\\x66lag\\x18\\x0c \\x01(\\r\\x12\\x14\\n\\x0c\\x66romviplevel\\x18\\r \\x01(\\r\\x12\\x11\\n\\tfanslevel\\x18\\x0e \\x01(\\r\\x12\\x13\\n\\x0b\\x66romisnoble\\x18\\x0f \\x01(\\x08\\x12\\x18\\n\\x10\\x66romnoblelevelid\\x18\\x10 \\x01(\\r\\\"\\xd9\\x01\\n\\x0eNotifyFreeGift\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\x0c\\x12\\x10\\n\\x08\\x66romnick\\x18\\x02 \\x01(\\x0c\\x12\\x0e\\n\\x06touuid\\x18\\x03 \\x01(\\x0c\\x12\\x0e\\n\\x06tonick\\x18\\x04 \\x01(\\x0c\\x12\\x0e\\n\\x06roomid\\x18\\x05 \\x01(\\x0c\\x12\\x0e\\n\\x06giftid\\x18\\x06 \\x01(\\r\\x12\\x0f\\n\\x07giftcnt\\x18\\x07 \\x01(\\r\\x12\\x14\\n\\x0c\\x66romviplevel\\x18\\x08 \\x01(\\r\\x12\\x11\\n\\tfanslevel\\x18\\t \\x01(\\r\\x12\\x13\\n\\x0b\\x66romisnoble\\x18\\x0b \\x01(\\x08\\x12\\x18\\n\\x10\\x66romnoblelevelid\\x18\\x0c \\x01(\\r\\\"\\xb9\\x01\\n\\x10SendBroadcastPkg\\x12\\x0c\\n\\x04uuid\\x18\\x01 \\x01(\\x0c\\x12\\x41\\n\\x0c\\x62roadcastmsg\\x18\\x02 \\x03(\\x0b\\x32+.YiQishanPack.SendBroadcastPkg.BroadcastMsg\\x1aT\\n\\x0c\\x42roadcastMsg\\x12\\x14\\n\\x0c\\x62usinesstype\\x18\\x01 \\x01(\\r\\x12\\r\\n\\x05title\\x18\\x02 \\x01(\\x0c\\x12\\x0f\\n\\x07\\x63ontent\\x18\\x03 \\x01(\\x0c\\x12\\x0e\\n\\x06msgseq\\x18\\x04 \\x01(\\r*{\\n\\tBadgeType\\x12\\r\\n\\tNOBARRAGE\\x10\\x00\\x12\\x16\\n\\x12\\x46IRST_CHARGE_BADGE\\x10\\x01\\x12\\x17\\n\\x13\\x46IRST_CHARGE_COPPER\\x10\\x02\\x12\\x17\\n\\x13\\x46IRST_CHARGE_SLIVER\\x10\\x03\\x12\\x15\\n\\x11\\x46IRST_CHARGE_GOLD\\x10\\x04'\n)\n\n_BADGETYPE = _descriptor.EnumDescriptor(\n  name='BadgeType',\n  full_name='YiQishanPack.BadgeType',\n  filename=None,\n  file=DESCRIPTOR,\n  create_key=_descriptor._internal_create_key,\n  values=[\n    _descriptor.EnumValueDescriptor(\n      name='NOBARRAGE', index=0, number=0,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='FIRST_CHARGE_BADGE', index=1, number=1,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='FIRST_CHARGE_COPPER', index=2, number=2,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='FIRST_CHARGE_SLIVER', index=3, number=3,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n    _descriptor.EnumValueDescriptor(\n      name='FIRST_CHARGE_GOLD', index=4, number=4,\n      serialized_options=None,\n      type=None,\n      create_key=_descriptor._internal_create_key),\n  ],\n  containing_type=None,\n  serialized_options=None,\n  serialized_start=1953,\n  serialized_end=2076,\n)\n_sym_db.RegisterEnumDescriptor(_BADGETYPE)\n\nBadgeType = enum_type_wrapper.EnumTypeWrapper(_BADGETYPE)\nNOBARRAGE = 0\nFIRST_CHARGE_BADGE = 1\nFIRST_CHARGE_COPPER = 2\nFIRST_CHARGE_SLIVER = 3\nFIRST_CHARGE_GOLD = 4\n\n\n\n_CSHEAD = _descriptor.Descriptor(\n  name='CSHead',\n  full_name='YiQishanPack.CSHead',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='command', full_name='YiQishanPack.CSHead.command', index=0,\n      number=1, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='subcmd', full_name='YiQishanPack.CSHead.subcmd', index=1,\n      number=2, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='seq', full_name='YiQishanPack.CSHead.seq', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.CSHead.uuid', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientType', full_name='YiQishanPack.CSHead.clientType', index=4,\n      number=5, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='headFlag', full_name='YiQishanPack.CSHead.headFlag', index=5,\n      number=6, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientVer', full_name='YiQishanPack.CSHead.clientVer', index=6,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='signature', full_name='YiQishanPack.CSHead.signature', index=7,\n      number=8, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='routeKey', full_name='YiQishanPack.CSHead.routeKey', index=8,\n      number=9, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=28,\n  serialized_end=190,\n)\n\n\n_TCPACCESSREQ = _descriptor.Descriptor(\n  name='TCPAccessReq',\n  full_name='YiQishanPack.TCPAccessReq',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='AccessToken', full_name='YiQishanPack.TCPAccessReq.AccessToken', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='MachineCode', full_name='YiQishanPack.TCPAccessReq.MachineCode', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=192,\n  serialized_end=248,\n)\n\n\n_TCPHELLOREQ = _descriptor.Descriptor(\n  name='TcpHelloReq',\n  full_name='YiQishanPack.TcpHelloReq',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.TcpHelloReq.uuid', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=250,\n  serialized_end=277,\n)\n\n\n_ENTERROOMREQ = _descriptor.Descriptor(\n  name='EnterRoomReq',\n  full_name='YiQishanPack.EnterRoomReq',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.EnterRoomReq.uuid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='YiQishanPack.EnterRoomReq.roomid', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='neednum', full_name='YiQishanPack.EnterRoomReq.neednum', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isfake', full_name='YiQishanPack.EnterRoomReq.isfake', index=3,\n      number=4, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='needbroadcast', full_name='YiQishanPack.EnterRoomReq.needbroadcast', index=4,\n      number=5, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='nick', full_name='YiQishanPack.EnterRoomReq.nick', index=5,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='clientip', full_name='YiQishanPack.EnterRoomReq.clientip', index=6,\n      number=7, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='subroomid', full_name='YiQishanPack.EnterRoomReq.subroomid', index=7,\n      number=8, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gameid', full_name='YiQishanPack.EnterRoomReq.gameid', index=8,\n      number=10, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=280,\n  serialized_end=447,\n)\n\n\n_ROOMHELLOREQ = _descriptor.Descriptor(\n  name='RoomHelloReq',\n  full_name='YiQishanPack.RoomHelloReq',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.RoomHelloReq.uuid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='YiQishanPack.RoomHelloReq.roomid', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='roomsig', full_name='YiQishanPack.RoomHelloReq.roomsig', index=2,\n      number=3, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='connsvrip', full_name='YiQishanPack.RoomHelloReq.connsvrip', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isinternal', full_name='YiQishanPack.RoomHelloReq.isinternal', index=4,\n      number=5, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='subroomid', full_name='YiQishanPack.RoomHelloReq.subroomid', index=5,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=449,\n  serialized_end=568,\n)\n\n\n_TOKEN = _descriptor.Descriptor(\n  name='Token',\n  full_name='YiQishanPack.Token',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.Token.uuid', index=0,\n      number=1, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gtkey', full_name='YiQishanPack.Token.gtkey', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='ip', full_name='YiQishanPack.Token.ip', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='expiresstime', full_name='YiQishanPack.Token.expiresstime', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gentime', full_name='YiQishanPack.Token.gentime', index=4,\n      number=5, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=570,\n  serialized_end=657,\n)\n\n\n_PUBLICCHATNOTIFY = _descriptor.Descriptor(\n  name='PublicChatNotify',\n  full_name='YiQishanPack.PublicChatNotify',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='YiQishanPack.PublicChatNotify.roomid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.PublicChatNotify.uuid', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='nick', full_name='YiQishanPack.PublicChatNotify.nick', index=2,\n      number=3, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='info', full_name='YiQishanPack.PublicChatNotify.info', index=3,\n      number=4, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='touuid', full_name='YiQishanPack.PublicChatNotify.touuid', index=4,\n      number=5, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='tonick', full_name='YiQishanPack.PublicChatNotify.tonick', index=5,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='privilege', full_name='YiQishanPack.PublicChatNotify.privilege', index=6,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='rank', full_name='YiQishanPack.PublicChatNotify.rank', index=7,\n      number=8, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromgame', full_name='YiQishanPack.PublicChatNotify.fromgame', index=8,\n      number=9, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='gameid', full_name='YiQishanPack.PublicChatNotify.gameid', index=9,\n      number=10, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='badges', full_name='YiQishanPack.PublicChatNotify.badges', index=10,\n      number=11, type=14, cpp_type=8, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='userinfo', full_name='YiQishanPack.PublicChatNotify.userinfo', index=11,\n      number=12, type=11, cpp_type=10, label=1,\n      has_default_value=False, default_value=None,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isnoble', full_name='YiQishanPack.PublicChatNotify.isnoble', index=12,\n      number=13, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='noblelevelid', full_name='YiQishanPack.PublicChatNotify.noblelevelid', index=13,\n      number=14, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='noblelevelname', full_name='YiQishanPack.PublicChatNotify.noblelevelname', index=14,\n      number=15, type=9, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\".decode('utf-8'),\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='isnoblemessage', full_name='YiQishanPack.PublicChatNotify.isnoblemessage', index=15,\n      number=16, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=660,\n  serialized_end=1033,\n)\n\n\n_CHATINFO = _descriptor.Descriptor(\n  name='ChatInfo',\n  full_name='YiQishanPack.ChatInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='chattype', full_name='YiQishanPack.ChatInfo.chattype', index=0,\n      number=1, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='textmsg', full_name='YiQishanPack.ChatInfo.textmsg', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1035,\n  serialized_end=1080,\n)\n\n\n_ROOMUSERINFO = _descriptor.Descriptor(\n  name='RoomUserInfo',\n  full_name='YiQishanPack.RoomUserInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.RoomUserInfo.uuid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='nick', full_name='YiQishanPack.RoomUserInfo.nick', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='weekartistconsume', full_name='YiQishanPack.RoomUserInfo.weekartistconsume', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='artisttotalconsume', full_name='YiQishanPack.RoomUserInfo.artisttotalconsume', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='totalconsume', full_name='YiQishanPack.RoomUserInfo.totalconsume', index=4,\n      number=5, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='guardendtime', full_name='YiQishanPack.RoomUserInfo.guardendtime', index=5,\n      number=6, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='peerageid', full_name='YiQishanPack.RoomUserInfo.peerageid', index=6,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1083,\n  serialized_end=1243,\n)\n\n\n_GIFTNOTYINFO = _descriptor.Descriptor(\n  name='GiftNotyInfo',\n  full_name='YiQishanPack.GiftNotyInfo',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='YiQishanPack.GiftNotyInfo.roomid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftid', full_name='YiQishanPack.GiftNotyInfo.giftid', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftcnt', full_name='YiQishanPack.GiftNotyInfo.giftcnt', index=2,\n      number=3, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromuuid', full_name='YiQishanPack.GiftNotyInfo.fromuuid', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromnick', full_name='YiQishanPack.GiftNotyInfo.fromnick', index=4,\n      number=5, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='touuid', full_name='YiQishanPack.GiftNotyInfo.touuid', index=5,\n      number=6, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='tonick', full_name='YiQishanPack.GiftNotyInfo.tonick', index=6,\n      number=7, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='consume', full_name='YiQishanPack.GiftNotyInfo.consume', index=7,\n      number=8, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='sessid', full_name='YiQishanPack.GiftNotyInfo.sessid', index=8,\n      number=9, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='hits', full_name='YiQishanPack.GiftNotyInfo.hits', index=9,\n      number=10, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='hitsall', full_name='YiQishanPack.GiftNotyInfo.hitsall', index=10,\n      number=11, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='flag', full_name='YiQishanPack.GiftNotyInfo.flag', index=11,\n      number=12, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromviplevel', full_name='YiQishanPack.GiftNotyInfo.fromviplevel', index=12,\n      number=13, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fanslevel', full_name='YiQishanPack.GiftNotyInfo.fanslevel', index=13,\n      number=14, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromisnoble', full_name='YiQishanPack.GiftNotyInfo.fromisnoble', index=14,\n      number=15, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromnoblelevelid', full_name='YiQishanPack.GiftNotyInfo.fromnoblelevelid', index=15,\n      number=16, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1246,\n  serialized_end=1543,\n)\n\n\n_NOTIFYFREEGIFT = _descriptor.Descriptor(\n  name='NotifyFreeGift',\n  full_name='YiQishanPack.NotifyFreeGift',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.NotifyFreeGift.uuid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromnick', full_name='YiQishanPack.NotifyFreeGift.fromnick', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='touuid', full_name='YiQishanPack.NotifyFreeGift.touuid', index=2,\n      number=3, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='tonick', full_name='YiQishanPack.NotifyFreeGift.tonick', index=3,\n      number=4, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='roomid', full_name='YiQishanPack.NotifyFreeGift.roomid', index=4,\n      number=5, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftid', full_name='YiQishanPack.NotifyFreeGift.giftid', index=5,\n      number=6, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='giftcnt', full_name='YiQishanPack.NotifyFreeGift.giftcnt', index=6,\n      number=7, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromviplevel', full_name='YiQishanPack.NotifyFreeGift.fromviplevel', index=7,\n      number=8, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fanslevel', full_name='YiQishanPack.NotifyFreeGift.fanslevel', index=8,\n      number=9, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromisnoble', full_name='YiQishanPack.NotifyFreeGift.fromisnoble', index=9,\n      number=11, type=8, cpp_type=7, label=1,\n      has_default_value=False, default_value=False,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='fromnoblelevelid', full_name='YiQishanPack.NotifyFreeGift.fromnoblelevelid', index=10,\n      number=12, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1546,\n  serialized_end=1763,\n)\n\n\n_SENDBROADCASTPKG_BROADCASTMSG = _descriptor.Descriptor(\n  name='BroadcastMsg',\n  full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='businesstype', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.businesstype', index=0,\n      number=1, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='title', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.title', index=1,\n      number=2, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='content', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.content', index=2,\n      number=3, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='msgseq', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.msgseq', index=3,\n      number=4, type=13, cpp_type=3, label=1,\n      has_default_value=False, default_value=0,\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1867,\n  serialized_end=1951,\n)\n\n_SENDBROADCASTPKG = _descriptor.Descriptor(\n  name='SendBroadcastPkg',\n  full_name='YiQishanPack.SendBroadcastPkg',\n  filename=None,\n  file=DESCRIPTOR,\n  containing_type=None,\n  create_key=_descriptor._internal_create_key,\n  fields=[\n    _descriptor.FieldDescriptor(\n      name='uuid', full_name='YiQishanPack.SendBroadcastPkg.uuid', index=0,\n      number=1, type=12, cpp_type=9, label=1,\n      has_default_value=False, default_value=b\"\",\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n    _descriptor.FieldDescriptor(\n      name='broadcastmsg', full_name='YiQishanPack.SendBroadcastPkg.broadcastmsg', index=1,\n      number=2, type=11, cpp_type=10, label=3,\n      has_default_value=False, default_value=[],\n      message_type=None, enum_type=None, containing_type=None,\n      is_extension=False, extension_scope=None,\n      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),\n  ],\n  extensions=[\n  ],\n  nested_types=[_SENDBROADCASTPKG_BROADCASTMSG, ],\n  enum_types=[\n  ],\n  serialized_options=None,\n  is_extendable=False,\n  syntax='proto2',\n  extension_ranges=[],\n  oneofs=[\n  ],\n  serialized_start=1766,\n  serialized_end=1951,\n)\n\n_PUBLICCHATNOTIFY.fields_by_name['info'].message_type = _CHATINFO\n_PUBLICCHATNOTIFY.fields_by_name['badges'].enum_type = _BADGETYPE\n_PUBLICCHATNOTIFY.fields_by_name['userinfo'].message_type = _ROOMUSERINFO\n_SENDBROADCASTPKG_BROADCASTMSG.containing_type = _SENDBROADCASTPKG\n_SENDBROADCASTPKG.fields_by_name['broadcastmsg'].message_type = _SENDBROADCASTPKG_BROADCASTMSG\nDESCRIPTOR.message_types_by_name['CSHead'] = _CSHEAD\nDESCRIPTOR.message_types_by_name['TCPAccessReq'] = _TCPACCESSREQ\nDESCRIPTOR.message_types_by_name['TcpHelloReq'] = _TCPHELLOREQ\nDESCRIPTOR.message_types_by_name['EnterRoomReq'] = _ENTERROOMREQ\nDESCRIPTOR.message_types_by_name['RoomHelloReq'] = _ROOMHELLOREQ\nDESCRIPTOR.message_types_by_name['Token'] = _TOKEN\nDESCRIPTOR.message_types_by_name['PublicChatNotify'] = _PUBLICCHATNOTIFY\nDESCRIPTOR.message_types_by_name['ChatInfo'] = _CHATINFO\nDESCRIPTOR.message_types_by_name['RoomUserInfo'] = _ROOMUSERINFO\nDESCRIPTOR.message_types_by_name['GiftNotyInfo'] = _GIFTNOTYINFO\nDESCRIPTOR.message_types_by_name['NotifyFreeGift'] = _NOTIFYFREEGIFT\nDESCRIPTOR.message_types_by_name['SendBroadcastPkg'] = _SENDBROADCASTPKG\nDESCRIPTOR.enum_types_by_name['BadgeType'] = _BADGETYPE\n_sym_db.RegisterFileDescriptor(DESCRIPTOR)\n\nCSHead = _reflection.GeneratedProtocolMessageType('CSHead', (_message.Message,), {\n  'DESCRIPTOR' : _CSHEAD,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.CSHead)\n  })\n_sym_db.RegisterMessage(CSHead)\n\nTCPAccessReq = _reflection.GeneratedProtocolMessageType('TCPAccessReq', (_message.Message,), {\n  'DESCRIPTOR' : _TCPACCESSREQ,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.TCPAccessReq)\n  })\n_sym_db.RegisterMessage(TCPAccessReq)\n\nTcpHelloReq = _reflection.GeneratedProtocolMessageType('TcpHelloReq', (_message.Message,), {\n  'DESCRIPTOR' : _TCPHELLOREQ,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.TcpHelloReq)\n  })\n_sym_db.RegisterMessage(TcpHelloReq)\n\nEnterRoomReq = _reflection.GeneratedProtocolMessageType('EnterRoomReq', (_message.Message,), {\n  'DESCRIPTOR' : _ENTERROOMREQ,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.EnterRoomReq)\n  })\n_sym_db.RegisterMessage(EnterRoomReq)\n\nRoomHelloReq = _reflection.GeneratedProtocolMessageType('RoomHelloReq', (_message.Message,), {\n  'DESCRIPTOR' : _ROOMHELLOREQ,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.RoomHelloReq)\n  })\n_sym_db.RegisterMessage(RoomHelloReq)\n\nToken = _reflection.GeneratedProtocolMessageType('Token', (_message.Message,), {\n  'DESCRIPTOR' : _TOKEN,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.Token)\n  })\n_sym_db.RegisterMessage(Token)\n\nPublicChatNotify = _reflection.GeneratedProtocolMessageType('PublicChatNotify', (_message.Message,), {\n  'DESCRIPTOR' : _PUBLICCHATNOTIFY,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.PublicChatNotify)\n  })\n_sym_db.RegisterMessage(PublicChatNotify)\n\nChatInfo = _reflection.GeneratedProtocolMessageType('ChatInfo', (_message.Message,), {\n  'DESCRIPTOR' : _CHATINFO,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.ChatInfo)\n  })\n_sym_db.RegisterMessage(ChatInfo)\n\nRoomUserInfo = _reflection.GeneratedProtocolMessageType('RoomUserInfo', (_message.Message,), {\n  'DESCRIPTOR' : _ROOMUSERINFO,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.RoomUserInfo)\n  })\n_sym_db.RegisterMessage(RoomUserInfo)\n\nGiftNotyInfo = _reflection.GeneratedProtocolMessageType('GiftNotyInfo', (_message.Message,), {\n  'DESCRIPTOR' : _GIFTNOTYINFO,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.GiftNotyInfo)\n  })\n_sym_db.RegisterMessage(GiftNotyInfo)\n\nNotifyFreeGift = _reflection.GeneratedProtocolMessageType('NotifyFreeGift', (_message.Message,), {\n  'DESCRIPTOR' : _NOTIFYFREEGIFT,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.NotifyFreeGift)\n  })\n_sym_db.RegisterMessage(NotifyFreeGift)\n\nSendBroadcastPkg = _reflection.GeneratedProtocolMessageType('SendBroadcastPkg', (_message.Message,), {\n\n  'BroadcastMsg' : _reflection.GeneratedProtocolMessageType('BroadcastMsg', (_message.Message,), {\n    'DESCRIPTOR' : _SENDBROADCASTPKG_BROADCASTMSG,\n    '__module__' : 'yqs_pb2'\n    # @@protoc_insertion_point(class_scope:YiQishanPack.SendBroadcastPkg.BroadcastMsg)\n    })\n  ,\n  'DESCRIPTOR' : _SENDBROADCASTPKG,\n  '__module__' : 'yqs_pb2'\n  # @@protoc_insertion_point(class_scope:YiQishanPack.SendBroadcastPkg)\n  })\n_sym_db.RegisterMessage(SendBroadcastPkg)\n_sym_db.RegisterMessage(SendBroadcastPkg.BroadcastMsg)\n\n\n# @@protoc_insertion_point(module_scope)\n"
  },
  {
    "path": "danmu/danmaku/zhanqi.py",
    "content": "import json\nimport struct\nimport aiohttp\n\n\nclass ZhanQi:\n    heartbeat = b'\\xbb\\xcc\\x00\\x00\\x00\\x00\\x15\\x00\\x00\\x00\\x10\\'{\"cmdid\": \"keeplive\"}'\n    wss_url = 'wss://gw.zhanqi.tv/'\n    heartbeatInterval = 30\n\n    @staticmethod\n    async def get_ws_info(url):\n        reg_datas = []\n        rid = url.split('/')[-1]\n        async with aiohttp.ClientSession() as session:\n            async with session.get('https://m.zhanqi.tv/api/static/v2.1/room/domain/{}.json'.format(rid)) as resp:\n                info = json.loads(await resp.text())\n                roomid = info['data']['id']\n            async with session.get('https://m.zhanqi.tv/api/public/room.viewer') as resp2:\n                res = json.loads(await resp2.text())\n                gid = res['data']['gid']\n                sid = res['data']['sid']\n                timestamp = res['data']['timestamp']\n\n        login = {\n            'cmdid': 'loginreq',\n            'roomid': int(roomid),\n            'chatroomid': 0,\n            'gid': gid,\n            'sid': sid,\n            't': 0,\n            'r': 0,\n            'device': 1,\n            'fhost': 'mzhanqi',\n            'uid': 0,\n            'timestamp': timestamp\n        }\n        body = json.dumps(login, separators=(',', ':'))\n        head = struct.pack('<HIIH', 0xCCBB, 0, len(body), 10000)\n        reg_data = head + body.encode()\n        reg_datas.append(reg_data)\n        return ZhanQi.wss_url, reg_datas\n\n    @staticmethod\n    def decode_msg(message):\n        message = (message[12:])\n        data = json.loads(message)\n        msgs = []\n        msg = {'name': '', 'content': '', 'msg_type': 'other'}\n        if data['cmdid'] == 'chatmessage':  # 聊天信息\n            msg['name'] = data['fromname']\n            msg['content'] = data['content']\n            msg['msg_type'] = 'danmaku'\n        elif data['cmdid'] == 'Gift.Display':  # 礼物信息\n            pass\n        elif data['cmdid'] == 'Prop.Display':  # 礼物信息\n            pass\n        elif data['cmdid'] == 'getuc':  # 人气数\n            pass\n        elif data['cmdid'] == 'loginresp':  # 欢迎信息\n            pass\n        msgs.append(msg.copy())\n        return msgs\n"
  },
  {
    "path": "danmu/main.py",
    "content": "# 部分弹幕功能代码来自项目：https://github.com/IsoaSFlus/danmaku，感谢大佬\n# 快手弹幕代码来源及思路：https://github.com/py-wuhao/ks_barrage，感谢大佬\n# 仅抓取用户弹幕，不包括入场提醒、礼物赠送等。\n\nimport asyncio\nimport danmaku\n\n\nasync def printer(q):\n    while True:\n        m = await q.get()\n        if m['msg_type'] == 'danmaku':\n            print(f'{m[\"name\"]}：{m[\"content\"]}')\n\n\nasync def main(url):\n    q = asyncio.Queue()\n    dmc = danmaku.DanmakuClient(url, q)\n    asyncio.create_task(printer(q))\n    await dmc.start()\n\n\na = input('请输入直播间地址：\\n')\nasyncio.run(main(a))\n\n# 虎牙直播：https://www.huya.com/11352915\n# 斗鱼直播：https://www.douyu.com/85894\n# B站直播：https://live.bilibili.com/70155\n# 快手直播：https://live.kuaishou.com/u/jjworld126\n# 火猫直播：\n# 企鹅电竞：https://egame.qq.com/383204988\n# 花椒直播：https://www.huajiao.com/l/303344861?qd=hu\n# 映客直播：https://www.inke.cn/liveroom/index.html?uid=87493223&id=1593906372018299\n# CC直播：https://cc.163.com/363936598/\n# 酷狗直播：https://fanxing.kugou.com/1676290\n# 战旗直播：\n# 龙珠直播：http://star.longzhu.com/wsde135864219\n# PPS奇秀直播：https://x.pps.tv/room/208337\n# 搜狐千帆直播：https://qf.56.com/520208a\n# 来疯直播：https://v.laifeng.com/656428\n# LOOK直播：https://look.163.com/live?id=196257915\n# AcFun直播：https://live.acfun.cn/live/23682490\n# 艺气山直播：http://www.173.com/96\n"
  },
  {
    "path": "douyin.py",
    "content": "import re\nimport sys\n\nimport requests\n\nDEBUG = False\n\nheaders = {\n    'authority': 'v.douyin.com',\n    'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',\n}\n\nurl = input('请输入抖音直播链接或19位room_id：')\nif re.match(r'\\d{19}', url):\n    room_id = url\nelse:\n    try:\n        url = re.search(r'(https.*)', url).group(1)\n        response = requests.head(url, headers=headers)\n        url = response.headers['location']\n        room_id = re.search(r'\\d{19}', url).group(0)\n    except Exception as e:\n        if DEBUG:\n            print(e)\n        print('获取room_id失败')\n        sys.exit(1)\nprint('room_id', room_id)\n\ntry:\n    headers.update({\n        'authority': 'webcast.amemv.com',\n        'cookie': '_tea_utm_cache_1128={%22utm_source%22:%22copy%22%2C%22utm_medium%22:%22android%22%2C%22utm_campaign%22:%22client_share%22}',\n    })\n\n    params = (\n        ('type_id', '0'),\n        ('live_id', '1'),\n        ('room_id', room_id),\n        ('app_id', '1128'),\n    )\n\n    response = requests.get('https://webcast.amemv.com/webcast/room/reflow/info/', headers=headers, params=params).json()\n\n    rtmp_pull_url = response['data']['room']['stream_url']['rtmp_pull_url']\n    hls_pull_url = response['data']['room']['stream_url']['hls_pull_url']\n    print(rtmp_pull_url)\n    print(hls_pull_url)\nexcept Exception as e:\n    if DEBUG:\n        print(e)\n    print('获取real url失败')\n"
  },
  {
    "path": "douyu.py",
    "content": "# 获取斗鱼直播间的真实流媒体地址，默认最高画质\n# 使用 https://github.com/wbt5/real-url/issues/185 中两位大佬@wjxgzz @4bbu6j5885o3gpv6ss8找到的的CDN，在此感谢！\nimport hashlib\nimport re\nimport time\n\nimport execjs\nimport requests\n\n\nclass DouYu:\n    \"\"\"\n    可用来替换返回链接中的主机部分\n    两个阿里的CDN：\n    dyscdnali1.douyucdn.cn\n    dyscdnali3.douyucdn.cn\n    墙外不用带尾巴的akm cdn：\n    hls3-akm.douyucdn.cn\n    hlsa-akm.douyucdn.cn\n    hls1a-akm.douyucdn.cn\n    \"\"\"\n\n    def __init__(self, rid):\n        \"\"\"\n        房间号通常为1~8位纯数字，浏览器地址栏中看到的房间号不一定是真实rid.\n        Args:\n            rid:\n        \"\"\"\n        self.did = '10000000000000000000000000001501'\n        self.t10 = str(int(time.time()))\n        self.t13 = str(int((time.time() * 1000)))\n\n        self.s = requests.Session()\n        self.res = self.s.get('https://m.douyu.com/' + str(rid)).text\n        result = re.search(r'rid\":(\\d{1,8}),\"vipId', self.res)\n\n        if result:\n            self.rid = result.group(1)\n        else:\n            raise Exception('房间号错误')\n\n    @staticmethod\n    def md5(data):\n        return hashlib.md5(data.encode('utf-8')).hexdigest()\n\n    def get_pre(self):\n        url = 'https://playweb.douyucdn.cn/lapi/live/hlsH5Preview/' + self.rid\n        data = {\n            'rid': self.rid,\n            'did': self.did\n        }\n        auth = DouYu.md5(self.rid + self.t13)\n        headers = {\n            'rid': self.rid,\n            'time': self.t13,\n            'auth': auth\n        }\n        res = self.s.post(url, headers=headers, data=data).json()\n        error = res['error']\n        data = res['data']\n        key = ''\n        if data:\n            rtmp_live = data['rtmp_live']\n            key = re.search(r'(\\d{1,8}[0-9a-zA-Z]+)_?\\d{0,4}(/playlist|.m3u8)', rtmp_live).group(1)\n        return error, key\n\n    def get_js(self):\n        result = re.search(r'(function ub98484234.*)\\s(var.*)', self.res).group()\n        func_ub9 = re.sub(r'eval.*;}', 'strc;}', result)\n        js = execjs.compile(func_ub9)\n        res = js.call('ub98484234')\n\n        v = re.search(r'v=(\\d+)', res).group(1)\n        rb = DouYu.md5(self.rid + self.did + self.t10 + v)\n\n        func_sign = re.sub(r'return rt;}\\);?', 'return rt;}', res)\n        func_sign = func_sign.replace('(function (', 'function sign(')\n        func_sign = func_sign.replace('CryptoJS.MD5(cb).toString()', '\"' + rb + '\"')\n\n        js = execjs.compile(func_sign)\n        params = js.call('sign', self.rid, self.did, self.t10)\n        params += '&ver=219032101&rid={}&rate=-1'.format(self.rid)\n\n        url = 'https://m.douyu.com/api/room/ratestream'\n        res = self.s.post(url, params=params).text\n        key = re.search(r'(\\d{1,8}[0-9a-zA-Z]+)_?\\d{0,4}(.m3u8|/playlist)', res).group(1)\n\n        return key\n\n    def get_pc_js(self, cdn='ws-h5', rate=0):\n        \"\"\"\n        通过PC网页端的接口获取完整直播源。\n        :param cdn: 主线路ws-h5、备用线路tct-h5\n        :param rate: 1流畅；2高清；3超清；4蓝光4M；0蓝光8M或10M\n        :return: JSON格式\n        \"\"\"\n        res = self.s.get('https://www.douyu.com/' + str(self.rid)).text\n        result = re.search(r'(vdwdae325w_64we[\\s\\S]*function ub98484234[\\s\\S]*?)function', res).group(1)\n        func_ub9 = re.sub(r'eval.*?;}', 'strc;}', result)\n        js = execjs.compile(func_ub9)\n        res = js.call('ub98484234')\n\n        v = re.search(r'v=(\\d+)', res).group(1)\n        rb = DouYu.md5(self.rid + self.did + self.t10 + v)\n\n        func_sign = re.sub(r'return rt;}\\);?', 'return rt;}', res)\n        func_sign = func_sign.replace('(function (', 'function sign(')\n        func_sign = func_sign.replace('CryptoJS.MD5(cb).toString()', '\"' + rb + '\"')\n\n        js = execjs.compile(func_sign)\n        params = js.call('sign', self.rid, self.did, self.t10)\n\n        params += '&cdn={}&rate={}'.format(cdn, rate)\n        url = 'https://www.douyu.com/lapi/live/getH5Play/{}'.format(self.rid)\n        res = self.s.post(url, params=params).json()\n\n        return res\n\n    def get_real_url(self):\n        error, key = self.get_pre()\n        if error == 0:\n            pass\n        elif error == 102:\n            raise Exception('房间不存在')\n        elif error == 104:\n            raise Exception('房间未开播')\n        else:\n            key = self.get_js()\n        real_url = {}\n        real_url[\"flv\"] = \"http://vplay1a.douyucdn.cn/live/{}.flv?uuid=\".format(key)\n        real_url[\"x-p2p\"] = \"http://tx2play1.douyucdn.cn/live/{}.xs?uuid=\".format(key)\n        return real_url\n\nif __name__ == '__main__':\n    r = input('输入斗鱼直播间号：\\n')\n    s = DouYu(r)\n    print(s.get_real_url())\n"
  },
  {
    "path": "egame.py",
    "content": "# 获取企鹅电竞的真实流媒体地址。\n# 默认画质为超清\n\nimport requests\nimport re\n\n\nclass EGame:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        room_url = 'https://share.egame.qq.com/cgi-bin/pgg_async_fcgi'\n        post_data = {\n            'param': '''{\"0\":{\"module\":\"pgg_live_read_svr\",\"method\":\"get_live_and_profile_info\",\"param\":{\"anchor_id\":'''\n                     + str(self.rid) + ''',\"layout_id\":\"hot\",\"index\":1,\"other_uid\":0}}}'''\n        }\n        try:\n            response = requests.post(url=room_url, data=post_data).json()\n            data = response.get('data', 0)\n            if data:\n                video_info = data.get('0').get(\n                    'retBody').get('data').get('video_info')\n                pid = video_info.get('pid', 0)\n                if pid:\n                    is_live = data.get('0').get(\n                    'retBody').get('data').get('profile_info').get('is_live', 0)\n                    if is_live:\n                        play_url = video_info.get('stream_infos')[\n                            0].get('play_url')\n                        real_url = re.findall(r'([\\w\\W]+?)&uid=', play_url)[0]\n                    else:\n                        raise Exception('直播间未开播')\n                else:\n                    raise Exception('直播间未启用')\n            else:\n                raise Exception('直播间不存在')\n        except:\n            raise Exception('数据请求错误')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        eg = EGame(rid)\n        return eg.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入企鹅电竞房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "fengbolive.py",
    "content": "# 新浪疯播直播：http://www.fengbolive.com/list?type=hot\n# 链接样式：http://www.fengbolive.com/live/88057518\n\nfrom Crypto.Cipher import AES\nfrom urllib.parse import unquote\nimport base64\nimport json\nimport requests\n\n\nclass FengBo:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://external.fengbolive.com/cgi-bin/get_anchor_info_proxy.fcgi?anchorid={self.rid}')\n            res = res.json()\n        if res['ret'] == 1:\n            info = res['info']\n            info = unquote(info, 'utf-8')\n\n            # 开始AES解密\n            def pad(t):\n                return t + (16 - len(t) % 16) * b'\\x00'\n\n            key = iv = 'abcdefghqwertyui'.encode('utf8')\n            cipher = AES.new(key, AES.MODE_CBC, iv)\n            info = info.encode('utf8')\n            info = pad(info)\n            result = cipher.decrypt(base64.decodebytes(info)).rstrip(b'\\0')\n\n            result = json.loads(result.decode('utf-8'))\n            url = result['url']\n            url = url.replace('hdl', 'hls')\n            url = url.replace('.flv', '/playlist.m3u8')\n            return url\n        else:\n            raise Exception('房间号错误')\n\n\ndef get_real_url(rid):\n    try:\n        fb = FengBo(rid)\n        return fb.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入疯播直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "hongle.py",
    "content": "# 红人直播：https://www.hongle.tv/\n# 该平台需登陆，下面代码中已集成一个账号的登陆方式；\n# 如登陆信息过期，可用自己的账号登陆后，查找浏览器Local Storage中的hrtk字段，替换代码中的accesstoken\n\nfrom urllib.parse import urlencode\nfrom urllib.parse import unquote\nimport requests\nimport time\nimport hashlib\nimport json\n\n\nclass HongLe:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        # 模拟登陆\n        with requests.Session() as s:\n            pass\n\n        tt = int(time.time() * 1000)\n        url = f'https://service.hongle.tv/v2/userw/login?_st1={tt}'\n        data = {\n            '_st1': tt,\n            'geetest_challenge': '7f4f6fd6257799c0bcac1f38c21c042dl0',\n            'geetest_seccode': 'd1163915f4cfd6c998014c4ca8899c9d|jordan',\n            'geetest_validate': 'd1163915f4cfd6c998014c4ca8899c9d',\n            'name': '16530801176',\n            'password': 'QTXz9/Sp40BbMHwVtcb7AQ==',\n        }\n\n        data1 = urlencode(data) + 'yuj1ah5o'\n        _ajaxdata1 = hashlib.md5(data1.encode('utf-8')).hexdigest()\n        data['_ajaxData1'] = _ajaxdata1\n        del data['_st1']\n        data = json.dumps(data, separators=(',', ':'))\n        headers = {'Content-Type': 'application/x-www-form-urlencoded'}\n        res = s.post(url, data=data, headers=headers).json()\n        if res['status']['statuscode'] == '0':\n            sessionid = res['data']['sessionid']\n        else:\n            raise Exception('登陆信息过期')\n\n        url = 'https://service.hongle.tv/v2/roomw/media'\n        accesstoken = sessionid\n        params = {\n            '_st1': tt,\n            'accessToken': accesstoken,\n            'of': 1,\n            'showid': self.rid,\n            'tku': 43112608,\n        }\n        data = urlencode(params) + 'yuj1ah5o'\n        _ajaxData1 = hashlib.md5(data.encode('utf-8')).hexdigest()\n        params['_ajaxData1'] = _ajaxData1\n        params['accessToken'] = unquote(accesstoken)\n\n        res = s.get(url, params=params)\n        if res.status_code == 200:\n            res = res.json()\n            statuscode = res['status']['statuscode']\n            if statuscode == '0':\n                if res['data']['live_status'] == '1':\n                    real_url = res['data']['media_url_web']\n                    real_url = real_url.replace('http', 'https')\n                    real_url = real_url.replace('__', '&')\n                    return real_url\n                else:\n                    raise Exception('未开播')\n            else:\n                raise Exception('房间不存在')\n        else:\n            raise Exception('参数错误')\n\n\ndef get_real_url(rid):\n    try:\n        hl = HongLe(rid)\n        return hl.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入红人直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "huajiao.py",
    "content": "# 获取花椒直播的真实流媒体地址。\n\nimport requests\nimport time\n\n\nclass HuaJiao:\n\n    def __init__(self, rid):\n        self.rid = rid\n        self.headers = {\n            'Referer': 'https://h.huajiao.com/l/index?liveid={}&qd=hu'.format(rid)\n        }\n\n    def get_real_url(self):\n        tt = str(time.time())\n        try:\n            room_url = 'https://h.huajiao.com/api/getFeedInfo?sid={tt}&liveid={rid}'.format(tt=tt, rid=self.rid)\n            response = requests.get(url=room_url, headers=self.headers).json()\n            real_url = response.get('data').get('live').get('main')\n        except:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        hj = HuaJiao(rid)\n        return hj.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入花椒直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "huomao.py",
    "content": "# 获取火猫直播的真实流媒体地址,默认为最高画质.\n# 获取的流媒体地址如:http://live-lx-hdl.huomaotv.cn/live/qvCESZ?t=1573928152&r=377789475848&stream=qvCESZ&rid=oubvc2y3v&token=44a7f115f0af496e268bcbb7cdbb63b1&url=http%3A%2F%2Flive-lx-hdl.huomaotv.cn%2Flive%2FqvCESZ&from=huomaoh5room\n# 实际上使用http://live-lx-hdl.huomaotv.cn/live/qvCESZ?token=44a7f115f0af496e268bcbb7cdbb63b1,即可播放\n# 链接中lx可替换cdn(lx,tx,ws,js,jd2等),媒体类型可为.flv或.m3u8,码率可为BL8M,BL4M,TD,BD,HD,SD\n\nimport requests\nimport time\nimport hashlib\nimport re\n\n\nclass HuoMao:\n\n    def __init__(self, rid):\n        \"\"\"\n        火猫直播已经倒闭了\n        Args:\n            rid: 房间号\n        \"\"\"\n        self.rid = rid\n\n    @staticmethod\n    def get_videoids(rid):\n        room_url = f'https://www.huomao.com/mobile/mob_live/{rid}'\n        response = requests.get(url=room_url).text\n        try:\n            videoids = re.findall(r'var stream = \"([\\w\\W]+?)\";', response)[0]\n        except IndexError:\n            videoids = 0\n        return videoids\n\n    @staticmethod\n    def get_token(videoids):\n        tt = str(int((time.time() * 1000)))\n        token = hashlib.md5(f'{videoids}huomaoh5room{tt}6FE26D855E1AEAE090E243EB1AF73685'.encode('utf-8')).hexdigest()\n        return token\n\n    def get_real_url(self):\n        videoids = self.get_videoids(self.rid)\n        if videoids:\n            token = self.get_token(videoids)\n            room_url = 'https://www.huomao.com/swf/live_data'\n            post_data = {\n                'cdns': 1,\n                'streamtype': 'live',\n                'VideoIDS': videoids,\n                'from': 'huomaoh5room',\n                'time': time,\n                'token': token\n            }\n            response = requests.post(url=room_url, data=post_data).json()\n            roomStatus = response.get('roomStatus', 0)\n            if roomStatus == '1':\n                real_url_flv = response.get('streamList')[-1].get('list')[0].get('url')\n                real_url_m3u8 = response.get('streamList')[-1].get('list_hls')[0].get('url')\n                real_url = [real_url_flv, real_url_m3u8.replace('_480', '')]\n            else:\n                raise Exception('直播间未开播')\n        else:\n            raise Exception('直播间不存在')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        hm = HuoMao(rid)\n        return hm.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入火猫直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "huya.py",
    "content": "# 获取虎牙直播的真实流媒体地址。\n\nimport requests\nimport re\nimport base64\nimport urllib.parse\nimport hashlib\nimport time\n\n\ndef live(e):\n    i, b = e.split('?')\n    r = i.split('/')\n    s = re.sub(r'.(flv|m3u8)', '', r[-1])\n    c = b.split('&', 3)\n    c = [i for i in c if i != '']\n    n = {i.split('=')[0]: i.split('=')[1] for i in c}\n    fm = urllib.parse.unquote(n['fm'])\n    u = base64.b64decode(fm).decode('utf-8')\n    p = u.split('_')[0]\n    f = str(int(time.time() * 1e7))\n    l = n['wsTime']\n    t = '0'\n    h = '_'.join([p, t, s, f, l])\n    m = hashlib.md5(h.encode('utf-8')).hexdigest()\n    y = c[-1]\n    url = \"{}?wsSecret={}&wsTime={}&u={}&seqid={}&{}\".format(i, m, l, t, f, y)\n    return url\n\n\ndef get_real_url(room_id):\n    try:\n        room_url = 'https://m.huya.com/' + str(room_id)\n        header = {\n            'Content-Type': 'application/x-www-form-urlencoded',\n            'User-Agent': 'Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/75.0.3770.100 Mobile Safari/537.36 '\n        }\n        response = requests.get(url=room_url, headers=header).text\n        liveLineUrl = re.findall(r'\"liveLineUrl\":\"([\\s\\S]*?)\",', response)[0]\n        liveline = base64.b64decode(liveLineUrl).decode('utf-8')\n        if liveline:\n            if 'replay' in liveline:\n                return '直播录像：' + liveline\n            else:\n                liveline = live(liveline)\n                real_url = (\"https:\" + liveline).replace(\"hls\", \"flv\").replace(\"m3u8\", \"flv\")\n        else:\n            real_url = '未开播或直播间不存在'\n    except:\n        real_url = '未开播或直播间不存在'\n    return real_url\n\n\nrid = input('输入虎牙直播房间号：\\n')\nreal_url = get_real_url(rid)\nprint('该直播间源地址为：')\nprint(real_url)"
  },
  {
    "path": "imifun.py",
    "content": "# 艾米直播：https://www.imifun.com/\n\nimport requests\nimport re\n\n\nclass IMFun:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://www.imifun.com/{self.rid}').text\n        roomid = re.search(r'mixPkPlayUrl =\"rtmp://wsmd.happyia.com/ivp/(\\d+-\\d+)\"', res).group(1)\n        if roomid:\n            status = re.search(r\"isLive:(\\d),\", res).group(1)\n            if status == '1':\n                real_url = f'https://wsmd.happyia.com/ivp/{roomid}.flv'\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        imf = IMFun(rid)\n        return imf.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入艾米直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "immomo.py",
    "content": "import requests\n\n\nclass ImMoMo:\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        url = 'https://web.immomo.com/webmomo/api/scene/profile/roominfos'\n        data = {\n            'stid': self.rid,\n            'src': 'url'\n        }\n\n        with requests.Session() as s:\n            s.get('https://web.immomo.com')\n            res = s.post(url, data=data).json()\n\n        ec = res.get('ec', 0)\n        if ec != 200:\n            raise Exception('请求参数错误')\n        else:\n            live = res['data']['live']\n            if live:\n                real_url = res['data']['url']\n                return real_url\n            else:\n                raise Exception('未开播')\n\n\ndef get_real_url(rid):\n    try:\n        mm = ImMoMo(rid)\n        return mm.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入陌陌直播房间号：\\n')\n    print(get_real_url(r))\n\n"
  },
  {
    "path": "inke.py",
    "content": "# 获取映客直播的真实流媒体地址。\n\nimport requests\n\n\nclass InKe:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        try:\n            room_url = 'https://webapi.busi.inke.cn/web/live_share_pc?uid=' + str(self.rid)\n            response = requests.get(url=room_url).json()\n            record_url = response.get('data').get('file').get('record_url')\n            stream_addr = response.get('data').get('live_addr')\n            real_url = {\n                'record_url': record_url,\n                'stream_addr': stream_addr\n            }\n        except:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        inke = InKe(rid)\n        return inke.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入映客直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "iqiyi.js",
    "content": "function cmd5x(ba) {\n    if (typeof (ArrayBuffer) == \"undefined\" || typeof (Float64Array) == \"undefined\" || typeof (Uint8Array) == \"undefined\") {\n        return \"iloveiqiyi\"\n    }\n    var bq = new ArrayBuffer(16384)\n      , av = 5136\n      , ai = new Int32Array(bq)\n      , ah = new Uint8Array(bq)\n      , bj = new Int8Array(bq)\n      , bd = new Int32Array(bq)\n      , a3 = 1760\n      , aL = 0\n      , aJ = 0\n      , aI = 0\n      , aT = 0\n      , bv = 0\n      , a7 = 0\n      , aU = 0\n      , bU = 0\n      , a2 = 0\n      , bR = 0\n      , bD = 0\n      , bu = 0\n      , bk = 0\n      , bW = 0\n      , bI = 0\n      , bQ = 0\n      , br = 0\n      , aH = 0\n      , bP = 0\n      , bO = 0\n      , bL = 0\n      , bH = 0\n      , bG = 0\n      , bF = Math.floor\n      , bB = Math.abs\n      , bJ = Math.min\n      , b2 = 0;\n    ai[0] = 255;\n    var bm = Math.imul || function(d, c) {\n        return (((d & 65535) * (c & 65535)) + (((((d >>> 16) & 65535) * (c & 65535) + (d & 65535) * ((c >>> 16) & 65535)) << 16) >>> 0) | 0)\n    }\n    ;\n    for (var aV = 0, aN = 0; aN < ba.length; ++aN) {\n        var aU = ba.charCodeAt(aN);\n        aU >= 55296 && aU <= 57343 && (aU = 65536 + ((1023 & aU) << 10) | 1023 & ba.charCodeAt(++aN)),\n        aU <= 127 ? ++aV : aV += aU <= 2047 ? 2 : aU <= 65535 ? 3 : aU <= 2097151 ? 4 : aU <= 67108863 ? 5 : 6\n    }\n    var aO = new Array(aV + 1)\n      , aP = 0;\n    ai[51] = 3920,\n    ai[54] = 8328;\n    for (var a9 = aP + aV, aN = 0; aN < ba.length; ++aN) {\n        var aU = ba.charCodeAt(aN);\n        if (aU >= 55296 && aU <= 57343 && (aU = 65536 + ((1023 & aU) << 10) | 1023 & ba.charCodeAt(++aN)),\n        aU <= 127) {\n            if (aP >= a9) {\n                break\n            }\n            aO[aP++] = aU\n        } else {\n            if (aU <= 2047) {\n                if (aP + 1 >= a9) {\n                    break\n                }\n                aO[aP++] = 192 | aU >> 6,\n                aO[aP++] = 128 | 63 & aU\n            } else {\n                if (aU <= 65535) {\n                    if (aP + 2 >= a9) {\n                        break\n                    }\n                    aO[aP++] = 224 | aU >> 12,\n                    aO[aP++] = 128 | aU >> 6 & 63,\n                    aO[aP++] = 128 | 63 & aU\n                } else {\n                    if (aU <= 2097151) {\n                        if (aP + 3 >= a9) {\n                            break\n                        }\n                        aO[aP++] = 240 | aU >> 18,\n                        aO[aP++] = 128 | aU >> 12 & 63,\n                        aO[aP++] = 128 | aU >> 6 & 63,\n                        aO[aP++] = 128 | 63 & aU\n                    } else {\n                        if (aU <= 67108863) {\n                            if (aP + 4 >= a9) {\n                                break\n                            }\n                            aO[aP++] = 248 | aU >> 24,\n                            aO[aP++] = 128 | aU >> 18 & 63,\n                            aO[aP++] = 128 | aU >> 12 & 63,\n                            aO[aP++] = 128 | aU >> 6 & 63,\n                            aO[aP++] = 128 | 63 & aU\n                        } else {\n                            if (aP + 5 >= a9) {\n                                break\n                            }\n                            aO[aP++] = 252 | aU >> 30,\n                            aO[aP++] = 128 | aU >> 24 & 63,\n                            aO[aP++] = 128 | aU >> 18 & 63,\n                            aO[aP++] = 128 | aU >> 12 & 63,\n                            aO[aP++] = 128 | aU >> 6 & 63,\n                            aO[aP++] = 128 | 63 & aU\n                        }\n                    }\n                }\n            }\n        }\n    }\n    aO[aP] = 0,\n    ah.set(aO, av),\n    ba = av;\n    var aM = 0\n      , bh = 0\n      , a1 = 0\n      , aZ = 0\n      , bb = 0\n      , aK = 0\n      , a4 = 0\n      , aW = 0\n      , aL = 0\n      , aJ = 0\n      , aI = 0\n      , aT = 0\n      , bX = 0\n      , aR = 0\n      , bv = 0\n      , a7 = 0\n      , aU = 0\n      , bU = 0\n      , a2 = 0\n      , bR = 0\n      , bD = 0\n      , bu = 0\n      , bk = 0\n      , bW = 0\n      , bI = 0\n      , bQ = 0\n      , br = 0\n      , aH = 0\n      , bP = 0\n      , bO = 0\n      , bL = 0\n      , bH = 0\n      , bG = 0\n      , bF = 0\n      , bB = 0\n      , bz = 0\n      , by = 0\n      , bx = 0\n      , bs = 0\n      , bq = 0\n      , bp = 0\n      , bo = 0\n      , bn = 0\n      , ca = 0\n      , af = 0\n      , aQ = 0\n      , aX = 0\n      , bJ = 0\n      , b0 = 0\n      , bS = 0\n      , a5 = 0\n      , b8 = 0\n      , cp = 0\n      , ci = 0\n      , bf = 0\n      , bt = 0\n      , aj = 0\n      , cm = 0\n      , aw = 0\n      , ap = 0\n      , bA = 0\n      , b5 = 0\n      , aD = 0\n      , cs = 0\n      , cd = 0\n      , aA = 0\n      , cj = 0\n      , am = 0\n      , aq = 0\n      , b2 = 0\n      , bC = 0\n      , ay = 0\n      , aY = 0\n      , cq = 0\n      , ct = 0\n      , ch = 0\n      , ad = 0\n      , b3 = 0\n      , bK = 0\n      , az = 0\n      , bZ = 0\n      , bY = 0\n      , ak = 0\n      , cn = 0\n      , b6 = 0\n      , a6 = 0\n      , aB = 0\n      , an = 0\n      , b9 = 0\n      , bT = 0\n      , bg = 0\n      , aE = 0\n      , cf = 0\n      , bl = 0\n      , aG = 0\n      , au = 0\n      , ab = 0\n      , bN = 0\n      , ag = 0\n      , aS = 0\n      , a0 = 0\n      , bM = 0\n      , b1 = 0\n      , bV = 0\n      , a8 = 0\n      , cb = 0\n      , cr = 0\n      , ck = 0\n      , bi = 0\n      , bw = 0\n      , al = 0\n      , co = 0\n      , ax = 0\n      , ar = 0\n      , bE = 0\n      , b7 = 0\n      , aF = 0\n      , aa = 0\n      , cg = 0;\n    b9 = a3,\n    a3 = a3 + 304 | 0,\n    ch = b9 + 40 | 0,\n    aB = b9,\n    bb = ch + 4 | 0,\n    aK = ch + 8 | 0,\n    aU = ch + 12 | 0,\n    aH = ch + 16 | 0,\n    bs = ch + 20 | 0,\n    bS = ch + 24 | 0,\n    bA = ch + 28 | 0,\n    cd = ch + 32 | 0,\n    aA = ch + 36 | 0,\n    cj = ch + 40 | 0,\n    a4 = ch + 44 | 0,\n    aW = ch + 48 | 0,\n    aL = ch + 52 | 0,\n    aJ = ch + 56 | 0,\n    aI = ch + 60 | 0,\n    aT = ch + 64 | 0,\n    bX = ch + 68 | 0,\n    aR = ch + 72 | 0,\n    bv = ch + 76 | 0,\n    a7 = ch + 80 | 0,\n    bU = ch + 84 | 0,\n    a2 = ch + 88 | 0,\n    bR = ch + 92 | 0,\n    bD = ch + 96 | 0,\n    bu = ch + 100 | 0,\n    bk = ch + 104 | 0,\n    bW = ch + 108 | 0,\n    bI = ch + 112 | 0,\n    bQ = ch + 116 | 0,\n    br = ch + 120 | 0,\n    bP = ch + 124 | 0,\n    bO = ch + 128 | 0,\n    bL = ch + 132 | 0,\n    bH = ch + 136 | 0,\n    bG = ch + 140 | 0,\n    bF = ch + 144 | 0,\n    bB = ch + 148 | 0,\n    bz = ch + 152 | 0,\n    by = ch + 156 | 0,\n    bx = ch + 160 | 0,\n    bq = ch + 164 | 0,\n    bp = ch + 168 | 0,\n    bo = ch + 172 | 0,\n    bn = ch + 176 | 0,\n    ca = ch + 180 | 0,\n    af = ch + 184 | 0,\n    aQ = ch + 188 | 0,\n    aX = ch + 192 | 0,\n    bJ = ch + 196 | 0,\n    b0 = ch + 200 | 0,\n    a5 = ch + 204 | 0,\n    b8 = ch + 208 | 0,\n    cp = ch + 212 | 0,\n    ci = ch + 216 | 0,\n    bf = ch + 220 | 0,\n    bt = ch + 224 | 0,\n    aj = ch + 228 | 0,\n    cm = ch + 232 | 0,\n    aw = ch + 236 | 0,\n    ap = ch + 240 | 0,\n    b5 = ch + 244 | 0,\n    aD = ch + 248 | 0,\n    cs = ch + 252 | 0,\n    a1 = 78,\n    am = 0,\n    aq = 0,\n    b2 = 0,\n    bC = 0,\n    ay = 0,\n    aY = 0,\n    cq = 0,\n    ct = 0,\n    ad = 0,\n    b3 = 0,\n    bK = 0,\n    az = 0,\n    bZ = 0,\n    bh = 0,\n    aM = 0,\n    bY = 0,\n    ak = 0,\n    cn = 0,\n    b6 = 0,\n    a6 = 0;\n    ba: for (; ; ) {\n        switch (0 | a1) {\n        case 62:\n            break ba;\n        case 145:\n            an = 136;\n            break ba;\n        case 112:\n            cr = a6,\n            cb = b6,\n            a8 = cn,\n            bV = ak,\n            b1 = bY,\n            bM = aM,\n            a0 = bh,\n            aS = bZ,\n            ag = az,\n            bN = bK,\n            ab = b3,\n            au = ad,\n            aG = ct,\n            bl = cq,\n            cf = ay,\n            aE = bC,\n            bg = b2,\n            bT = aq,\n            aZ = am,\n            a1 = 99,\n            aY = 0 | bd[aB + (cn + 1588902052 + -1 + -1588902052 + -1250383377 - am + 1250383377 << 2) >> 2],\n            a6 = cr,\n            b6 = cb,\n            cn = a8,\n            ak = bV,\n            bY = b1,\n            aM = bM,\n            bh = a0,\n            bZ = aS,\n            az = ag,\n            bK = bN,\n            b3 = ab,\n            ad = au,\n            ct = aG,\n            cq = bl,\n            ay = cf,\n            bC = aE,\n            b2 = bg,\n            aq = bT,\n            am = aZ;\n            continue ba;\n        case 111:\n            ck = a6,\n            aZ = b6,\n            bT = cn,\n            bg = ak,\n            aE = bY,\n            cf = aM,\n            bl = bh,\n            aG = bZ,\n            au = az,\n            ab = bK,\n            bN = b3,\n            ag = ad,\n            aS = ct,\n            a0 = cq,\n            bM = aY,\n            b1 = ay,\n            bV = bC,\n            a8 = b2,\n            cb = aq,\n            cr = am,\n            a1 = (0 | cn) == (0 | am) ? 110 : 107,\n            a6 = ck,\n            b6 = aZ,\n            cn = bT,\n            ak = bg,\n            bY = aE,\n            aM = cf,\n            bh = bl,\n            bZ = aG,\n            az = au,\n            bK = ab,\n            b3 = bN,\n            ad = ag,\n            ct = aS,\n            cq = a0,\n            aY = bM,\n            ay = b1,\n            bC = bV,\n            b2 = a8,\n            aq = cb,\n            am = cr;\n            continue ba;\n        case 110:\n            aZ = a6,\n            bT = b6,\n            bg = cn,\n            aE = ak,\n            cf = bY,\n            bl = aM,\n            aG = bh,\n            au = bZ,\n            ab = az,\n            bN = bK,\n            ag = b3,\n            aS = ad,\n            a0 = ct,\n            bM = cq,\n            b1 = aY,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = (0 | bh) > 0 ? 109 : 107,\n            a6 = aZ,\n            b6 = bT,\n            cn = bg,\n            ak = aE,\n            bY = cf,\n            aM = bl,\n            bh = aG,\n            bZ = au,\n            az = ab,\n            bK = bN,\n            b3 = ag,\n            ad = aS,\n            ct = a0,\n            cq = bM,\n            aY = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 109:\n            bT = a6,\n            bg = b6,\n            aE = cn,\n            cf = ak,\n            bl = bY,\n            aG = aM,\n            au = bh,\n            ab = bZ,\n            bN = az,\n            ag = bK,\n            aS = b3,\n            a0 = ad,\n            bM = ct,\n            b1 = cq,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = 99,\n            aY = 0 | bd[aB >> 2],\n            a6 = bT,\n            b6 = bg,\n            cn = aE,\n            ak = cf,\n            bY = bl,\n            aM = aG,\n            bh = au,\n            bZ = ab,\n            az = bN,\n            bK = ag,\n            b3 = aS,\n            ad = a0,\n            ct = bM,\n            cq = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 107:\n            aZ = a6,\n            bT = b6,\n            bg = cn,\n            aE = ak,\n            cf = bY,\n            bl = aM,\n            aG = bh,\n            au = bZ,\n            ab = az,\n            bN = bK,\n            ag = b3,\n            aS = ad,\n            a0 = ct,\n            bM = cq,\n            b1 = aY,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = (0 | cn) > (am - 1017329338 + 1 + 1017329338 | 0) ? 106 : 105,\n            a6 = aZ,\n            b6 = bT,\n            cn = bg,\n            ak = aE,\n            bY = cf,\n            aM = bl,\n            bh = aG,\n            bZ = au,\n            az = ab,\n            bK = bN,\n            b3 = ag,\n            ad = aS,\n            ct = a0,\n            cq = bM,\n            aY = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 106:\n            bT = a6,\n            bg = b6,\n            aE = cn,\n            cf = ak,\n            bl = bY,\n            aG = aM,\n            au = bh,\n            ab = bZ,\n            bN = az,\n            ag = bK,\n            aS = b3,\n            a0 = ad,\n            bM = ct,\n            b1 = cq,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = 99,\n            aY = 0,\n            a6 = bT,\n            b6 = bg,\n            cn = aE,\n            ak = cf,\n            bY = bl,\n            aM = aG,\n            bh = au,\n            bZ = ab,\n            az = bN,\n            bK = ag,\n            b3 = aS,\n            ad = a0,\n            ct = bM,\n            cq = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 105:\n            bT = a6,\n            bg = b6,\n            aE = cn,\n            cf = ak,\n            bl = bY,\n            aG = aM,\n            au = bh,\n            ab = bZ,\n            bN = az,\n            ag = bK,\n            aS = b3,\n            a0 = ad,\n            bM = ct,\n            b1 = cq,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = 99,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = bT,\n            b6 = bg,\n            cn = aE,\n            ak = cf,\n            bY = bl,\n            aM = aG,\n            bh = au,\n            bZ = ab,\n            az = bN,\n            bK = ag,\n            b3 = aS,\n            ad = a0,\n            ct = bM,\n            cq = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 104:\n            a1 = ad - 520486856 + 40 + 520486856 >> 6 << 4,\n            aZ = a6,\n            bT = b6,\n            bg = cn,\n            aE = ak,\n            cf = bY,\n            bl = aM,\n            aG = bh,\n            au = bZ,\n            ab = az,\n            bN = bK,\n            ag = b3,\n            aS = ad,\n            a0 = ct,\n            bM = cq,\n            b1 = aY,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = (0 | cn) == (14 & a1 | 14 ^ a1 | 0) ? 103 : 102,\n            a6 = aZ,\n            b6 = bT,\n            cn = bg,\n            ak = aE,\n            bY = cf,\n            aM = bl,\n            bh = aG,\n            bZ = au,\n            az = ab,\n            bK = bN,\n            b3 = ag,\n            ad = aS,\n            ct = a0,\n            cq = bM,\n            aY = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 103:\n            bT = a6,\n            bg = b6,\n            aE = cn,\n            cf = ak,\n            bl = bY,\n            aG = aM,\n            au = bh,\n            ab = bZ,\n            bN = az,\n            ag = bK,\n            aS = b3,\n            a0 = ad,\n            bM = ct,\n            b1 = cq,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = 99,\n            aY = (ad << 3) - 906020365 + 256 + 906020365 | 0,\n            a6 = bT,\n            b6 = bg,\n            cn = aE,\n            ak = cf,\n            bY = bl,\n            aM = aG,\n            bh = au,\n            bZ = ab,\n            az = bN,\n            bK = ag,\n            b3 = aS,\n            ad = a0,\n            ct = bM,\n            cq = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 102:\n            aZ = a6,\n            bT = b6,\n            bg = cn,\n            aE = ak,\n            cf = bY,\n            bl = aM,\n            aG = bh,\n            au = bZ,\n            ab = az,\n            bN = bK,\n            ag = b3,\n            aS = ad,\n            a0 = ct,\n            bM = cq,\n            b1 = aY,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = (0 | cn) > (am - 2136007327 + 1 + 2136007327 | 0) ? 101 : 100,\n            a6 = aZ,\n            b6 = bT,\n            cn = bg,\n            ak = aE,\n            bY = cf,\n            aM = bl,\n            bh = aG,\n            bZ = au,\n            az = ab,\n            bK = bN,\n            b3 = ag,\n            ad = aS,\n            ct = a0,\n            cq = bM,\n            aY = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 101:\n            bT = a6,\n            bg = b6,\n            aE = cn,\n            cf = ak,\n            bl = bY,\n            aG = aM,\n            au = bh,\n            ab = bZ,\n            bN = az,\n            ag = bK,\n            aS = b3,\n            a0 = ad,\n            bM = ct,\n            b1 = cq,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = 99,\n            aY = 0,\n            a6 = bT,\n            b6 = bg,\n            cn = aE,\n            ak = cf,\n            bY = bl,\n            aM = aG,\n            bh = au,\n            bZ = ab,\n            az = bN,\n            bK = ag,\n            b3 = aS,\n            ad = a0,\n            ct = bM,\n            cq = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 100:\n            bT = a6,\n            bg = b6,\n            aE = cn,\n            cf = ak,\n            bl = bY,\n            aG = aM,\n            au = bh,\n            ab = bZ,\n            bN = az,\n            ag = bK,\n            aS = b3,\n            a0 = ad,\n            bM = ct,\n            b1 = cq,\n            bV = ay,\n            a8 = bC,\n            cb = b2,\n            cr = aq,\n            ck = am,\n            a1 = 99,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = bT,\n            b6 = bg,\n            cn = aE,\n            ak = cf,\n            bY = bl,\n            aM = aG,\n            bh = au,\n            bZ = ab,\n            az = bN,\n            bK = ag,\n            b3 = aS,\n            ad = a0,\n            ct = bM,\n            cq = b1,\n            ay = bV,\n            bC = a8,\n            b2 = cb,\n            aq = cr,\n            am = ck;\n            continue ba;\n        case 99:\n            am = 0 | bd[ch + (ct << 2) >> 2],\n            bY = -1 & ~(1 | ~(((1 ^ am) & am) - (0 - aY))),\n            bg = (-2 ^ am) & am,\n            bT = ~bY,\n            aE = ~bg,\n            cn = 1404706963,\n            cn = ((-1404706964 & bT | bY & cn) ^ (-1404706964 & aE | bg & cn) | ~(bT | aE) & (-1404706964 | cn)) - (0 - ((-2 ^ aY) & aY)) | 0,\n            aE = -1 & ~(1 | ~(0 - (0 - cn + (0 - ((1 ^ ak) & ak))))),\n            bT = (-2 ^ ak) & ak,\n            bg = ~aE,\n            bY = ~bT,\n            aG = 405859794,\n            am = 0 - (0 - ((-405859795 & bg | aE & aG) ^ (-405859795 & bY | bT & aG) | ~(bg | bY) & (-405859795 | aG)) + (0 - (-1 & ~(-2 | ~(am + 125479053 + aY - 125479053))))) | 0,\n            aG = (0 | ct) % 4 | 0,\n            aG = 0 - (0 - (aG << 2) - 1639813410) - 1628865018 + ((0 | bm(aG + -946902778 + -1 + 946902778 | 0, aG)) / 2 | 0) + 1628865018 | 0,\n            bY = aG + -705355747 + -1639813405 + 705355747 | 0,\n            bg = am << bY,\n            aG = am >>> (-135710764 - aG + 1775524201 | 0),\n            aG = bg & aG | bg ^ aG,\n            bg = (-2 ^ b2) & b2,\n            bT = 0 - (0 - b2 - 1859242102) | 0,\n            bT = -1 & ~(1 | ~(403699684 + ((1 ^ bT) & bT) + aG + -403699684)),\n            aE = ~bT,\n            cf = ~bg,\n            bl = 2075741682,\n            al = -1 & ~(-2 | ~aG),\n            bw = ~al,\n            bi = 1859242101,\n            aZ = 1973195179,\n            au = a6,\n            ab = b6,\n            bN = ak,\n            ag = aM,\n            aS = bh,\n            a0 = bZ,\n            bM = az,\n            b1 = bK,\n            bV = b3,\n            a8 = ad,\n            cb = cq,\n            cr = bC,\n            ck = b2,\n            aq = ay,\n            a1 = 119,\n            b2 = 0 - (0 - ((-1973195180 & bw | al & aZ) ^ (-1973195180 & bi | -1859242102 & aZ) | ~(bw | bi) & (-1973195180 | aZ)) + (0 - ((-2075741683 & aE | bT & bl) ^ (-2075741683 & cf | bg & bl) | ~(aE | cf) & (-2075741683 | bl)))) | 0,\n            aY = aG,\n            ct = 0 - (0 - ct - 1) | 0,\n            a6 = au,\n            b6 = ab,\n            ak = bN,\n            aM = ag,\n            bh = aS,\n            bZ = a0,\n            az = bM,\n            bK = b1,\n            b3 = bV,\n            ad = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck;\n            continue ba;\n        case 97:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | ct) < 48 ? 95 : 63,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 95:\n            aE = b2 & ~bC | bC & ~b2,\n            ak = 1719848736,\n            ak = (-1719848737 & ~aE | aE & ak) ^ (-1719848737 & ~ay | ay & ak),\n            aE = 0 - (0 - (-1 & ~(1 | ~aq)) + (0 - ak)) | 0,\n            aE &= 1 ^ aE,\n            cf = (-2 ^ aq) & aq,\n            bl = ~aE,\n            aG = ~cf,\n            cn = -373881475,\n            au = a6,\n            ab = b6,\n            bN = bY,\n            ag = aM,\n            aS = bh,\n            a0 = bZ,\n            bM = az,\n            b1 = bK,\n            bV = b3,\n            a8 = ad,\n            cb = ct,\n            cr = cq,\n            ck = ay,\n            bi = bC,\n            bw = b2,\n            al = aq,\n            a1 = 94,\n            am = 0 - (0 - ad + 1) >> 2,\n            aY = ak,\n            ak = ((373881474 & bl | aE & cn) ^ (373881474 & aG | cf & cn) | ~(bl | aG) & (373881474 | cn)) - (0 - (-1 & ~(-2 | ~ak))) | 0,\n            cn = ((0 - (0 - (3 * ct | 0) - 5) | 0) % 16 | 0) - 169207214 + cq + 169207214 | 0,\n            a6 = au,\n            b6 = ab,\n            bY = bN,\n            aM = ag,\n            bh = aS,\n            bZ = a0,\n            az = bM,\n            bK = b1,\n            b3 = bV,\n            ad = a8,\n            ct = cb,\n            cq = cr,\n            ay = ck,\n            bC = bi,\n            b2 = bw,\n            aq = al;\n            continue ba;\n        case 94:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (ad + 1934808656 + 32 - 1934808656 >> 2 | 0) ? 82 : 93,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 93:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (0 | am) ? 92 : 89,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 92:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | bh) > 0 ? 91 : 90,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 91:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0 | bd[aB + (cn + (0 - am) << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 90:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0 | bd[aB + (cn + 692823717 + -1 - 692823717 + 2024697286 - am - 2024697286 << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 89:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) == (0 | am) ? 88 : 85,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 88:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | bh) > 0 ? 87 : 85,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 87:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0 | bd[aB >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 85:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (0 - (0 - am - 1) | 0) ? 84 : 83,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 84:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 83:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 82:\n            aZ = ad + 430907182 + 40 - 430907182 >> 6 << 4,\n            bT = ~aZ,\n            bg = -15,\n            a1 = 2004298389,\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) == ((-2004298390 & bT | aZ & a1) ^ (-2004298390 & bg | 14 & a1) | ~(bT | bg) & (-2004298390 | a1) | 0) ? 81 : 80,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 81:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = (ad << 3) - -256 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 80:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (0 - (0 - am - 1) | 0) ? 79 : 77,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 79:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 78:\n            bd[ch >> 2] = -680876936,\n            bd[bb >> 2] = -389564586,\n            bd[aK >> 2] = 606105819,\n            bd[aU >> 2] = -1044525330,\n            bd[aH >> 2] = -176418897,\n            bd[bs >> 2] = 1200080426,\n            bd[bS >> 2] = -1473231341,\n            bd[bA >> 2] = -45705983,\n            bd[cd >> 2] = 1770035416,\n            bd[aA >> 2] = -1958414417,\n            bd[cj >> 2] = -42063,\n            bd[a4 >> 2] = -1990404162,\n            bd[aW >> 2] = 1804603682,\n            bd[aL >> 2] = -40341101,\n            bd[aJ >> 2] = -1502002290,\n            bd[aI >> 2] = 1236535329,\n            bd[aT >> 2] = -165796510,\n            bd[bX >> 2] = -1069501632,\n            bd[aR >> 2] = 643717713,\n            bd[bv >> 2] = -373897302,\n            bd[a7 >> 2] = -701558691,\n            bd[bU >> 2] = 38016083,\n            bd[a2 >> 2] = -660478335,\n            bd[bR >> 2] = -405537848,\n            bd[bD >> 2] = 568446438,\n            bd[bu >> 2] = -1019803690,\n            bd[bk >> 2] = -187363961,\n            bd[bW >> 2] = 1163531501,\n            bd[bI >> 2] = -1444681467,\n            bd[bQ >> 2] = -51403784,\n            bd[br >> 2] = 1735328473,\n            bd[bP >> 2] = -1926607734,\n            bd[bO >> 2] = -378558,\n            bd[bL >> 2] = -2022574463,\n            bd[bH >> 2] = 1839030562,\n            bd[bG >> 2] = -35309556,\n            bd[bF >> 2] = -1530992060,\n            bd[bB >> 2] = 1272893353,\n            bd[bz >> 2] = -155497632,\n            bd[by >> 2] = -1094730640,\n            bd[bx >> 2] = 681279174,\n            bd[bq >> 2] = -358537222,\n            bd[bp >> 2] = -722521979,\n            bd[bo >> 2] = 76029189,\n            bd[bn >> 2] = -640364487,\n            bd[ca >> 2] = -421815835,\n            bd[af >> 2] = 530742520,\n            bd[aQ >> 2] = -995338651,\n            bd[aX >> 2] = -198630844,\n            bd[bJ >> 2] = 1126891415,\n            bd[b0 >> 2] = -1416354905,\n            bd[a5 >> 2] = -57434055,\n            bd[b8 >> 2] = 1700485571,\n            bd[cp >> 2] = -1894986606,\n            bd[ci >> 2] = -1051523,\n            bd[bf >> 2] = -2054922799,\n            bd[bt >> 2] = 1873313359,\n            bd[aj >> 2] = -30611744,\n            bd[cm >> 2] = -1560198380,\n            bd[aw >> 2] = 1309151649,\n            bd[ap >> 2] = -145523070,\n            bd[b5 >> 2] = -1120210379,\n            bd[aD >> 2] = 718787259,\n            bd[cs >> 2] = -343485551,\n            bM = a6,\n            b1 = b6,\n            bV = cn,\n            a8 = ak,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            a1 = 74,\n            am = 0,\n            aq = 1732584193,\n            b2 = -271733879,\n            bC = -1732584194,\n            ay = 271733878,\n            aY = 1732584193,\n            cq = 0,\n            ct = 0,\n            ad = 0,\n            bY = 1,\n            a6 = bM,\n            b6 = b1,\n            cn = bV,\n            ak = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al;\n            continue ba;\n        case 77:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 75,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 75:\n            am = 0 | bd[ch + (ct << 2) >> 2],\n            cf = -1 & ~(1 | ~(((1 ^ am) & am) - (0 - aY))),\n            aE = -1 & ~(-2 | ~am),\n            bg = ~cf,\n            bT = ~aE,\n            cn = 268273122,\n            cn = ((-268273123 & bg | cf & cn) ^ (-268273123 & bT | aE & cn) | ~(bg | bT) & (-268273123 | cn)) - 1134317627 + ((-2 ^ aY) & aY) + 1134317627 | 0,\n            bT = -1 & ~(1 | ~(cn + 796911875 + (-1 & ~(1 | ~ak)) + -796911875)),\n            bg = (-2 ^ ak) & ak,\n            aE = ~bT,\n            cf = ~bg,\n            bl = 234558881,\n            am = am - (0 - aY) | 0,\n            aG = a6,\n            au = b6,\n            ab = ak,\n            bN = bY,\n            ag = aM,\n            aS = bh,\n            a0 = bZ,\n            bM = az,\n            b1 = bK,\n            bV = b3,\n            a8 = ad,\n            cb = ct,\n            cr = cq,\n            ck = aY,\n            bi = bC,\n            bw = b2,\n            al = b2,\n            aq = ay,\n            a1 = 73,\n            am = 506753693 + ((-234558882 & aE | bT & bl) ^ (-234558882 & cf | bg & bl) | ~(aE | cf) & (-234558882 | bl)) + ((-2 ^ am) & am) - 506753693 | 0,\n            a6 = aG,\n            b6 = au,\n            ak = ab,\n            bY = bN,\n            aM = ag,\n            bh = aS,\n            bZ = a0,\n            az = bM,\n            bK = b1,\n            b3 = bV,\n            ad = a8,\n            ct = cb,\n            cq = cr,\n            aY = ck,\n            ay = bi,\n            bC = bw,\n            b2 = al;\n            continue ba;\n        case 74:\n            bl = a6,\n            b6 = cq,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 72,\n            cq = 0 - (0 - cq - 1) | 0,\n            a6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 73:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | (0 | ct) % 4) < 2 ? 71 : 69,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 72:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 0 == (0 | bj[ba + b6 >> 0]) ? 66 : 68,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 71:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 67,\n            bY = 4,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 69:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 67,\n            bY = 2,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 68:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 74,\n            ad = 0 - (0 - ad - 1) | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 67:\n            aG = 0 - (0 - (7 * ((0 | ct) % 4 | 0) | 0) + (0 - bY)) | 0,\n            cf = am << aG,\n            bl = am >>> (-117621897 - aG + 117621929 | 0),\n            aE = ~bl,\n            bg = ~cf,\n            aY = -1172163970,\n            aY = (1172163969 & aE | bl & aY) ^ (1172163969 & bg | cf & aY) | ~(aE | bg) & (1172163969 | aY),\n            bg = -1 & ~(1 | ~(0 - (0 - aY + (0 - (-1 & ~(1 | ~bC)))))),\n            aE = (-2 ^ bC) & bC,\n            cf = ~bg,\n            bl = ~aE,\n            b2 = 861084162,\n            au = a6,\n            ab = b6,\n            bN = cn,\n            ag = ak,\n            aS = aM,\n            a0 = bh,\n            bM = bZ,\n            b1 = az,\n            bV = bK,\n            a8 = b3,\n            cb = ad,\n            cr = cq,\n            ck = ay,\n            bi = bC,\n            bw = aq,\n            al = am,\n            a1 = 97,\n            b2 = 1763856666 + ((-861084163 & cf | bg & b2) ^ (-861084163 & bl | aE & b2) | ~(cf | bl) & (-861084163 | b2)) + ((-2 ^ aY) & aY) - 1763856666 | 0,\n            ct = ct + 1402583234 + 1 - 1402583234 | 0,\n            bY = aG,\n            a6 = au,\n            b6 = ab,\n            cn = bN,\n            ak = ag,\n            aM = aS,\n            bh = a0,\n            bZ = bM,\n            az = b1,\n            bK = bV,\n            b3 = a8,\n            ad = cb,\n            cq = cr,\n            ay = ck,\n            bC = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 66:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 64,\n            bh = ad >> 2,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 64:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | ad) < 6 ? 62 : 60,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 63:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | ct) < 64 ? 59 : 21,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 60:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 58,\n            ak = 0 - (0 - bh - 1) | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 59:\n            aE = 0 | ~ay | 0 & ay,\n            aE = b2 & aE | b2 ^ aE,\n            aE &= aE ^ ~(0 | ~bC | 0 & bC),\n            ak = -659082405,\n            ak = -1 & ~(~(-1 & ~(~bC | ~((659082404 & ~b2 | b2 & ak) ^ (0 | -1 & ak)))) | ~ay),\n            ak = aE & ak | aE ^ ak,\n            aE = 794469430 + ((1 ^ aq) & aq) + ak - 794469430 | 0,\n            aE &= 1 ^ aE,\n            cf = -1 & ~(-2 | ~aq),\n            bl = ~aE,\n            aG = ~cf,\n            cn = 797466865,\n            au = a6,\n            ab = b6,\n            bN = bY,\n            ag = aM,\n            aS = bh,\n            a0 = bZ,\n            bM = az,\n            b1 = bK,\n            bV = b3,\n            a8 = ad,\n            cb = ct,\n            cr = cq,\n            ck = ay,\n            bi = bC,\n            bw = b2,\n            al = aq,\n            a1 = 57,\n            am = 0 - (0 - ad + 1) >> 2,\n            aY = ak,\n            ak = 394913534 + ((-797466866 & bl | aE & cn) ^ (-797466866 & aG | cf & cn) | ~(bl | aG) & (-797466866 | cn)) + (-1 & ~(-2 | ~ak)) - 394913534 | 0,\n            cn = ((7 * ct | 0) % 16 | 0) - (0 - cq) | 0,\n            a6 = au,\n            b6 = ab,\n            bY = bN,\n            aM = ag,\n            bh = aS,\n            bZ = a0,\n            az = bM,\n            bK = b1,\n            b3 = bV,\n            ad = a8,\n            ct = cb,\n            cq = cr,\n            ay = ck,\n            bC = bi,\n            b2 = bw,\n            aq = al;\n            continue ba;\n        case 58:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | ak) < 33 ? 56 : 54,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 57:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (ad - 817781417 + 32 + 817781417 >> 2 | 0) ? 33 : 55,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 56:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 54,\n            ak = 33,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 55:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (0 | am) ? 53 : 47,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 54:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | ak) > (248548091 + (ad - -32 >> 2) + 8 - 248548091 | 0) ? 50 : 52,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 53:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | bh) > 0 ? 51 : 49,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 52:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 50,\n            ak = 0 - (0 - (ad - 721543188 + 32 + 721543188 >> 2) - 8) | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 51:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0 | bd[aB + (cn - 845217744 - am + 845217744 << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 50:\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 46,\n            cq = 0,\n            a6 = 0 | cmd5xt(ak << 2, bd, av),\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 49:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0 | bd[aB + (cn - 1 + 1839362061 - am - 1839362061 << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 161:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            aY = bC,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 157,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 47:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) == (0 | am) ? 45 : 39,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 160:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) < 10 ? 158 : 156,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 46:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cq) < (0 | ak) ? 42 : 40,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 159:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            aY = ay,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 157,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 45:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | bh) > 0 ? 43 : 39,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 158:\n            cf = a6,\n            bl = b6,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 154,\n            cn = cn - 1241365298 + 32 + 1241365298 | 0,\n            a6 = cf,\n            b6 = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 157:\n            bg = -1 & ~(-29 | ~(ct << 2)),\n            aE = -419482006,\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 155,\n            aY = -1 & ~(-16 | ~(aY >> ((419482005 & ~bg | bg & aE) ^ (419482001 | 4 & aE)))),\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 43:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0 | bd[aB >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 156:\n            cf = a6,\n            bl = b6,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 154,\n            cn = cn - -72 | 0,\n            a6 = cf,\n            b6 = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 42:\n            bd[a6 + (cq << 2) >> 2] = 0,\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 46,\n            cq = cq - 1417402377 + 1 + 1417402377 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 155:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | aY) < 10 ? 153 : 151,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 154:\n            cf = ct - (0 - bh) | 0,\n            bl = cn + -735801710 + 16 + 735801710 << (((0 | cf) % 4 | 0) << 3),\n            cf = aB + (cf - (0 - (cq << 2)) >> 2 << 2) | 0,\n            aG = 0 | bd[cf >> 2],\n            bd[cf >> 2] = aG & bl | aG ^ bl,\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 4,\n            ct = ct + 744675608 + 1 - 744675608 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 40:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 36,\n            cq = 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 153:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 149,\n            aY = aY - 1763841430 + 48 + 1763841430 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 39:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (am + -27115808 + 1 + 27115808 | 0) ? 37 : 35,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 152:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 12,\n            cq = cq + 1905239980 + 1 - 1905239980 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 151:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 149,\n            aY = aY + 522724937 + 87 - 522724937 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 37:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 150:\n            ab = 128 << (((0 | bh) % 4 | 0) << 3),\n            cf = aB + ((cq << 2) - 395027463 + bh + 395027463 >> 2 << 2) | 0,\n            bN = 0 | bd[cf >> 2],\n            au = ~bN,\n            aG = ~ab,\n            bl = -503206211,\n            bd[cf >> 2] = (503206210 & au | bN & bl) ^ (503206210 & aG | ab & bl) | ~(au | aG) & (503206210 | bl),\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 146,\n            cq = 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 36:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cq) < (0 | ad) ? 32 : 30,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 149:\n            bj[aM + ct >> 0] = aY,\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 15,\n            ct = ct + -2060210203 + 1 + 2060210203 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 35:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 147:\n            bj[aM + 32 >> 0] = 0,\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 145,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 33:\n            a1 = ad + 1999768042 + 40 + -1999768042 >> 6 << 4,\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) == (14 & a1 | 14 ^ a1 | 0) ? 31 : 29,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 146:\n            aZ = ad - -40 >> 6 << 4,\n            bT = ~aZ,\n            bg = -15,\n            a1 = -1388890712,\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cq) < ((1388890711 & bT | aZ & a1) ^ (1388890711 & bg | 14 & a1) | ~(bT | bg) & (1388890711 | a1) | 0) ? 143 : 19,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 32:\n            aG = bj[ba + cq >> 0] << (((0 | cq) % 4 | 0) << 3),\n            cf = a6 + (cq >> 2 << 2) | 0,\n            bl = 0 | bd[cf >> 2],\n            bd[cf >> 2] = aG & bl | aG ^ bl,\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 36,\n            cq = cq - -1 | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 31:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0 - (0 - (ad << 3) - 256) | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 30:\n            bh = 0 - (0 - ad - 32) | 0,\n            a1 = 128 << (((0 | bh) % 4 | 0) << 3),\n            bh = a6 + (bh >> 2 << 2) | 0,\n            aZ = 0 | bd[bh >> 2],\n            bd[bh >> 2] = aZ & a1 | aZ ^ a1,\n            bh = (0 | ad) % 4 | 0,\n            a1 = aB,\n            aZ = a1 + 36 | 0;\n            do {\n                bd[a1 >> 2] = 0,\n                a1 = a1 + 4 | 0\n            } while ((0 | a1) < (0 | aZ));cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 28,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 143:\n            ab = a6,\n            bN = b6,\n            ag = cn,\n            aS = ak,\n            a0 = bY,\n            bM = aM,\n            b1 = bh,\n            bZ = ay,\n            az = bC,\n            bK = b2,\n            b3 = aq,\n            bV = ad,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 141,\n            ct = 0,\n            a6 = ab,\n            b6 = bN,\n            cn = ag,\n            ak = aS,\n            bY = a0,\n            aM = bM,\n            bh = b1,\n            ad = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 29:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (0 - (0 - am - 1) | 0) ? 27 : 25,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 28:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | bh) > 0 ? 26 : 16,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 141:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | ct) < 16 ? 139 : 119,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 27:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 26:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 22,\n            cq = ad + (0 - bh) | 0,\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 139:\n            aG = (bC ^ ~b2) & bC,\n            cn = 529461707,\n            cn = (-529461708 & ~ay | ay & cn) ^ (-529461708 & ~b2 | b2 & cn),\n            cn &= cn ^ ~(0 | ~b2 | 0 & b2),\n            ak = -1514409255,\n            ak = (1514409254 & ~cn | cn & ak) ^ (1514409254 & ~aG | aG & ak),\n            aG = 0 - (0 - (-1 & ~(1 | ~aq)) + (0 - ak)) | 0,\n            aG &= 1 ^ aG,\n            cn = -1 & ~(-2 | ~aq),\n            au = a6,\n            ab = b6,\n            bN = bY,\n            ag = aM,\n            aS = bh,\n            a0 = bZ,\n            bM = az,\n            b1 = bK,\n            bV = b3,\n            a8 = ad,\n            cb = ct,\n            cr = cq,\n            ck = ay,\n            bi = bC,\n            bw = b2,\n            al = aq,\n            a1 = 138,\n            am = ad - 1332493879 - 1 + 1332493879 >> 2,\n            aY = ak,\n            ak = 1330564622 + (aG & cn | aG ^ cn) + (-1 & ~(-2 | ~ak)) - 1330564622 | 0,\n            cn = ((0 | ct) % 16 | 0) - (0 - cq) | 0,\n            a6 = au,\n            b6 = ab,\n            bY = bN,\n            aM = ag,\n            bh = aS,\n            bZ = a0,\n            az = bM,\n            bK = b1,\n            b3 = bV,\n            ad = a8,\n            ct = cb,\n            cq = cr,\n            ay = ck,\n            bC = bi,\n            b2 = bw,\n            aq = al;\n            continue ba;\n        case 25:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 23,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 138:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (ad - -32 >> 2 | 0) ? 126 : 137,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 137:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cn) > (0 | am) ? 136 : 133,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 23:\n            am = 0 | bd[ch + (ct << 2) >> 2],\n            bY = 729837134 + (-1 & ~(1 | ~am)) + aY + -729837134 | 0,\n            bY &= 1 ^ bY,\n            cn = (-2 ^ am) & am,\n            cn = (bY & cn | bY ^ cn) - 1663655995 + (-1 & ~(-2 | ~aY)) + 1663655995 | 0,\n            bY = cn + -2098496209 + ((1 ^ ak) & ak) + 2098496209 | 0,\n            bY &= 1 ^ bY,\n            aG = (-2 ^ ak) & ak,\n            am = (bY & aG | bY ^ aG) - (0 - (-1 & ~(-2 | ~(0 - (0 - am + (0 - aY)))))) | 0,\n            aG = (0 | ct) % 4 | 0,\n            aG = (aG << 2) - 23571533 + 601048392 + 23571533 - (0 - ((0 | bm(0 - (0 - aG + 1) | 0, aG)) / 2 | 0)) | 0,\n            bY = aG - 601048386 | 0,\n            au = am << bY,\n            aG = am >>> (0 - aG + 601048418 | 0),\n            cf = ~au,\n            bl = ~aG,\n            bN = 1777071146,\n            bN = (-1777071147 & cf | au & bN) ^ (-1777071147 & bl | aG & bN) | ~(cf | bl) & (-1777071147 | bN),\n            bl = (-2 ^ b2) & b2,\n            cf = (-1 & ~(1 | ~(b2 + -1742022525 + 1578590490 + 1742022525))) - 702715349 + bN + 702715349 | 0,\n            cf &= 1 ^ cf,\n            aG = ~cf,\n            au = ~bl,\n            ab = -1317685326,\n            aZ = (-2 ^ bN) & bN,\n            bT = ~aZ,\n            bg = 1578590489,\n            aE = -225229395,\n            ag = a6,\n            aS = b6,\n            a0 = ak,\n            bM = aM,\n            b1 = bh,\n            bV = bZ,\n            a8 = az,\n            cb = bK,\n            cr = b3,\n            ck = ad,\n            bi = cq,\n            bw = bC,\n            al = b2,\n            aq = ay,\n            a1 = 63,\n            b2 = 0 - (0 - ((225229394 & bT | aZ & aE) ^ (225229394 & bg | -1578590490 & aE) | ~(bT | bg) & (225229394 | aE)) + (0 - ((1317685325 & aG | cf & ab) ^ (1317685325 & au | bl & ab) | ~(aG | au) & (1317685325 | ab)))) | 0,\n            aY = bN,\n            ct = ct + 1021816955 + 1 - 1021816955 | 0,\n            a6 = ag,\n            b6 = aS,\n            ak = a0,\n            aM = bM,\n            bh = b1,\n            bZ = bV,\n            az = a8,\n            bK = cb,\n            b3 = cr,\n            ad = ck,\n            cq = bi,\n            ay = bw,\n            bC = al;\n            continue ba;\n        case 136:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | bh) > 0 ? 135 : 134,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 22:\n            aE = a6,\n            cf = b6,\n            bl = cn,\n            aG = ak,\n            au = bY,\n            ab = aM,\n            bN = bh,\n            ag = bZ,\n            aS = az,\n            a0 = bK,\n            bM = b3,\n            b1 = ad,\n            bV = ct,\n            a8 = cq,\n            cb = aY,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = (0 | cq) < (0 | ad) ? 18 : 16,\n            a6 = aE,\n            b6 = cf,\n            cn = bl,\n            ak = aG,\n            bY = au,\n            aM = ab,\n            bh = bN,\n            bZ = ag,\n            az = aS,\n            bK = a0,\n            b3 = bM,\n            ad = b1,\n            ct = bV,\n            cq = a8,\n            aY = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 135:\n            cf = a6,\n            bl = b6,\n            aG = cn,\n            au = ak,\n            ab = bY,\n            bN = aM,\n            ag = bh,\n            aS = bZ,\n            a0 = az,\n            bM = bK,\n            b1 = b3,\n            bV = ad,\n            a8 = ct,\n            cb = cq,\n            cr = ay,\n            ck = bC,\n            bi = b2,\n            bw = aq,\n            al = am,\n            a1 = 121,\n            aY = 0 | bd[aB + (cn + (0 - am) << 2) >> 2],\n            a6 = cf,\n            b6 = bl,\n            cn = aG,\n            ak = au,\n            bY = ab,\n            aM = bN,\n            bh = ag,\n            bZ = aS,\n            az = a0,\n            bK = bM,\n            b3 = b1,\n            ad = bV,\n            ct = a8,\n            cq = cb,\n            ay = cr,\n            bC = ck,\n            b2 = bi,\n            aq = bw,\n            am = al;\n            continue ba;\n        case 21:\n            ar = (-2 ^ b3) & b3,\n            bE = aq - -33242356 + 252947873 + ((1 ^ b3) & b3) - 252947873 | 0,\n            bE &= 1 ^ bE,\n            ax = ~bE,\n            co = ~ar,\n            aZ = 380726746,\n            cg = -1 & ~(-2 | ~aq),\n            aa = ~cg,\n            aF = 33242355,\n            b7 = 306070461,\n            cf = ((1 ^ az) & az) - 1609523247 + bC + 1609523247 | 0,\n            cf &= 1 ^ cf,\n            bl = -1 & ~(-2 | ~az),\n            aG = -1 & ~(1 | ~(((1 ^ bZ) & bZ) - 1778799498 + ay + 1778799498)),\n            au = (-2 ^ bZ) & bZ,\n            bg = b2 - -924935704 - 2103109303 + ((1 ^ bK) & bK) + 2103109303 | 0,\n            bg &= 1 ^ bg,\n            aE = (-2 ^ bK) & bK,\n            bT = (-2 ^ b2) & b2,\n            ab = a6,\n            bN = b6,\n            ag = cn,\n            aS = ak,\n            a0 = bY,\n            bM = aM,\n            b1 = bh,\n            bV = bZ,\n            a8 = az,\n            cb = bK,\n            cr = b3,\n            ck = ad,\n            bi = ct,\n            bw = aY,\n            al = am,\n            a1 = 146,\n            aq = ((-306070462 & aa | cg & b7) ^ (-306070462 & aF | -33242356 & b7) | ~(aa | aF) & (-306070462 | b7)) - (0 - ((-380726747 & ax | bE & aZ) ^ (-380726747 & co | ar & aZ) | ~(ax | co) & (-380726747 | aZ))) | 0,\n            b2 = (-924935704 & bT | -924935704 ^ bT) - 937268693 + (bg & aE | bg ^ aE) + 937268693 | 0,\n            bC = 0 - (0 - (cf & bl | cf ^ bl) + (0 - (-1 & ~(-2 | ~bC)))) | 0,\n            ay = (aG & au | aG ^ au) - (0 - ((-2 ^ ay) & ay)) | 0,\n            cq = 0 - (0 - cq - 16) | 0,\n            a6 = ab,\n            b6 = bN,\n            cn = ag,\n            ak = aS,\n            bY = a0,\n            aM = bM,\n            bh = b1,\n            bZ = bV,\n            az = a8,\n            bK = cb,\n            b3 = cr,\n            ad = ck,\n            ct = bi,\n            aY = bw,\n            am = al;\n            continue ba;\n        case 134:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 0 | bd[aB + (cn - 2095981013 - 1 + 2095981013 - 1028988577 - am + 1028988577 << 2) >> 2],\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 133:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cn) == (0 | am) ? 132 : 129,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 19:\n            bM = a6,\n            b1 = b6,\n            bV = cn,\n            a8 = ak,\n            cb = bY,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 15,\n            ct = 0,\n            aM = 0 | cmd5xt(33, bd, av),\n            a6 = bM,\n            b6 = b1,\n            cn = bV,\n            ak = a8,\n            bY = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 132:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | bh) > 0 ? 131 : 129,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 18:\n            bM = bj[ba + cq >> 0] << (((0 | cq) % 4 | 0) << 3),\n            a0 = 0 | bd[aB >> 2],\n            bd[aB >> 2] = bM & a0 | bM ^ a0,\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 22,\n            cq = cq + -1916722598 + 1 + 1916722598 | 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 131:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 0 | bd[aB >> 2],\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 16:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 12,\n            cq = 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 129:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cn) > (am + 1849332518 + 1 - 1849332518 | 0) ? 128 : 127,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 15:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | ct) < 32 ? 11 : 147,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 128:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 127:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 126:\n            a1 = ad - -40 >> 6 << 4,\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cn) == (14 & a1 | 14 ^ a1 | 0) ? 125 : 124,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 12:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cq) < 8 ? 8 : 150,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 125:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 961017688 + (ad << 3) + 256 - 961017688 | 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 11:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 9,\n            cq = (0 | ct) / 8 | 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 124:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cn) > (am + -1509393712 + 1 + 1509393712 | 0) ? 123 : 122,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 123:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 9:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 0 == (0 | cq) ? 7 : 5,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 122:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 121,\n            aY = 0 | bd[a6 + (cn << 2) >> 2],\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 8:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 4,\n            ct = 0,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 121:\n            cn = 0 | bd[ch + (ct << 2) >> 2],\n            am = -1 & ~(-2 | ~cn),\n            cn = -1 & ~(1 | ~(0 - (0 - (0 - (0 - aY + 96809952)) + (0 - (-1 & ~(1 | ~cn)))))),\n            bY = (-2 ^ aY) & aY,\n            bV = ~bY,\n            cr = 524507311,\n            a8 = 205119056,\n            am = 0 - (0 - ((-205119057 & bV | bY & a8) ^ (-205119057 & cr | -524507312 & a8) | ~(bV | cr) & (-205119057 | a8)) + (0 - (cn & am | cn ^ am))) | 0,\n            cn = 0 - (0 - am - 621317264) | 0,\n            a8 = (-2 ^ ak) & ak,\n            cr = -1 & ~(1 | ~(cn - (0 - ((1 ^ ak) & ak)))),\n            bV = ~cr,\n            bY = ~a8,\n            cb = 1186168602,\n            am = -1 & ~(-2 | ~(1196940885 - am - 1818258150)),\n            am = ((-1186168603 & bV | cr & cb) ^ (-1186168603 & bY | a8 & cb) | ~(bV | bY) & (-1186168603 | cb)) - 1517567764 + (1 & ~am | -2 & am) + 1517567764 | 0,\n            cb = 5 * ((0 | ct) % 4 | 0) | 0,\n            bY = cb - -7 | 0,\n            bV = am << bY,\n            cb = am >>> (0 - cb + 25 | 0),\n            cb = bV & cb | bV ^ cb,\n            bV = -1 & ~(1 | ~(cb + 1491303093 + ((1 ^ b2) & b2) + -1491303093)),\n            a8 = (-2 ^ b2) & b2,\n            cr = a6,\n            ck = b6,\n            bi = ak,\n            bw = aM,\n            al = bh,\n            co = bZ,\n            ax = az,\n            ar = bK,\n            bE = b3,\n            b7 = ad,\n            aF = cq,\n            aa = bC,\n            cg = b2,\n            aq = ay,\n            a1 = 141,\n            b2 = (bV & a8 | bV ^ a8) - (0 - ((-2 ^ cb) & cb)) | 0,\n            aY = cb,\n            ct = ct - -1 | 0,\n            a6 = cr,\n            b6 = ck,\n            ak = bi,\n            aM = bw,\n            bh = al,\n            bZ = co,\n            az = ax,\n            bK = ar,\n            b3 = bE,\n            ad = b7,\n            cq = aF,\n            ay = aa,\n            bC = cg;\n            continue ba;\n        case 7:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            aY = aq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 157,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 119:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | ct) < 32 ? 117 : 97,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 5:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 1 == (0 | cq) ? 3 : 1,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 4:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | ct) < 4 ? 0 : 152,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 117:\n            ak = 0 | ~ay | 0 & ay,\n            aS = 223327204 & ~b2 | -223327205 & b2,\n            b1 = ~aS,\n            cn = ~ak,\n            bM = 381686884,\n            bM = (-381686885 & b1 | aS & bM) ^ (-381686885 & cn | ak & bM) | ~(b1 | cn) & (-381686885 | bM),\n            cn = -2088055562,\n            cn = (2088055561 & ~bC | bC & cn) ^ (1882193929 | 223327204 & cn),\n            b1 = ~ay,\n            aS = ~cn,\n            a0 = 1424487793,\n            a0 = (-1424487794 & b1 | ay & a0) ^ (-1424487794 & aS | cn & a0) | ~(b1 | aS) & (-1424487794 | a0),\n            bM &= -223327205 ^ bM,\n            aS = -1 & ~(223327204 | ~b2),\n            aS &= aS ^ ~ay,\n            a0 &= -223327205 ^ a0,\n            ak &= 223327204 ^ ak,\n            ak &= ak ^ ~(bC & ~ay | ay & ~bC),\n            aS = bM & aS | bM ^ aS,\n            a0 = ak & a0 | ak ^ a0,\n            ak = -539859516,\n            ak = (539859515 & ~a0 | a0 & ak) ^ (539859515 & ~aS | aS & ak),\n            aS = -1 & ~(1 | ~((-1 & ~(1 | ~aq)) - (0 - ak))),\n            a0 = (-2 ^ aq) & aq,\n            bM = ~aS,\n            b1 = ~a0,\n            cn = 89952540,\n            bV = a6,\n            a8 = b6,\n            cb = bY,\n            cr = aM,\n            ck = bh,\n            bi = bZ,\n            bw = az,\n            al = bK,\n            co = b3,\n            ax = ad,\n            ar = ct,\n            bE = cq,\n            b7 = ay,\n            aF = bC,\n            aa = b2,\n            cg = aq,\n            a1 = 116,\n            am = 0 - (0 - ad + 1) >> 2,\n            aY = ak,\n            ak = 1116549971 + ((-89952541 & bM | aS & cn) ^ (-89952541 & b1 | a0 & cn) | ~(bM | b1) & (-89952541 | cn)) + (-1 & ~(-2 | ~ak)) - 1116549971 | 0,\n            cn = 0 - (0 - ((106029065 + (5 * ct | 0) + 1 - 106029065 | 0) % 16 | 0) + (0 - cq)) | 0,\n            a6 = bV,\n            b6 = a8,\n            bY = cb,\n            aM = cr,\n            bh = ck,\n            bZ = bi,\n            az = bw,\n            bK = al,\n            b3 = co,\n            ad = ax,\n            ct = ar,\n            cq = bE,\n            ay = b7,\n            bC = aF,\n            b2 = aa,\n            aq = cg;\n            continue ba;\n        case 3:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            aY = b2,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 157,\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 116:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cn) > (ad + 77471208 + 32 - 77471208 >> 2 | 0) ? 104 : 115,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 115:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | cn) > (0 | am) ? 114 : 111,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 1:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 2 == (0 | cq) ? 161 : 159,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 114:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = (0 | bh) > 0 ? 113 : 112,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 0:\n            a0 = a6,\n            bM = b6,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 160,\n            cn = (426025673 + (5 * ((27 * cq | 0) - (0 - (62 * ct | 0)) - (0 - (0 | bm(0 - (0 - (84 * cq | 0) - 21) | 0, 1910606658 + (28 * ct | 0) + 97 - 1910606658 | 0))) | 0) | 0) + 615 - 426025673 | 0) % 32 | 0,\n            a6 = a0,\n            b6 = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        case 113:\n            a0 = a6,\n            bM = b6,\n            b1 = cn,\n            bV = ak,\n            a8 = bY,\n            cb = aM,\n            cr = bh,\n            ck = bZ,\n            bi = az,\n            bw = bK,\n            al = b3,\n            co = ad,\n            ax = ct,\n            ar = cq,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a1 = 99,\n            aY = 0 | bd[aB + (cn + 1501901147 - am - 1501901147 << 2) >> 2],\n            a6 = a0,\n            b6 = bM,\n            cn = b1,\n            ak = bV,\n            bY = a8,\n            aM = cb,\n            bh = cr,\n            bZ = ck,\n            az = bi,\n            bK = bw,\n            b3 = al,\n            ad = co,\n            ct = ax,\n            cq = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba;\n        default:\n            aS = a6,\n            a0 = b6,\n            bM = cn,\n            b1 = ak,\n            bV = bY,\n            a8 = aM,\n            cb = bh,\n            cr = bZ,\n            ck = az,\n            bi = bK,\n            bw = b3,\n            al = ad,\n            co = ct,\n            ax = cq,\n            ar = aY,\n            bE = ay,\n            b7 = bC,\n            aF = b2,\n            aa = aq,\n            cg = am,\n            a6 = aS,\n            b6 = a0,\n            cn = bM,\n            ak = b1,\n            bY = bV,\n            aM = a8,\n            bh = cb,\n            bZ = cr,\n            az = ck,\n            bK = bi,\n            b3 = bw,\n            ad = al,\n            ct = co,\n            cq = ax,\n            aY = ar,\n            ay = bE,\n            bC = b7,\n            b2 = aF,\n            aq = aa,\n            am = cg;\n            continue ba\n        }\n    }\n    if (136 == (0 | an)) {\n        a3 = b9;\n        for (var aC = 0, cl = 0; ; ) {\n            var ao = ah[aM + cl >> 0];\n            if (aC |= ao,\n            0 == ao) {\n                break\n            }\n            cl++\n        }\n        var at = \"\";\n        if (aC < 128) {\n            for (var b4; cl > 0; ) {\n                b4 = String.fromCharCode.apply(String, ah.subarray(aM, aM + Math.min(cl, 1024))),\n                at = at ? at + b4 : b4,\n                aM += 1024,\n                cl -= 1024\n            }\n            return at\n        }\n    }\n    return a3 = b9,\n    0\n}\nfunction cmd5xt(au, aw, ap) {\n    au |= 0;\n    var ak = 0\n      , ay = 0\n      , ae = 0\n      , aj = 0\n      , af = 0\n      , ag = 0\n      , at = 0\n      , ad = 0\n      , ax = 0\n      , an = 0\n      , am = 0\n      , av = 0\n      , ab = 0\n      , aq = 0\n      , al = 0\n      , ac = 0\n      , aa = 0\n      , Y = 0\n      , ai = 0\n      , W = 0\n      , ah = 0\n      , K = 0\n      , ar = 0\n      , T = 0\n      , ao = 0\n      , Q = 0\n      , L = 0\n      , J = 0\n      , G = 0\n      , az = 0\n      , V = 0\n      , N = 0\n      , P = 0\n      , H = 0\n      , X = 0\n      , O = 0;\n    do {\n        if (au >>> 0 < 245) {\n            if (ab = au >>> 0 < 11 ? 16 : au + 11 & -8,\n            au = ab >>> 3,\n            ad = 0 | aw[48],\n            3 & (ak = ad >>> au) | 0) {\n                ak = (1 & ak ^ 1) + au | 0,\n                ay = 232 + (ak << 1 << 2) | 0,\n                ae = ay + 8 | 0,\n                aj = 0 | aw[ae >> 2],\n                af = aj + 8 | 0,\n                ag = 0 | aw[af >> 2];\n                do {\n                    if ((0 | ay) != (0 | ag)) {\n                        if (au = ag + 12 | 0,\n                        (0 | aw[au >> 2]) == (0 | aj)) {\n                            aw[au >> 2] = ay,\n                            aw[ae >> 2] = ag;\n                            break\n                        }\n                    } else {\n                        aw[48] = ad & ~(1 << ak)\n                    }\n                } while (0);return O = ak << 3,\n                aw[aj + 4 >> 2] = 3 | O,\n                O = aj + O + 4 | 0,\n                aw[O >> 2] = 1 | aw[O >> 2],\n                0 | (O = af)\n            }\n            if (ag = 0 | aw[50],\n            ab >>> 0 > ag >>> 0) {\n                if (0 | ak) {\n                    ay = 2 << au,\n                    ay = ak << au & (ay | 0 - ay),\n                    ay = (ay & 0 - ay) - 1 | 0,\n                    at = ay >>> 12 & 16,\n                    ay >>>= at,\n                    aj = ay >>> 5 & 8,\n                    ay >>>= aj,\n                    af = ay >>> 2 & 4,\n                    ay >>>= af,\n                    ae = ay >>> 1 & 2,\n                    ay >>>= ae,\n                    ak = ay >>> 1 & 1,\n                    ak = (aj | at | af | ae | ak) + (ay >>> ak) | 0,\n                    ay = 232 + (ak << 1 << 2) | 0,\n                    ae = ay + 8 | 0,\n                    af = 0 | aw[ae >> 2],\n                    at = af + 8 | 0,\n                    aj = 0 | aw[at >> 2];\n                    do {\n                        if ((0 | ay) != (0 | aj)) {\n                            if (au = aj + 12 | 0,\n                            (0 | aw[au >> 2]) == (0 | af)) {\n                                aw[au >> 2] = ay,\n                                aw[ae >> 2] = aj,\n                                ax = 0 | aw[50];\n                                break\n                            }\n                        } else {\n                            aw[48] = ad & ~(1 << ak),\n                            ax = ag\n                        }\n                    } while (0);return ag = (ak << 3) - ab | 0,\n                    aw[af + 4 >> 2] = 3 | ab,\n                    ae = af + ab | 0,\n                    aw[ae + 4 >> 2] = 1 | ag,\n                    aw[ae + ag >> 2] = ag,\n                    0 | ax && (aj = 0 | aw[53],\n                    ak = ax >>> 3,\n                    ay = 232 + (ak << 1 << 2) | 0,\n                    au = 0 | aw[48],\n                    ak = 1 << ak,\n                    au & ak ? (au = ay + 8 | 0,\n                    (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (an = au,\n                    am = ak)) : (aw[48] = au | ak,\n                    an = ay + 8 | 0,\n                    am = ay),\n                    aw[an >> 2] = aj,\n                    aw[am + 12 >> 2] = aj,\n                    aw[aj + 8 >> 2] = am,\n                    aw[aj + 12 >> 2] = ay),\n                    aw[50] = ag,\n                    aw[53] = ae,\n                    0 | (O = at)\n                }\n                if (au = 0 | aw[49]) {\n                    for (ay = (au & 0 - au) - 1 | 0,\n                    X = ay >>> 12 & 16,\n                    ay >>>= X,\n                    H = ay >>> 5 & 8,\n                    ay >>>= H,\n                    O = ay >>> 2 & 4,\n                    ay >>>= O,\n                    ak = ay >>> 1 & 2,\n                    ay >>>= ak,\n                    ae = ay >>> 1 & 1,\n                    ae = 0 | aw[496 + ((H | X | O | ak | ae) + (ay >>> ae) << 2) >> 2],\n                    ay = (-8 & aw[ae + 4 >> 2]) - ab | 0,\n                    ak = ae; ; ) {\n                        if (!(au = 0 | aw[ak + 16 >> 2]) && !(au = 0 | aw[ak + 20 >> 2])) {\n                            ad = ae;\n                            break\n                        }\n                        ak = (-8 & aw[au + 4 >> 2]) - ab | 0,\n                        O = ak >>> 0 < ay >>> 0,\n                        ay = O ? ak : ay,\n                        ak = au,\n                        ae = O ? au : ae\n                    }\n                    af = 0 | aw[52],\n                    at = ad + ab | 0,\n                    ag = 0 | aw[ad + 24 >> 2],\n                    ae = 0 | aw[ad + 12 >> 2];\n                    do {\n                        if ((0 | ae) == (0 | ad)) {\n                            if (ak = ad + 20 | 0,\n                            !((au = 0 | aw[ak >> 2]) || (ak = ad + 16 | 0,\n                            au = 0 | aw[ak >> 2]))) {\n                                av = 0;\n                                break\n                            }\n                            for (; ; ) {\n                                if (ae = au + 20 | 0,\n                                0 | (aj = 0 | aw[ae >> 2])) {\n                                    au = aj,\n                                    ak = ae\n                                } else {\n                                    if (ae = au + 16 | 0,\n                                    !(aj = 0 | aw[ae >> 2])) {\n                                        break\n                                    }\n                                    au = aj,\n                                    ak = ae\n                                }\n                            }\n                            if (!(ak >>> 0 < af >>> 0)) {\n                                aw[ak >> 2] = 0,\n                                av = au;\n                                break\n                            }\n                        } else {\n                            if (aj = 0 | aw[ad + 8 >> 2],\n                            au = aj + 12 | 0,\n                            ak = ae + 8 | 0,\n                            (0 | aw[ak >> 2]) == (0 | ad)) {\n                                aw[au >> 2] = ae,\n                                aw[ak >> 2] = aj,\n                                av = ae;\n                                break\n                            }\n                        }\n                    } while (0);do {\n                        if (0 | ag) {\n                            if (au = 0 | aw[ad + 28 >> 2],\n                            ak = 496 + (au << 2) | 0,\n                            (0 | ad) == (0 | aw[ak >> 2])) {\n                                if (aw[ak >> 2] = av,\n                                !av) {\n                                    aw[49] = aw[49] & ~(1 << au);\n                                    break\n                                }\n                            } else {\n                                if (au = ag + 16 | 0,\n                                (0 | aw[au >> 2]) == (0 | ad) ? aw[au >> 2] = av : aw[ag + 20 >> 2] = av,\n                                !av) {\n                                    break\n                                }\n                            }\n                            ak = 0 | aw[52],\n                            aw[av + 24 >> 2] = ag,\n                            au = 0 | aw[ad + 16 >> 2];\n                            do {\n                                if (0 | au && !(au >>> 0 < ak >>> 0)) {\n                                    aw[av + 16 >> 2] = au,\n                                    aw[au + 24 >> 2] = av;\n                                    break\n                                }\n                            } while (0);if (0 | (au = 0 | aw[ad + 20 >> 2]) && !(au >>> 0 < (0 | aw[52]) >>> 0)) {\n                                aw[av + 20 >> 2] = au,\n                                aw[au + 24 >> 2] = av;\n                                break\n                            }\n                        }\n                    } while (0);return ay >>> 0 < 16 ? (O = ay + ab | 0,\n                    aw[ad + 4 >> 2] = 3 | O,\n                    O = ad + O + 4 | 0,\n                    aw[O >> 2] = 1 | aw[O >> 2]) : (aw[ad + 4 >> 2] = 3 | ab,\n                    aw[at + 4 >> 2] = 1 | ay,\n                    aw[at + ay >> 2] = ay,\n                    au = 0 | aw[50],\n                    0 | au && (aj = 0 | aw[53],\n                    ak = au >>> 3,\n                    ae = 232 + (ak << 1 << 2) | 0,\n                    au = 0 | aw[48],\n                    ak = 1 << ak,\n                    au & ak ? (au = ae + 8 | 0,\n                    (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (aq = au,\n                    al = ak)) : (aw[48] = au | ak,\n                    aq = ae + 8 | 0,\n                    al = ae),\n                    aw[aq >> 2] = aj,\n                    aw[al + 12 >> 2] = aj,\n                    aw[aj + 8 >> 2] = al,\n                    aw[aj + 12 >> 2] = ae),\n                    aw[50] = ay,\n                    aw[53] = at),\n                    0 | (O = ad + 8 | 0)\n                }\n            }\n        } else {\n            if (au >>> 0 <= 4294967231) {\n                if (au = au + 11 | 0,\n                ab = -8 & au,\n                ad = 0 | aw[49]) {\n                    ay = 0 - ab | 0,\n                    au >>>= 8,\n                    au ? ab >>> 0 > 16777215 ? at = 31 : (al = (au + 1048320 | 0) >>> 16 & 8,\n                    G = au << al,\n                    aq = (G + 520192 | 0) >>> 16 & 4,\n                    G <<= aq,\n                    at = (G + 245760 | 0) >>> 16 & 2,\n                    at = 14 - (aq | al | at) + (G << at >>> 15) | 0,\n                    at = ab >>> (at + 7 | 0) & 1 | at << 1) : at = 0,\n                    ak = 0 | aw[496 + (at << 2) >> 2];\n                    au: do {\n                        if (ak) {\n                            for (aj = ay,\n                            au = 0,\n                            af = ab << (31 == (0 | at) ? 0 : 25 - (at >>> 1) | 0),\n                            ag = ak,\n                            ak = 0; ; ) {\n                                if (ae = -8 & aw[ag + 4 >> 2],\n                                (ay = ae - ab | 0) >>> 0 < aj >>> 0) {\n                                    if ((0 | ae) == (0 | ab)) {\n                                        au = ag,\n                                        ak = ag,\n                                        G = 90;\n                                        break au\n                                    }\n                                    ak = ag\n                                } else {\n                                    ay = aj\n                                }\n                                if (ae = 0 | aw[ag + 20 >> 2],\n                                ag = 0 | aw[ag + 16 + (af >>> 31 << 2) >> 2],\n                                au = 0 == (0 | ae) | (0 | ae) == (0 | ag) ? au : ae,\n                                ae = 0 == (0 | ag)) {\n                                    G = 86;\n                                    break\n                                }\n                                aj = ay,\n                                af <<= 1 & ae ^ 1\n                            }\n                        } else {\n                            au = 0,\n                            ak = 0,\n                            G = 86\n                        }\n                    } while (0);if (86 == (0 | G)) {\n                        if (0 == (0 | au) & 0 == (0 | ak)) {\n                            if (au = 2 << at,\n                            !(au = ad & (au | 0 - au))) {\n                                break\n                            }\n                            al = (au & 0 - au) - 1 | 0,\n                            am = al >>> 12 & 16,\n                            al >>>= am,\n                            an = al >>> 5 & 8,\n                            al >>>= an,\n                            av = al >>> 2 & 4,\n                            al >>>= av,\n                            aq = al >>> 1 & 2,\n                            al >>>= aq,\n                            au = al >>> 1 & 1,\n                            au = 0 | aw[496 + ((an | am | av | aq | au) + (al >>> au) << 2) >> 2]\n                        }\n                        au ? G = 90 : (at = ay,\n                        ad = ak)\n                    }\n                    if (90 == (0 | G)) {\n                        for (; ; ) {\n                            if (G = 0,\n                            al = (-8 & aw[au + 4 >> 2]) - ab | 0,\n                            ae = al >>> 0 < ay >>> 0,\n                            ay = ae ? al : ay,\n                            ak = ae ? au : ak,\n                            0 | (ae = 0 | aw[au + 16 >> 2])) {\n                                au = ae,\n                                G = 90\n                            } else {\n                                if (!(au = 0 | aw[au + 20 >> 2])) {\n                                    at = ay,\n                                    ad = ak;\n                                    break\n                                }\n                                G = 90\n                            }\n                        }\n                    }\n                    if (0 != (0 | ad) ? at >>> 0 < ((0 | aw[50]) - ab | 0) >>> 0 : 0) {\n                        aj = 0 | aw[52],\n                        ag = ad + ab | 0,\n                        af = 0 | aw[ad + 24 >> 2],\n                        ay = 0 | aw[ad + 12 >> 2];\n                        do {\n                            if ((0 | ay) == (0 | ad)) {\n                                if (ak = ad + 20 | 0,\n                                !((au = 0 | aw[ak >> 2]) || (ak = ad + 16 | 0,\n                                au = 0 | aw[ak >> 2]))) {\n                                    aa = 0;\n                                    break\n                                }\n                                for (; ; ) {\n                                    if (ay = au + 20 | 0,\n                                    0 | (ae = 0 | aw[ay >> 2])) {\n                                        au = ae,\n                                        ak = ay\n                                    } else {\n                                        if (ay = au + 16 | 0,\n                                        !(ae = 0 | aw[ay >> 2])) {\n                                            break\n                                        }\n                                        au = ae,\n                                        ak = ay\n                                    }\n                                }\n                                if (!(ak >>> 0 < aj >>> 0)) {\n                                    aw[ak >> 2] = 0,\n                                    aa = au;\n                                    break\n                                }\n                            } else {\n                                if (ae = 0 | aw[ad + 8 >> 2],\n                                au = ae + 12 | 0,\n                                ak = ay + 8 | 0,\n                                (0 | aw[ak >> 2]) == (0 | ad)) {\n                                    aw[au >> 2] = ay,\n                                    aw[ak >> 2] = ae,\n                                    aa = ay;\n                                    break\n                                }\n                            }\n                        } while (0);do {\n                            if (0 | af) {\n                                if (au = 0 | aw[ad + 28 >> 2],\n                                ak = 496 + (au << 2) | 0,\n                                (0 | ad) == (0 | aw[ak >> 2])) {\n                                    if (aw[ak >> 2] = aa,\n                                    !aa) {\n                                        aw[49] = aw[49] & ~(1 << au);\n                                        break\n                                    }\n                                } else {\n                                    if (au = af + 16 | 0,\n                                    (0 | aw[au >> 2]) == (0 | ad) ? aw[au >> 2] = aa : aw[af + 20 >> 2] = aa,\n                                    !aa) {\n                                        break\n                                    }\n                                }\n                                ak = 0 | aw[52],\n                                aw[aa + 24 >> 2] = af,\n                                au = 0 | aw[ad + 16 >> 2];\n                                do {\n                                    if (0 | au && !(au >>> 0 < ak >>> 0)) {\n                                        aw[aa + 16 >> 2] = au,\n                                        aw[au + 24 >> 2] = aa;\n                                        break\n                                    }\n                                } while (0);if (0 | (au = 0 | aw[ad + 20 >> 2]) && !(au >>> 0 < (0 | aw[52]) >>> 0)) {\n                                    aw[aa + 20 >> 2] = au,\n                                    aw[au + 24 >> 2] = aa;\n                                    break\n                                }\n                            }\n                        } while (0);do {\n                            if (at >>> 0 >= 16) {\n                                if (aw[ad + 4 >> 2] = 3 | ab,\n                                aw[ag + 4 >> 2] = 1 | at,\n                                aw[ag + at >> 2] = at,\n                                au = at >>> 3,\n                                at >>> 0 < 256) {\n                                    ay = 232 + (au << 1 << 2) | 0,\n                                    ak = 0 | aw[48],\n                                    au = 1 << au,\n                                    ak & au ? (au = ay + 8 | 0,\n                                    (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (ai = au,\n                                    W = ak)) : (aw[48] = ak | au,\n                                    ai = ay + 8 | 0,\n                                    W = ay),\n                                    aw[ai >> 2] = ag,\n                                    aw[W + 12 >> 2] = ag,\n                                    aw[ag + 8 >> 2] = W,\n                                    aw[ag + 12 >> 2] = ay;\n                                    break\n                                }\n                                if (au = at >>> 8,\n                                au ? at >>> 0 > 16777215 ? ay = 31 : (X = (au + 1048320 | 0) >>> 16 & 8,\n                                O = au << X,\n                                H = (O + 520192 | 0) >>> 16 & 4,\n                                O <<= H,\n                                ay = (O + 245760 | 0) >>> 16 & 2,\n                                ay = 14 - (H | X | ay) + (O << ay >>> 15) | 0,\n                                ay = at >>> (ay + 7 | 0) & 1 | ay << 1) : ay = 0,\n                                ae = 496 + (ay << 2) | 0,\n                                aw[ag + 28 >> 2] = ay,\n                                au = ag + 16 | 0,\n                                aw[au + 4 >> 2] = 0,\n                                aw[au >> 2] = 0,\n                                au = 0 | aw[49],\n                                ak = 1 << ay,\n                                !(au & ak)) {\n                                    aw[49] = au | ak,\n                                    aw[ae >> 2] = ag,\n                                    aw[ag + 24 >> 2] = ae,\n                                    aw[ag + 12 >> 2] = ag,\n                                    aw[ag + 8 >> 2] = ag;\n                                    break\n                                }\n                                for (aj = at << (31 == (0 | ay) ? 0 : 25 - (ay >>> 1) | 0),\n                                au = 0 | aw[ae >> 2]; ; ) {\n                                    if ((-8 & aw[au + 4 >> 2] | 0) == (0 | at)) {\n                                        ay = au,\n                                        G = 148;\n                                        break\n                                    }\n                                    if (ak = au + 16 + (aj >>> 31 << 2) | 0,\n                                    !(ay = 0 | aw[ak >> 2])) {\n                                        G = 145;\n                                        break\n                                    }\n                                    aj <<= 1,\n                                    au = ay\n                                }\n                                if (145 == (0 | G)) {\n                                    if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) {\n                                        aw[ak >> 2] = ag,\n                                        aw[ag + 24 >> 2] = au,\n                                        aw[ag + 12 >> 2] = ag,\n                                        aw[ag + 8 >> 2] = ag;\n                                        break\n                                    }\n                                    if (148 == (0 | G) && (au = ay + 8 | 0,\n                                    ak = 0 | aw[au >> 2],\n                                    O = 0 | aw[52],\n                                    ak >>> 0 >= O >>> 0 & ay >>> 0 >= O >>> 0)) {\n                                        aw[ak + 12 >> 2] = ag,\n                                        aw[au >> 2] = ag,\n                                        aw[ag + 8 >> 2] = ak,\n                                        aw[ag + 12 >> 2] = ay,\n                                        aw[ag + 24 >> 2] = 0;\n                                        break\n                                    }\n                                }\n                            } else {\n                                O = at + ab | 0,\n                                aw[ad + 4 >> 2] = 3 | O,\n                                O = ad + O + 4 | 0,\n                                aw[O >> 2] = 1 | aw[O >> 2]\n                            }\n                        } while (0);return 0 | (O = ad + 8 | 0)\n                    }\n                }\n            } else {\n                ab = -1\n            }\n        }\n    } while (0);if ((ay = 0 | aw[50]) >>> 0 >= ab >>> 0) {\n        return au = ay - ab | 0,\n        ak = 0 | aw[53],\n        au >>> 0 > 15 ? (O = ak + ab | 0,\n        aw[53] = O,\n        aw[50] = au,\n        aw[O + 4 >> 2] = 1 | au,\n        aw[O + au >> 2] = au,\n        aw[ak + 4 >> 2] = 3 | ab) : (aw[50] = 0,\n        aw[53] = 0,\n        aw[ak + 4 >> 2] = 3 | ay,\n        O = ak + ay + 4 | 0,\n        aw[O >> 2] = 1 | aw[O >> 2]),\n        0 | (O = ak + 8 | 0)\n    }\n    if ((au = 0 | aw[51]) >>> 0 > ab >>> 0) {\n        return H = au - ab | 0,\n        aw[51] = H,\n        O = 0 | aw[54],\n        X = O + ab | 0,\n        aw[54] = X,\n        aw[X + 4 >> 2] = 1 | H,\n        aw[O + 4 >> 2] = 3 | ab,\n        0 | (O = O + 8 | 0)\n    }\n    do {\n        if (!(0 | aw[166] || (au = 4096) + -1 & au)) {\n            aw[168] = au,\n            aw[167] = au,\n            aw[169] = -1,\n            aw[170] = -1,\n            aw[171] = 0,\n            aw[159] = 0,\n            aw[166] = Date.now() / 1000 & -16 ^ 1431655768;\n            break\n        }\n    } while (0);if (ag = ab + 48 | 0,\n    af = 0 | aw[168],\n    at = ab + 47 | 0,\n    aj = af + at | 0,\n    af = 0 - af | 0,\n    (ad = aj & af) >>> 0 <= ab >>> 0) {\n        return 0 | (O = 0)\n    }\n    if (au = 0 | aw[158],\n    0 | au ? (ai = 0 | aw[156],\n    (W = ai + ad | 0) >>> 0 <= ai >>> 0 | W >>> 0 > au >>> 0) : 0) {\n        return 0 | (O = 0)\n    }\n    au: do {\n        if (4 & aw[159]) {\n            G = 190\n        } else {\n            au = 0 | aw[54];\n            aw: do {\n                if (au) {\n                    for (ay = 640; ; ) {\n                        if (ak = 0 | aw[ay >> 2],\n                        ak >>> 0 <= au >>> 0 ? (ac = ay + 4 | 0,\n                        (ak + (0 | aw[ac >> 2]) | 0) >>> 0 > au >>> 0) : 0) {\n                            ae = ay,\n                            ay = ac;\n                            break\n                        }\n                        if (!(ay = 0 | aw[ay + 8 >> 2])) {\n                            G = 173;\n                            break aw\n                        }\n                    }\n                    if ((au = aj - (0 | aw[51]) & af) >>> 0 < 2147483647) {\n                        if ((0 | (ak = ap)) == ((0 | aw[ae >> 2]) + (0 | aw[ay >> 2]) | 0)) {\n                            if (-1 != (0 | ak)) {\n                                ag = ak,\n                                aj = au,\n                                G = 193;\n                                break au\n                            }\n                        } else {\n                            G = 183\n                        }\n                    }\n                } else {\n                    G = 173\n                }\n            } while (0);do {\n                if ((173 == (0 | G) ? -1 != (0 | (Y = ap)) : 0) && (au = Y,\n                ak = 0 | aw[167],\n                ay = ak + -1 | 0,\n                au = ay & au ? ad - au + (ay + au & 0 - ak) | 0 : ad,\n                ak = 0 | aw[156],\n                ay = ak + au | 0,\n                au >>> 0 > ab >>> 0 & au >>> 0 < 2147483647)) {\n                    if (W = 0 | aw[158],\n                    0 | W ? ay >>> 0 <= ak >>> 0 | ay >>> 0 > W >>> 0 : 0) {\n                        break\n                    }\n                    if ((0 | (ak = ap)) == (0 | Y)) {\n                        ag = Y,\n                        aj = au,\n                        G = 193;\n                        break au\n                    }\n                    G = 183\n                }\n            } while (0);aw: do {\n                if (183 == (0 | G)) {\n                    ay = 0 - au | 0;\n                    do {\n                        if (ag >>> 0 > au >>> 0 & au >>> 0 < 2147483647 & -1 != (0 | ak) ? (ah = 0 | aw[168],\n                        (ah = at - au + ah & 0 - ah) >>> 0 < 2147483647) : 0) {\n                            if (-1 == ap) {\n                                break aw\n                            }\n                            au = ah + au | 0;\n                            break\n                        }\n                    } while (0);if (-1 != (0 | ak)) {\n                        ag = ak,\n                        aj = au,\n                        G = 193;\n                        break au\n                    }\n                }\n            } while (0);aw[159] = 4 | aw[159],\n            G = 190\n        }\n    } while (0);if ((((190 == (0 | G) ? ad >>> 0 < 2147483647 : 0) ? (K = ap,\n    ar = ap,\n    K >>> 0 < ar >>> 0 & -1 != (0 | K) & -1 != (0 | ar)) : 0) ? (T = ar - K | 0) >>> 0 > (ab + 40 | 0) >>> 0 : 0) && (ag = K,\n    aj = T,\n    G = 193),\n    193 == (0 | G)) {\n        au = (0 | aw[156]) + aj | 0,\n        aw[156] = au,\n        au >>> 0 > (0 | aw[157]) >>> 0 && (aw[157] = au),\n        at = 0 | aw[54];\n        do {\n            if (at) {\n                ae = 640;\n                do {\n                    if (au = 0 | aw[ae >> 2],\n                    ak = ae + 4 | 0,\n                    ay = 0 | aw[ak >> 2],\n                    (0 | ag) == (au + ay | 0)) {\n                        ao = au,\n                        Q = ak,\n                        L = ay,\n                        J = ae,\n                        G = 203;\n                        break\n                    }\n                    ae = 0 | aw[ae + 8 >> 2]\n                } while (0 != (0 | ae));if ((203 == (0 | G) ? 0 == (8 & aw[J + 12 >> 2] | 0) : 0) ? at >>> 0 < ag >>> 0 & at >>> 0 >= ao >>> 0 : 0) {\n                    aw[Q >> 2] = L + aj,\n                    O = at + 8 | 0,\n                    O = 0 == (7 & O | 0) ? 0 : 0 - O & 7,\n                    X = at + O | 0,\n                    O = aj - O + (0 | aw[51]) | 0,\n                    aw[54] = X,\n                    aw[51] = O,\n                    aw[X + 4 >> 2] = 1 | O,\n                    aw[X + O + 4 >> 2] = 40,\n                    aw[55] = aw[170];\n                    break\n                }\n                for (au = 0 | aw[52],\n                ag >>> 0 < au >>> 0 ? (aw[52] = ag,\n                ad = ag) : ad = au,\n                ay = ag + aj | 0,\n                au = 640; ; ) {\n                    if ((0 | aw[au >> 2]) == (0 | ay)) {\n                        ak = au,\n                        G = 211;\n                        break\n                    }\n                    if (!(au = 0 | aw[au + 8 >> 2])) {\n                        ak = 640;\n                        break\n                    }\n                }\n                if (211 == (0 | G)) {\n                    if (!(8 & aw[au + 12 >> 2])) {\n                        aw[ak >> 2] = ag,\n                        an = au + 4 | 0,\n                        aw[an >> 2] = (0 | aw[an >> 2]) + aj,\n                        an = ag + 8 | 0,\n                        an = ag + (0 == (7 & an | 0) ? 0 : 0 - an & 7) | 0,\n                        au = ay + 8 | 0,\n                        au = ay + (0 == (7 & au | 0) ? 0 : 0 - au & 7) | 0,\n                        ax = an + ab | 0,\n                        af = au - an - ab | 0,\n                        aw[an + 4 >> 2] = 3 | ab;\n                        do {\n                            if ((0 | au) != (0 | at)) {\n                                if ((0 | au) == (0 | aw[53])) {\n                                    O = (0 | aw[50]) + af | 0,\n                                    aw[50] = O,\n                                    aw[53] = ax,\n                                    aw[ax + 4 >> 2] = 1 | O,\n                                    aw[ax + O >> 2] = O;\n                                    break\n                                }\n                                if (1 == (3 & (ak = 0 | aw[au + 4 >> 2]) | 0)) {\n                                    at = -8 & ak,\n                                    aj = ak >>> 3;\n                                    au: do {\n                                        if (ak >>> 0 >= 256) {\n                                            ag = 0 | aw[au + 24 >> 2],\n                                            ae = 0 | aw[au + 12 >> 2];\n                                            do {\n                                                if ((0 | ae) == (0 | au)) {\n                                                    if (ay = au + 16 | 0,\n                                                    ae = ay + 4 | 0,\n                                                    ak = 0 | aw[ae >> 2]) {\n                                                        ay = ae\n                                                    } else {\n                                                        if (!(ak = 0 | aw[ay >> 2])) {\n                                                            H = 0;\n                                                            break\n                                                        }\n                                                    }\n                                                    for (; ; ) {\n                                                        if (ae = ak + 20 | 0,\n                                                        0 | (aj = 0 | aw[ae >> 2])) {\n                                                            ak = aj,\n                                                            ay = ae\n                                                        } else {\n                                                            if (ae = ak + 16 | 0,\n                                                            !(aj = 0 | aw[ae >> 2])) {\n                                                                break\n                                                            }\n                                                            ak = aj,\n                                                            ay = ae\n                                                        }\n                                                    }\n                                                    if (!(ay >>> 0 < ad >>> 0)) {\n                                                        aw[ay >> 2] = 0,\n                                                        H = ak;\n                                                        break\n                                                    }\n                                                } else {\n                                                    if (aj = 0 | aw[au + 8 >> 2],\n                                                    ak = aj + 12 | 0,\n                                                    ay = ae + 8 | 0,\n                                                    (0 | aw[ay >> 2]) == (0 | au)) {\n                                                        aw[ak >> 2] = ae,\n                                                        aw[ay >> 2] = aj,\n                                                        H = ae;\n                                                        break\n                                                    }\n                                                }\n                                            } while (0);if (!ag) {\n                                                break\n                                            }\n                                            ak = 0 | aw[au + 28 >> 2],\n                                            ay = 496 + (ak << 2) | 0;\n                                            do {\n                                                if ((0 | au) == (0 | aw[ay >> 2])) {\n                                                    if (aw[ay >> 2] = H,\n                                                    0 | H) {\n                                                        break\n                                                    }\n                                                    aw[49] = aw[49] & ~(1 << ak);\n                                                    break au\n                                                }\n                                                if (ak = ag + 16 | 0,\n                                                (0 | aw[ak >> 2]) == (0 | au) ? aw[ak >> 2] = H : aw[ag + 20 >> 2] = H,\n                                                !H) {\n                                                    break au\n                                                }\n                                            } while (0);ae = 0 | aw[52],\n                                            aw[H + 24 >> 2] = ag,\n                                            ak = au + 16 | 0,\n                                            ay = 0 | aw[ak >> 2];\n                                            do {\n                                                if (0 | ay && !(ay >>> 0 < ae >>> 0)) {\n                                                    aw[H + 16 >> 2] = ay,\n                                                    aw[ay + 24 >> 2] = H;\n                                                    break\n                                                }\n                                            } while (0);if (!(ak = 0 | aw[ak + 4 >> 2])) {\n                                                break\n                                            }\n                                            if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) {\n                                                aw[H + 20 >> 2] = ak,\n                                                aw[ak + 24 >> 2] = H;\n                                                break\n                                            }\n                                        } else {\n                                            ay = 0 | aw[au + 8 >> 2],\n                                            ae = 0 | aw[au + 12 >> 2],\n                                            ak = 232 + (aj << 1 << 2) | 0;\n                                            do {\n                                                if ((0 | ay) != (0 | ak) && (0 | aw[ay + 12 >> 2]) == (0 | au)) {\n                                                    break\n                                                }\n                                            } while (0);if ((0 | ae) == (0 | ay)) {\n                                                aw[48] = aw[48] & ~(1 << aj);\n                                                break\n                                            }\n                                            do {\n                                                if ((0 | ae) == (0 | ak)) {\n                                                    V = ae + 8 | 0\n                                                } else {\n                                                    if (ak = ae + 8 | 0,\n                                                    (0 | aw[ak >> 2]) == (0 | au)) {\n                                                        V = ak;\n                                                        break\n                                                    }\n                                                }\n                                            } while (0);aw[ay + 12 >> 2] = ae,\n                                            aw[V >> 2] = ay\n                                        }\n                                    } while (0);au = au + at | 0,\n                                    af = at + af | 0\n                                }\n                                if (au = au + 4 | 0,\n                                aw[au >> 2] = -2 & aw[au >> 2],\n                                aw[ax + 4 >> 2] = 1 | af,\n                                aw[ax + af >> 2] = af,\n                                au = af >>> 3,\n                                af >>> 0 < 256) {\n                                    ay = 232 + (au << 1 << 2) | 0,\n                                    ak = 0 | aw[48],\n                                    au = 1 << au;\n                                    do {\n                                        if (ak & au) {\n                                            if (au = ay + 8 | 0,\n                                            (ak = 0 | aw[au >> 2]) >>> 0 >= (0 | aw[52]) >>> 0) {\n                                                X = au,\n                                                O = ak;\n                                                break\n                                            }\n                                        } else {\n                                            aw[48] = ak | au,\n                                            X = ay + 8 | 0,\n                                            O = ay\n                                        }\n                                    } while (0);aw[X >> 2] = ax,\n                                    aw[O + 12 >> 2] = ax,\n                                    aw[ax + 8 >> 2] = O,\n                                    aw[ax + 12 >> 2] = ay;\n                                    break\n                                }\n                                au = af >>> 8;\n                                do {\n                                    if (au) {\n                                        if (af >>> 0 > 16777215) {\n                                            ay = 31;\n                                            break\n                                        }\n                                        X = (au + 1048320 | 0) >>> 16 & 8,\n                                        O = au << X,\n                                        H = (O + 520192 | 0) >>> 16 & 4,\n                                        O <<= H,\n                                        ay = (O + 245760 | 0) >>> 16 & 2,\n                                        ay = 14 - (H | X | ay) + (O << ay >>> 15) | 0,\n                                        ay = af >>> (ay + 7 | 0) & 1 | ay << 1\n                                    } else {\n                                        ay = 0\n                                    }\n                                } while (0);if (ae = 496 + (ay << 2) | 0,\n                                aw[ax + 28 >> 2] = ay,\n                                au = ax + 16 | 0,\n                                aw[au + 4 >> 2] = 0,\n                                aw[au >> 2] = 0,\n                                au = 0 | aw[49],\n                                ak = 1 << ay,\n                                !(au & ak)) {\n                                    aw[49] = au | ak,\n                                    aw[ae >> 2] = ax,\n                                    aw[ax + 24 >> 2] = ae,\n                                    aw[ax + 12 >> 2] = ax,\n                                    aw[ax + 8 >> 2] = ax;\n                                    break\n                                }\n                                for (aj = af << (31 == (0 | ay) ? 0 : 25 - (ay >>> 1) | 0),\n                                au = 0 | aw[ae >> 2]; ; ) {\n                                    if ((-8 & aw[au + 4 >> 2] | 0) == (0 | af)) {\n                                        ay = au,\n                                        G = 281;\n                                        break\n                                    }\n                                    if (ak = au + 16 + (aj >>> 31 << 2) | 0,\n                                    !(ay = 0 | aw[ak >> 2])) {\n                                        G = 278;\n                                        break\n                                    }\n                                    aj <<= 1,\n                                    au = ay\n                                }\n                                if (278 == (0 | G)) {\n                                    if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) {\n                                        aw[ak >> 2] = ax,\n                                        aw[ax + 24 >> 2] = au,\n                                        aw[ax + 12 >> 2] = ax,\n                                        aw[ax + 8 >> 2] = ax;\n                                        break\n                                    }\n                                    if (281 == (0 | G) && (au = ay + 8 | 0,\n                                    ak = 0 | aw[au >> 2],\n                                    O = 0 | aw[52],\n                                    ak >>> 0 >= O >>> 0 & ay >>> 0 >= O >>> 0)) {\n                                        aw[ak + 12 >> 2] = ax,\n                                        aw[au >> 2] = ax,\n                                        aw[ax + 8 >> 2] = ak,\n                                        aw[ax + 12 >> 2] = ay,\n                                        aw[ax + 24 >> 2] = 0;\n                                        break\n                                    }\n                                }\n                            } else {\n                                O = (0 | aw[51]) + af | 0,\n                                aw[51] = O,\n                                aw[54] = ax,\n                                aw[ax + 4 >> 2] = 1 | O\n                            }\n                        } while (0);return 0 | (O = an + 8 | 0)\n                    }\n                    ak = 640\n                }\n                for (; ; ) {\n                    if (au = 0 | aw[ak >> 2],\n                    au >>> 0 <= at >>> 0 ? (az = au + (0 | aw[ak + 4 >> 2]) | 0) >>> 0 > at >>> 0 : 0) {\n                        ak = az;\n                        break\n                    }\n                    ak = 0 | aw[ak + 8 >> 2]\n                }\n                af = ak + -47 | 0,\n                ay = af + 8 | 0,\n                ay = af + (0 == (7 & ay | 0) ? 0 : 0 - ay & 7) | 0,\n                af = at + 16 | 0,\n                ay = ay >>> 0 < af >>> 0 ? at : ay,\n                au = ay + 8 | 0,\n                ae = ag + 8 | 0,\n                ae = 0 == (7 & ae | 0) ? 0 : 0 - ae & 7,\n                O = ag + ae | 0,\n                ae = aj + -40 - ae | 0,\n                aw[54] = O,\n                aw[51] = ae,\n                aw[O + 4 >> 2] = 1 | ae,\n                aw[O + ae + 4 >> 2] = 40,\n                aw[55] = aw[170],\n                ae = ay + 4 | 0,\n                aw[ae >> 2] = 27,\n                aw[au >> 2] = aw[160],\n                aw[au + 4 >> 2] = aw[161],\n                aw[au + 8 >> 2] = aw[162],\n                aw[au + 12 >> 2] = aw[163],\n                aw[160] = ag,\n                aw[161] = aj,\n                aw[163] = 0,\n                aw[162] = au,\n                au = ay + 24 | 0;\n                do {\n                    au = au + 4 | 0,\n                    aw[au >> 2] = 7\n                } while ((au + 4 | 0) >>> 0 < ak >>> 0);if ((0 | ay) != (0 | at)) {\n                    if (ag = ay - at | 0,\n                    aw[ae >> 2] = -2 & aw[ae >> 2],\n                    aw[at + 4 >> 2] = 1 | ag,\n                    aw[ay >> 2] = ag,\n                    au = ag >>> 3,\n                    ag >>> 0 < 256) {\n                        ay = 232 + (au << 1 << 2) | 0,\n                        ak = 0 | aw[48],\n                        au = 1 << au,\n                        ak & au ? (au = ay + 8 | 0,\n                        (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (N = au,\n                        P = ak)) : (aw[48] = ak | au,\n                        N = ay + 8 | 0,\n                        P = ay),\n                        aw[N >> 2] = at,\n                        aw[P + 12 >> 2] = at,\n                        aw[at + 8 >> 2] = P,\n                        aw[at + 12 >> 2] = ay;\n                        break\n                    }\n                    if (au = ag >>> 8,\n                    au ? ag >>> 0 > 16777215 ? ay = 31 : (X = (au + 1048320 | 0) >>> 16 & 8,\n                    O = au << X,\n                    H = (O + 520192 | 0) >>> 16 & 4,\n                    O <<= H,\n                    ay = (O + 245760 | 0) >>> 16 & 2,\n                    ay = 14 - (H | X | ay) + (O << ay >>> 15) | 0,\n                    ay = ag >>> (ay + 7 | 0) & 1 | ay << 1) : ay = 0,\n                    aj = 496 + (ay << 2) | 0,\n                    aw[at + 28 >> 2] = ay,\n                    aw[at + 20 >> 2] = 0,\n                    aw[af >> 2] = 0,\n                    au = 0 | aw[49],\n                    ak = 1 << ay,\n                    !(au & ak)) {\n                        aw[49] = au | ak,\n                        aw[aj >> 2] = at,\n                        aw[at + 24 >> 2] = aj,\n                        aw[at + 12 >> 2] = at,\n                        aw[at + 8 >> 2] = at;\n                        break\n                    }\n                    for (ae = ag << (31 == (0 | ay) ? 0 : 25 - (ay >>> 1) | 0),\n                    au = 0 | aw[aj >> 2]; ; ) {\n                        if ((-8 & aw[au + 4 >> 2] | 0) == (0 | ag)) {\n                            ay = au,\n                            G = 307;\n                            break\n                        }\n                        if (ak = au + 16 + (ae >>> 31 << 2) | 0,\n                        !(ay = 0 | aw[ak >> 2])) {\n                            G = 304;\n                            break\n                        }\n                        ae <<= 1,\n                        au = ay\n                    }\n                    if (304 == (0 | G)) {\n                        if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) {\n                            aw[ak >> 2] = at,\n                            aw[at + 24 >> 2] = au,\n                            aw[at + 12 >> 2] = at,\n                            aw[at + 8 >> 2] = at;\n                            break\n                        }\n                        if (307 == (0 | G) && (au = ay + 8 | 0,\n                        ak = 0 | aw[au >> 2],\n                        O = 0 | aw[52],\n                        ak >>> 0 >= O >>> 0 & ay >>> 0 >= O >>> 0)) {\n                            aw[ak + 12 >> 2] = at,\n                            aw[au >> 2] = at,\n                            aw[at + 8 >> 2] = ak,\n                            aw[at + 12 >> 2] = ay,\n                            aw[at + 24 >> 2] = 0;\n                            break\n                        }\n                    }\n                }\n            } else {\n                O = 0 | aw[52],\n                0 == (0 | O) | ag >>> 0 < O >>> 0 && (aw[52] = ag),\n                aw[160] = ag,\n                aw[161] = aj,\n                aw[163] = 0,\n                aw[57] = aw[166],\n                aw[56] = -1,\n                au = 0;\n                do {\n                    O = 232 + (au << 1 << 2) | 0,\n                    aw[O + 12 >> 2] = O,\n                    aw[O + 8 >> 2] = O,\n                    au = au + 1 | 0\n                } while (32 != (0 | au));O = ag + 8 | 0,\n                O = 0 == (7 & O | 0) ? 0 : 0 - O & 7,\n                X = ag + O | 0,\n                O = aj + -40 - O | 0,\n                aw[54] = X,\n                aw[51] = O,\n                aw[X + 4 >> 2] = 1 | O,\n                aw[X + O + 4 >> 2] = 40,\n                aw[55] = aw[170]\n            }\n        } while (0);if ((au = 0 | aw[51]) >>> 0 > ab >>> 0) {\n            return H = au - ab | 0,\n            aw[51] = H,\n            O = 0 | aw[54],\n            X = O + ab | 0,\n            aw[54] = X,\n            aw[X + 4 >> 2] = 1 | H,\n            aw[O + 4 >> 2] = 3 | ab,\n            0 | (O = O + 8 | 0)\n        }\n    }\n    return 0\n}\n\n"
  },
  {
    "path": "iqiyi.py",
    "content": "# 获取爱奇艺直播的真实流媒体地址。\n# iqiyi.js是cmd5x加密函数\n\nimport json\nimport re\nimport time\nimport urllib.parse\n\nimport execjs\nimport requests\n\n\nclass IQiYi:\n    \"\"\"获取爱奇艺 m3u8 格式直播源\n\n    输入房间号，通常是数字，比如链接 https://gamelive.iqiyi.com/w/74429 中的 74429。\n    注意：\n        爱奇艺有部分直播是来自pps的，要打开房间看链接是否有跳转，有则用pps.py\n        爱奇艺直播依赖js环境，建议安装node.js。\n\n    Attributes:\n        rid:    房间号\n    \"\"\"\n\n    def __init__(self, rid):\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        \"\"\"\n        里面iqiyi.js是个加盐的md5，execjs执行后获取cmd5x的返回值\n\n        Returns:\n            m3u8格式播放地址\n\n        Raises:\n            incorrect rid: 请确实是爱奇艺直播房间号：爱奇艺有部分直播是来自pps的，要打开房间看链接是否有跳转，有则用pps.py\n            Could not find an available JavaScript runtime: 是否安装了js环境\n\n        \"\"\"\n\n        res = self.s.get('https://m-gamelive.iqiyi.com/w/' + self.rid).text\n        # 获取直播间的qipuId\n        try:\n            qipuid, = re.findall(r'\"qipuId\":(\\d*?),\"roomId', res)\n        except ValueError:\n            raise Exception('Incorrect rid.')\n\n        callback = 'jsonp_' + str(int((time.time() * 1000))) + '_0000'\n        params = {\n            'lp': qipuid,\n            'src': '01010031010000000000',\n            'rateVers': 'H5_QIYI',\n            'qd_v': 1,\n            'callback': callback\n        }\n        # ba传参iqiyi.js,返回vf\n        ba = '/jp/live?' + urllib.parse.urlencode(params)\n        with open('iqiyi.js', 'r') as f:\n            content = f.read()\n        try:\n            cmd5x = execjs.compile(content)\n            vf = cmd5x.call('cmd5x', ba)\n        except RuntimeError:\n            raise Exception('Could not find an available JavaScript runtime.')\n        # 请求\n        response = self.s.get('https://live.video.iqiyi.com' + ba, params={'vf': vf}).text\n        url_json = json.loads(re.findall(r'try{.*?\\((.*)\\);}catch\\(e\\){};', response)[0])\n        url = (url_json.get('data').get('streams'))[0].get('url')\n        url = url.replace('hlslive.video.iqiyi.com', 'm3u8live.video.iqiyi.com')\n\n        return url\n\n\ndef get_real_url(rid):\n    try:\n        iqiyi = IQiYi(rid)\n        return iqiyi.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入爱奇艺直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "ixigua.py",
    "content": "# 获取西瓜直播的真实流媒体地址。\n\nimport requests\nimport re\n\n\nclass IXiGua:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        try:\n            headers = {\n                'user-agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:83.0) Gecko/20100101 Firefox/83.0'\n            }\n            room_url = 'https://live.ixigua.com/' + str(self.rid)\n            response = requests.get(url=room_url, headers=headers).text\n            real_url = re.findall(r'playInfo\":([\\s\\S]*?),\"authStatus', response)[0]\n            real_url = re.sub(r'\\\\u002F', '/', real_url)\n        except:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        xg = IXiGua(rid)\n        return xg.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入西瓜直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "jd.py",
    "content": "# 京东直播：https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=1807004&position=0\n\nimport requests\nimport json\n\n\nclass JD:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        url = 'https://api.m.jd.com/client.action'\n        params = {\n            'functionId': 'liveDetail',\n            'body': json.dumps({'id': self.rid, 'videoType': 1}, separators=(',', ':')),\n            'client': 'wh5'\n        }\n        with requests.Session() as s:\n            res = s.get(url, params=params).json()\n        data = res.get('data', 0)\n        if data:\n            status = data['status']\n            if status == 1:\n                real_url = data['h5Pull']\n                return real_url\n            else:\n                print('未开播')\n                real_url = '回放：' + data.get('playBack').get('videoUrl', 0)\n                return real_url\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        jd = JD(rid)\n        return jd.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入京东直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "kbs.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/22 8:02\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport hashlib\nimport time\nfrom urllib.parse import parse_qsl, urlsplit\n\nimport requests\n\n\nclass KBS:\n    \"\"\"\n    - 腾讯体育直播，看比赛频道 https://kbs.sports.qq.com/\n    - 直播间地址类似：https://sports.qq.com/kbsweb/game.htm?mid=100006:2337840，需要其中的mid\n    - 只能获取免费观看的直播间\n    - 请求参数params中的defn：蓝光fhd、超清shd、高清hd、标清sd，未登陆时最高获取超清，蓝光需VIP。\n    \"\"\"\n\n    def __init__(self, rid):\n        var = dict(parse_qsl(urlsplit(rid).query))\n        mid = var.get('mid')\n\n        with requests.Session() as self.s:\n            res = requests.get(f'https://matchweb.sports.qq.com/kbs/matchDetail?mid={mid}').json()\n            self.vid = res['data']['liveId']\n            self.livepid = res['data']['programId']\n\n    def get_real_url(self):\n        tt = int(time.time())\n        week = int(time.strftime('%w'))\n        s = ('06fc1464', '4244ce1b', '77de31c5', 'e0149fa2', '60394ced', '2da639f0', 'c2f0cf9f')\n        ha = f'{s[week - 1]}{self.vid}{tt}*#06#40201'\n        ckey = hashlib.md5(ha.encode('utf-8')).hexdigest()\n        params = {\n            'cmd': 2,\n            'cnlid': self.vid,\n            'pla': 0,\n            'stream': 2,\n            'system': 0,\n            'appVer': '3.0.0.142',\n            'encryptVer': f'7.{7 if week == 0 else week}',\n            'qq': 0,\n            'device': 'PC',\n            'guid': 'f56776a1fa52e9c8c4987bfecfbf0503',\n            'defn': 'shd',  # shd默认超清\n            'host': 'qq.com',\n            'livepid': self.livepid,\n            'logintype': 1,\n            'vip_status': 1,\n            'livequeue': 1,\n            'fntick': tt,\n            'tm': tt,\n            'sdtfrom': 1107,\n            'platform': 40201,\n            'cKey': ckey,\n            'queueStatus': 0,\n            'sphttps': 1,\n            'authext': '{}',\n            'auth_ext': '{}',\n            'auth_from': 40001,\n            # 'callback': 'txvlive_videoinfoget_2767135792',\n        }\n        res = self.s.get('https://infozb6.video.qq.com/', params=params).json()\n        playurl = res.get('playurl', 0)\n        if res['errinfo']:\n            raise Exception('errinfo')\n        else:\n            return playurl\n\n\ndef get_real_url(rid):\n    try:\n        kbs = KBS(rid)\n        return kbs.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入腾讯体育直播间地址：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "kk.py",
    "content": "# KK直播：http://www.kktv5.com/\nimport requests\n\n\nclass KK:\n\n    def __init__(self, rid):\n        \"\"\"\n        KK直播\n        Args:\n            rid: 房间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        url = 'https://sapi.kktv1.com/meShow/entrance?parameter={}'\n        parameter = {'FuncTag': 10005043, 'userId': f'{self.rid}', 'platform': 1, 'a': 1, 'c': 100101}\n        res = self.s.get(url.format(parameter)).json()\n        tagcode = res['TagCode']\n        if tagcode == '00000000':\n            if res.get('liveType', 0) == 1:\n                roomid = res['roomId']\n                parameter = {'FuncTag': 60001002, 'roomId': roomid, 'platform': 1, 'a': 1, 'c': 100101}\n                res = self.s.get(url.format(parameter)).json()\n                real_url = res['liveStream']\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        kk = KK(rid)\n        return kk.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入KK直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "kuaishou.py",
    "content": "# 获取快手直播的真实流媒体地址，默认输出最高画质\n# https://live.kuaishou.com/u/KPL704668133\n# 如获取失败，尝试修改 cookie 中的 did\n\nimport json\nimport re\nimport requests\n\n\nclass KuaiShou:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 '\n                          '(KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',\n            'cookie': 'did=web_d563dca728d28b00336877723e0359ed'}\n        with requests.Session() as s:\n            res = s.get('https://m.gifshow.com/fw/live/{}'.format(self.rid), headers=headers)\n            livestream = re.search(r'liveStream\":(.*),\"obfuseData', res.text)\n            if livestream:\n                livestream = json.loads(livestream.group(1))\n                *_, hlsplayurls = livestream['multiResolutionHlsPlayUrls']\n                urls, = hlsplayurls['urls']\n                url = urls['url']\n                return url\n            else:\n                raise Exception('直播间不存在或未开播')\n\n\ndef get_real_url(rid):\n    try:\n        ks = KuaiShou(rid)\n        return ks.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    # KPL704668133\n    r = input('请输入快手直播房间ID：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "kugou.py",
    "content": "# 获取酷狗繁星直播的真实流媒体地址，默认最高码率。\n\nimport requests\n\n\nclass KuGou:\n\n    def __init__(self, rid):\n        \"\"\"\n        酷狗繁星直播\n        Args:\n            rid: 房间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n        self.BASE_URL = 'https://fx1.service.kugou.com/video/mo/live/pull/h5/v3/streamaddr'\n\n    def get_real_url(self):\n        params = {\n            'roomId': self.rid,\n            'platform': 18,\n            'version': 1000,\n            'streamType': '3-6',\n            'liveType': 1,\n            'ch': 'fx',\n            'ua': 'fx-mobile-h5',\n            'kugouId': 0,\n            'layout': 1\n        }\n        try:\n            res = self.s.get(self.BASE_URL, params=params).json()\n            if res['code'] == 1:\n                raise Exception(f'{res[\"msg\"]}，可能是房间号输入错误！')\n            real_url_hls = res.get('data').get('horizontal')[0].get('httpshls')[0]\n        except IndexError:\n            try:\n                url = f'https://fx1.service.kugou.com/biz/ChannelVServices/' \\\n                      f'RoomLiveService.RoomLiveService.getCurrentLiveStarForMob/{self.rid}'\n                res = self.s.get(url).json()\n                if res['code'] == 1:\n                    raise Exception(f'{res[\"msg\"]}，可能是房间号输入错误！')\n                roomid = res['data']['roomId']\n                self.BASE_URL = 'https://fx2.service.kugou.com/video/pc/live/pull/mutiline/streamaddr'\n                params = {\n                    'std_rid': roomid,\n                    'version': '1.0',\n                    'streamType': '1-2-3-5-6',\n                    'targetLiveTypes': '1-4-5-6',\n                    'ua': 'fx-h5'\n                }\n                res = self.s.get(self.BASE_URL, params=params).json()\n                real_url_hls = res.get('data').get('lines')[-1].get('streamProfiles')[-1]['httpsHls'][-1]\n            except Exception:\n                raise Exception('未找到')\n        return real_url_hls\n\n\ndef get_real_url(rid):\n    try:\n        kg = KuGou(rid)\n        return kg.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入酷狗直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "kuwo.py",
    "content": "# 酷我聚星直播：http://jx.kuwo.cn/\n\nimport requests\nimport re\n\n\nclass KuWo:\n\n    def __init__(self, rid):\n        self.rid = rid\n        self.BASE_URL = 'https://jxm0.kuwo.cn/video/mo/live/pull/h5/v3/streamaddr'\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        res = self.s.get(f'https://jx.kuwo.cn/{self.rid}').text\n        roomid = re.search(r\"roomId: '(\\d*)'\", res)\n        if roomid:\n            self.rid = roomid.group(1)\n        else:\n            raise Exception('未开播或房间号错误')\n        params = {\n            'std_bid': 1,\n            'roomId': self.rid,\n            'platform': 405,\n            'version': 1000,\n            'streamType': '3-6',\n            'liveType': 1,\n            'ch': 'fx',\n            'ua': 'fx-mobile-h5',\n            'kugouId': 0,\n            'layout': 1,\n            'videoAppId': 10011,\n        }\n        res = self.s.get(self.BASE_URL, params=params).json()\n        if res['data']['sid'] == -1:\n            raise Exception('未开播或房间号错误')\n        try:\n            url = res['data']['horizontal'][0]['httpshls'][0]\n        except (KeyError, IndexError):\n            url = res['data']['vertical'][0]['httpshls'][0]\n        return url\n\n\ndef get_real_url(rid):\n    try:\n        kw = KuWo(rid)\n        return kw.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入酷我聚星直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "laifeng.py",
    "content": "# 获取来疯直播的真实流媒体地址。\n# 来疯直播就是优酷直播的个人主播频道，不同于优酷直播下的轮播台和体育直播。\n# 来疯直播间链接形式：https://v.laifeng.com/8032155\n\nimport requests\nimport re\n\n\nclass LaiFeng:\n\n    def __init__(self, rid):\n        \"\"\"\n        来疯直播\n        Args:\n            rid: 房间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        try:\n            response_main = self.s.get(f'http://v.laifeng.com/{self.rid}/m').text\n            stream_name = re.search(r\"initAlias:'(.*)?'\", response_main).group(1)\n            real_url = {}\n            for stream_format in ['HttpFlv', 'Hls']:\n                request_url = f'https://lapi.lcloud.laifeng.com/Play?AppId=101&CallerVersion=2.0&StreamName' \\\n                              f'={stream_name}&Action=Schedule&Version=2.0&Format={stream_format}'\n                response = self.s.get(request_url).json()\n                real_url[stream_format] = response.get(stream_format)[0].get('Url')\n        except Exception:\n            raise Exception('该直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        lf = LaiFeng(rid)\n        return lf.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入来疯直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "lehai.py",
    "content": "# 乐嗨直播：https://www.lehaitv.com/\n\nfrom urllib.parse import urlencode\nfrom urllib.parse import unquote\nimport requests\nimport time\nimport hashlib\n\n\nclass LeHai:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        url = f'https://service.lehaitv.com/v2/room/{self.rid}/media/advanceInfoRoom'\n        params = {\n            '_st1': int(time.time() * 1e3),\n            'accessToken': 's7FUbTJ%2BjILrR7kicJUg8qr025ZVjd07DAnUQd8c7g%2Fo4OH9pdSX6w%3D%3D',\n            'tku': 3000006,\n        }\n        data = urlencode(params) + '1eha12h5'\n        _ajaxData1 = hashlib.md5(data.encode('utf-8')).hexdigest()\n        params['_ajaxData1'] = _ajaxData1\n        params['accessToken'] = unquote(params['accessToken'])\n        with requests.Session() as s:\n            res = s.get(url, params=params)\n        if res.status_code == 200:\n            res = res.json()\n            statuscode = res['status']['statuscode']\n            if statuscode == '0':\n                if res['data']['live_status'] == 1:\n                    real_url = res['data']['medial_url_app_for_h264']\n                    return real_url\n                else:\n                    raise Exception('未开播')\n            else:\n                raise Exception('房间不存在 或 权限检查错误')\n        else:\n            raise Exception('请求错误')\n\n\ndef get_real_url(rid):\n    try:\n        lh = LeHai(rid)\n        return lh.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入乐嗨直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "liveu.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/8/15 14:09\n# @Project: my-spiders\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport requests\n\n\nclass liveU:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            url = f'https://mobile.liveu.me/appgw/v2/watchstartweb?sessionid=&vid={self.rid}'\n            res = s.get(url).json()\n            play_url = res['retinfo']['play_url'] if res['retval'] == 'ok' else '不存在或未开播'\n            return play_url\n\n\ndef get_real_url(rid):\n    try:\n        url = liveU(rid)\n        return url.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入liveU直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "longzhu.py",
    "content": "# 获取龙珠直播的真实流媒体地址，默认最高码率。\n\nimport requests\nimport re\n\n\nclass LongZhu:\n\n    def __init__(self, rid):\n        \"\"\"\n        龙珠直播，获取hls格式的播放地址\n        Args:\n            rid: 直播房间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        try:\n            res = self.s.get(f'http://star.longzhu.com/{self.rid}').text\n            roomId = re.search(r'roomid\":(\\d+)', res).group(1)\n            res = self.s.get(f'http://livestream.longzhu.com/live/getlivePlayurl?roomId={roomId}&utmSr=&platform=h5'\n                             f'&device=ios').json()\n            real_url = res.get('playLines')[0].get('urls')[-1].get('securityUrl')\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        lz = LongZhu(rid)\n        return lz.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入龙珠直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "look.py",
    "content": "# 获取网易云音乐旗下look直播的真实流媒体地址。\n# look直播间链接形式：https://look.163.com/live?id=73694082\n\n# 以下核心加密解密算法来自：https://github.com/Qinjiaxin/MusicBox/blob/b8f716d43d/MusicPlayer/apis/netEaseEncode.py\n# 分析过程可参看 https://github.com/Qinjiaxin/MusicBox/blob/b8f716d43d/doc/analysis/analyze_captured_data.md\n\n# 加密参数相关。\n# 具体http://s3.music.126.net/sep/s/2/core.js?5d6f8e4d01b4103ec9f246a2ef70e6d1在这个js中可以查看。\n# 好吧，其实不用分析这个js，在这个git中可以找到https://github.com/xiyouMc/ncmbot，不过他是for python2的。\n# 针对pyton3做了修改。\n\nimport base64\nimport binascii\nimport json\nimport random\n\nimport requests\nfrom Crypto.Cipher import AES\n\nmodulus = '00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee34' \\\n          '1f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e' \\\n          '82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7'\nnonce = b'0CoJUm6Qyw8W8jud'\npubKey = '010001'\n\n\ndef aes_encrypt(text, seckey):\n    pad = 16 - len(text) % 16\n\n    # aes加密需要byte类型。\n    # 因为调用两次，下面还要进行补充位数。\n    # 直接用try与if差不多。\n\n    try:\n        text = text.decode()\n    except Exception as e:\n        print(e)\n\n    text = text + pad * chr(pad)\n    try:\n        text = text.encode()\n    except Exception as e:\n        print(e)\n\n    encryptor = AES.new(seckey, 2, bytes('0102030405060708', 'utf-8'))\n    ciphertext = encryptor.encrypt(text)\n    ciphertext = base64.b64encode(ciphertext)\n    return ciphertext\n\n\ndef create_secret_key(size):\n    # 2中 os.urandom返回是个字符串。3中变成bytes。\n    # 不过加密的目的是需要一个字符串。\n    # 因为密钥之后会被加密到rsa中一起发送出去。\n    # 所以即使是个固定的密钥也是可以的。\n\n    # return (''.join(map(lambda xx: (hex(ord(xx))[2:]), os.urandom(size))))[0:16]\n    return bytes(''.join(random.sample('1234567890qwertyuipasdfghjklzxcvbnm', size)), 'utf-8')\n\n\ndef rsa_encrypt(text, pub_key, mod):\n    text = text[::-1]\n    # 3中将字符串转成hex的函数变成了binascii.hexlify, 2中可以直接 str.encode('hex')\n    rs = int(binascii.hexlify(text), 16) ** int(pub_key, 16) % int(mod, 16)\n    return format(rs, 'x').zfill(256)\n\n\ndef encrypted_request(text):\n    # 这边是加密过程。\n    text = json.dumps(text)\n    sec_key = create_secret_key(16)\n    enc_text = aes_encrypt(aes_encrypt(text, nonce), sec_key)\n    enc_sec_key = rsa_encrypt(sec_key, pubKey, modulus)\n    # 在那个js中也可以找到。\n    # params加密后是个byte，解下码。\n    return {'params': enc_text.decode(), 'encSecKey': enc_sec_key}\n\n\nclass Look:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        try:\n            request_data = encrypted_request({\"liveRoomNo\": self.rid})\n            response = requests.post(url='https://api.look.163.com/weapi/livestream/room/get/v3', data=request_data)\n            real_url = response.json()['data']['roomInfo']['liveUrl']\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        look = Look(rid)\n        return look.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入Look直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "maoer.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/1 13:03\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport json\n\nimport requests\n\n\nclass MAOER:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 '\n        }\n        url = 'https://fm.missevan.com/api/v2/live/{}'.format(self.rid)\n        with requests.Session() as s:\n            res = s.get(url, headers=headers).json()\n        try:\n            code = res['code']\n            if code != 0:\n                return res['info']\n            else:\n                channel = res['info']['room']['channel']\n                return channel\n        except json.decoder.JSONDecodeError:\n            return '输入错误'\n\n\ndef get_real_url(rid):\n    try:\n        mr = MAOER(rid)\n        return mr.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入猫耳直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "migu.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/11/6 10:51\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport requests\nfrom urllib import parse\n\n\nclass MiGu:\n    \"\"\"\n    获取咪咕体育直播的流媒体地址\n    直播列表:https://www.miguvideo.com/mgs/website/prd/sportMatchDetail.html\n    直播间地址形式:https://www.miguvideo.com/mgs/website/prd/sportLive.html?mgdbId=120000173758\n    mgdbId 120000173758即为房间号\n    \"\"\"\n\n    def __init__(self, rid, rate=3):\n        \"\"\"\n        Args:\n            rate:估计是清晰度，默认rate=3是高清\n            rid:房间号，如 120000173758\n        \"\"\"\n        self.rid = rid\n        self.rate = rate\n\n    def get_real_url(self):\n        \"\"\"\n        先获取contId\n        Returns:\n            url\n        \"\"\"\n        headers = {\n            'appId': 'miguvideo',\n            'clientId': '',\n            'SDKCEId': '',\n            'terminalId': 'www',\n            'userId': '',\n            'userToken': '',\n            'X-UP-CLIENT-CHANNEL-ID': '',\n            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/95.0.4638.69 Safari/537.36',\n            'Referer': 'https://www.miguvideo.com/',\n        }\n        url = 'https://app-sc.miguvideo.com/vms-match/v3/staticcache/basic/basic-data/{}'.format(self.rid)\n\n        with requests.Session() as session:\n            res = session.get(url, headers=headers).json()\n        try:\n            contid = res['body']['pId']\n            url = f'https://webapi.miguvideo.com/gateway/playurl/v3/play/playurl?contId={contid}&rateType={self.rate}'\n            res = session.get(url, headers=headers).json()\n            try:\n                playurl = res['body']['urlInfo']['url']\n                real_url = self.calcu(playurl)\n                return real_url\n            except KeyError:\n                return '未获取到url,可能参数错误！'\n        except KeyError:\n            return '未获取到contId'\n\n    @staticmethod\n    def calcu(pre_url):\n        \"\"\"\n        计算ddCalcu，原始过程在pcPlayer.js的9432行到9460行。\n        这里直接用python代码还原，其实可以简化。\n        Args:\n            pre_url:playurl请求返回的url用来拼接计算ddCalcu\n\n        Returns:\n            real_url:添加ddCalcu后的播放地址\n        \"\"\"\n        params = dict(parse.parse_qsl(pre_url.split('?')[-1]))\n        t = 'eeeeeeeee'\n        r = str(params['timestamp'])\n        n = str(params['ProgramID'])\n        a = params['Channel_ID']\n        o = params['puData']\n        # s = '2624'\n        # js里是遍历s，这里直接写死\n        u = t[2] or 'e'\n        ll = r[6] or 't'\n        c = n[2] or \"c\"\n        f = a[len(a) - 4] or 'n'\n        d = o\n        h = []\n        for p in range(0, int(len(d) / 2)):\n            h.append(d[len(d) - p - 1])\n            if p < len(d) - p - 1:\n                h.append(o[p])\n            x = {\n                1: u,\n                2: ll,\n                3: c,\n                4: f\n            }\n            h.append(x[p]) if p in [1, 2, 3, 4] else ''\n        v = ''.join(h)\n        real_url = pre_url + '&ddCalcu=' + v\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        mg = MiGu(rid)\n        return mg.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    rr = input('请输入咪咕直播间号：\\n')\n    print(get_real_url(rr))\n"
  },
  {
    "path": "now.py",
    "content": "# 获取NOW直播的真实流媒体地址。\n\nimport requests\n\n\nclass Now:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        try:\n            room_url = f'https://now.qq.com/cgi-bin/now/web/room/get_live_room_url?room_id={self.rid}&platform=8'\n            response = requests.get(url=room_url).json()\n            result = response.get('result')\n            real_url = {\n                'raw_hls_url': result.get('raw_hls_url', 0),\n                'raw_rtmp_url': result.get('raw_rtmp_url', 0),\n                'raw_flv_url': result.get('raw_flv_url', 0)\n            }\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        now = Now(rid)\n        return now.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入NOW直播间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "pps.py",
    "content": "# 获取PPS奇秀直播的真实流媒体地址。\n\nimport requests\nimport re\nimport time\n\n\nclass PPS:\n\n    def __init__(self, rid):\n        self.rid = rid\n        self.BASE_URL = 'https://m-x.pps.tv/api/stream/getH5'\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        headers = {\n            'Content-Type': 'application/x-www-form-urlencoded',\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',\n            'Referer': 'https://m-x.pps.tv/'\n        }\n        tt = int(time.time() * 1000)\n        try:\n            res = self.s.get(f'https://m-x.pps.tv/room/{self.rid}', headers=headers).text\n            anchor_id = re.findall(r'anchor_id\":\"(\\d*)', res)[0]\n            params = {\n                'qd_tm': tt,\n                'typeId': 1,\n                'platform': 7,\n                'vid': 0,\n                'qd_vip': 0,\n                'qd_uid': anchor_id,\n                'qd_ip': '114.114.114.114',\n                'qd_vipres': 0,\n                'qd_src': 'h5_xiu',\n                'qd_tvid': 0,\n                'callback': '',\n            }\n            res = self.s.get(self.BASE_URL, headers=headers, params=params).text\n            real_url = re.findall(r'\"hls\":\"(.*)\",\"rate_list', res)[0]\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        pps = PPS(rid)\n        return pps.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入奇秀直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "ppsport.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/4 15:11\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport base64\nimport binascii\nfrom urllib.parse import parse_qsl, urlsplit, urlencode\n\nimport requests\nfrom Crypto.Cipher import AES, DES3\nfrom Crypto.Cipher import PKCS1_v1_5\nfrom Crypto.Hash import SHA256\nfrom Crypto.PublicKey import RSA\n\n\ndef des_encrypt(text, key, iv):\n    \"\"\"\n    DES加密\n    \"\"\"\n    key = binascii.a2b_hex(key)\n    iv = binascii.a2b_hex(iv)\n    pad = 8 - len(text) % 8\n    text = text + pad * chr(pad)\n    text = text.encode()\n    cipher = DES3.new(key, DES3.MODE_CBC, iv)\n    encrypt_bytes = cipher.encrypt(text)\n    return base64.b64encode(encrypt_bytes).decode('utf-8')\n\n\ndef rsa_encrypt(text):\n    \"\"\"\n    RSA加密\n    :param text:\n    :return:\n    \"\"\"\n    pub_key = '-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqe6XLQF2JmXWgfh09t8TTZsOb6bnj' \\\n              '+duiWw4G7pd5Uo1/DN7Xij3Tys9E7XBX0gdXKYI9j+6Fr45bM28fzl4AxUxnhzmbExRt1NJarDGMKo49ViRg1VbL+Wh9kRi' \\\n              '+rAxBisdRiP2JEAL+Awqu80chZxxdyoI1k3fSLoZsv/PGkwolE71qsEM4BO1J9RWNp0wlNGqgR' \\\n              '+bTwLKkoe7oiZaKaMsSBWNIBDkwgGKFJZzXMXMnqGsDmfbdi32j6hW9DdrxjCx' \\\n              '/i9Nzahd1TWVnw9O1AHL5PD5kM3HzqkAewBu38sZxw8DSGYqG0fgVAQtiLHhlD/19F4NKxqL8IVCinMBHQIDAQAB\\n-----END ' \\\n              'PUBLIC KEY----- '\n    pub_key = RSA.importKey(pub_key)\n    cipher = PKCS1_v1_5.new(pub_key)\n    rsa_text = base64.b64encode(cipher.encrypt(bytes(text.encode(\"utf8\"))))\n    return rsa_text.decode('utf-8')\n\n\ndef encrypt(params):\n    \"\"\"\n    encrypt_params是DES3加密,cipher是RSA加密\n    :param params:\n    :return:\n    \"\"\"\n    key = 'DB30EB9226014FEC2A04C6A7BE47F22853B6621BD6989D83'\n    iv = '6795646FD1F8CC95'\n    encrypt_params = des_encrypt(urlencode(params, safe=','), key, iv)\n    cipher = rsa_encrypt(f'{key},{iv}')\n    en_params = {\n        'cipher': cipher,\n        'encryptParams': encrypt_params,\n        'vvId': '295b5e4a-4a77-442a-8594-36c47c87d6c5',\n        # 'format': 'jsonp'\n    }\n    return en_params\n\n\ndef aes_decrypt(text, key):\n    \"\"\"\n    aes解密，ECB模式，key先hash\n    :param text:密文\n    :param key:key\n    :return:\n    \"\"\"\n    h = SHA256.new()\n    h.update(key.encode())\n    key = h.hexdigest()\n    key = binascii.a2b_hex(key)\n    cipher = AES.new(key, AES.MODE_ECB)\n    text = binascii.a2b_hex(text)\n    decrypt_key = cipher.decrypt(text)\n    return binascii.b2a_hex(decrypt_key).decode()\n\n\nclass PPSport:\n    \"\"\"\n    链接样式：http://sports.pptv.com/sportslive/pg_h5live?sectionid=184978\n\n     - liveFlag=1 正在直播\n     - liveFlag=2 没有直播，有录像集锦\n     - liveFlag 为空，没有录像\n\n    非VIP最高获取1280P\n    \"\"\"\n\n    def __init__(self, rid):\n        # 拆分sectionid\n        var = dict(parse_qsl(urlsplit(rid).query))\n        sectionid = var.get('sectionid')\n        if sectionid:\n            self.sectionid = sectionid\n        else:\n            raise Exception('Invalid link!')\n        # 获取cid\n        with requests.Session() as self.s:\n            res = self.s.get(f'http://sportlive.suning.com/slsp-web/cms/competitionschedule/v1/detail/section.do'\n                             f'?sectionid={sectionid}').json()\n\n            self.liveflag = res['data'].get('liveFlag')\n\n            if self.liveflag == '1':\n                # 正在直播\n                self.cid = res['data']['sectionInfo']['lives'][0]['cid']\n            elif self.liveflag == '2':\n                # 录像\n                try:\n                    self.cid = res['data']['sectionInfo']['lives'][0]['afterCid']\n                except KeyError:\n                    # 没有录像\n                    raise Exception('No streaming!')\n            else:\n                raise Exception('liveflag error!')\n\n    def get_real_url(self):\n        \"\"\"\n        PPSport原网页中会把下面的params加密后再发送请求，用上面的encrypt，这里请求参数不加密也可以\n        :return:url\n        \"\"\"\n        params = {\n            'type': 'mhpptv',\n            'appId': 'pptv.web.h5',\n            'appPlt': 'web',\n            'appVer': '1.0.4',\n            'channel': 'sn.cultural',\n            'sdkVer': '1.5.0',\n            'cid': self.cid,\n            'allowFt': '0,1,2,3',\n            'rf': 0,\n            'ppi': '302c3530',\n            'o': 0,\n            'ahl_ver': 1,\n            'ahl_random': '374b7d5d453b2c4d2e2e327452434168',\n            'ahl_signa': '552aed5c0f2d2e561cd55991925ae817add78ceb86ede3ecac08dd4df6a31f78',\n            'version': 1,\n            'streamFormat': 1,\n            'videoFormat': 'm3u8',\n            'vvId': '295b5e4a-4a77-442a-8594-36c47c87d6c5',\n        }\n        # params = encrypt(params)\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/90.0.4430.93 Safari/537.36 ',\n        }\n        res = self.s.get('http://oneplay.api.pptv.com/ups-service/play', headers=headers, params=params)\n        res = res.json()\n\n        if res.get('code', 1) == 0:\n            if self.liveflag == '1':\n                # 正在直播\n                vod2 = res['data']['program']['media']['resource']['stream']['live2']\n            else:\n                # 录像集锦\n                vod2 = res['data']['program']['media']['resource']['vod2']\n\n            delay = vod2.get('delay')\n            interval = vod2.get('interval')\n\n            item = vod2['item'][-1]\n            dt = item['dt']\n            rid = item['rid'].split('.')[0]\n\n            if self.liveflag == '1':\n                h = dt['sh']['content'] + dt['st'] + dt['bh']['content'] + dt['iv'] + 'V8oo0Or1f047NaiMTxK123LMFuINTNeI'\n            else:\n                h = dt['sh'] + dt['st'] + dt['id'] + dt['bh'] + dt['iv'] + 'V8oo0Or1f047NaiMTxK123LMFuINTNeI'\n\n            key = dt['key']['content']\n            key, n = key.split('-', 1)\n            # 解密获取k\n            k = aes_decrypt(key, h) + '-' + n\n            k = {\n                'h5vod.ver': '2.1.5',\n                'k': k,\n                'vvid': '295b5e4a-4a77-442a-8594-36c47c87d6c5',\n                'type': 'mhpptv',\n                'o': 0,\n                'sv': '4.1.18',\n            }\n\n            url = f\"http://{dt['bh']['content']}/live/{interval}/{delay}/{rid}.m3u8?playback=0&{urlencode(k)}\" \\\n                if self.liveflag == '1' else f\"http://{dt['bh']}/{rid}.m3u8?fpp.ver=1.0.0&{urlencode(k)}\"\n            return url\n        else:\n            raise Exception('Invalid parameters')\n\n\ndef get_real_url(rid):\n    try:\n        pps = PPSport(rid)\n        return pps.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入PP体育直播间地址：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "qf.py",
    "content": "# 获取56千帆直播的真实流媒体地址。\n# 千帆直播直播间链接形式：https://qf.56.com/520686\n\nimport requests\nimport re\n\n\nclass QF:\n\n    def __init__(self, rid):\n        \"\"\"\n        搜狐千帆直播可以直接在网页源码里找到播放地址\n        Args:\n            rid: 数字直播间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        try:\n            res = self.s.get(f'https://qf.56.com/{self.rid}').text\n            flvurl = re.search(r\"flvUrl:'(.*)?'\", res).group(1)\n            if 'flv' in flvurl:\n                real_url = flvurl\n            else:\n                res = self.s.get(flvurl).json()\n                real_url = res['url']\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        qf = QF(rid)\n        return qf.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入千帆直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "qie.py",
    "content": "# 企鹅体育：https://live.qq.com/directory/all\n\nimport requests\nimport re\n\n\nclass ESport:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://m.live.qq.com/{self.rid}')\n        show_status = re.search(r'\"show_status\":\"(\\d)\"', res.text)\n        if show_status:\n            if show_status.group(1) == '1':\n                hls_url = re.search(r'\"hls_url\":\"(.*)\",\"use_p2p\"', res.text).group(1)\n                return hls_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        es = ESport(rid)\n        return es.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入企鹅体育直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "renren.py",
    "content": "# 人人直播：http://zhibo.renren.com/\n\nimport requests\nimport re\n\n\nclass RenRen:\n\n    def __init__(self, rid):\n        \"\"\"\n        直播间地址形式：http://activity.renren.com/live/liveroom/970302934_21348\n        rid即970302934_21348\n        Args:\n            rid:房间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        res = self.s.get(f'http://activity.renren.com/live/liveroom/{self.rid}').text\n        try:\n            s = re.search(r'playUrl\":\"(.*?)\"', res)\n            play_url = s.group(1)\n            return play_url\n        except Exception:\n            raise Exception('解析错误')\n\n\ndef get_real_url(rid):\n    try:\n        rr = RenRen(rid)\n        return rr.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入人人直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "requirements.txt",
    "content": "aiohttp==3.7.4\nasync-timeout==3.0.1\nattrs==20.2.0\ncertifi==2020.6.20\nchardet==3.0.4\nidna==2.10\nmultidict==4.7.6\nprotobuf==3.12.2\npycryptodome==3.9.8\nPyExecJS==1.5.1\nrequests==2.26.0\nsix==1.15.0\ntyping-extensions==3.7.4.3\nurllib3==1.26.5\nyarl==1.5.1\n"
  },
  {
    "path": "showself.py",
    "content": "# 秀色直播：https://www.showself.com/\n\nfrom urllib.parse import urlencode\nimport requests\nimport time\nimport hashlib\n\n\nclass ShowSelf:\n\n    def __init__(self, rid):\n        self.rid = rid\n        self.headers = {\n            'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/95.0.4638.69 Safari/537.36 '\n        }\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        res = self.s.get('https://service.showself.com/v2/custuser/visitor', headers=self.headers).json()\n        uid = res['data']['uid']\n        accesstoken = sessionid = res['data']['sessionid']\n        params = {\n            'accessToken': accesstoken,\n            'tku': uid,\n            '_st1': int(time.time() * 1000)\n        }\n        payload = {\n            'groupid': '999',\n            'roomid': self.rid,\n            'sessionid': sessionid,\n            'sessionId': sessionid\n        }\n        # 合并两个字典\n        data = dict(params, **payload)\n        data = f'{urlencode(sorted(data.items(), key=lambda d: d[0]))}sh0wselfh5'\n        _ajaxData1 = hashlib.md5(data.encode('utf-8')).hexdigest()\n        payload['_ajaxData1'] = _ajaxData1\n        url = f'https://service.showself.com/v2/rooms/{self.rid}/members?{urlencode(params)}'\n        res = self.s.post(url, json=payload, headers=self.headers)\n        if res.status_code == 200:\n            res = res.json()\n            statuscode = res['status']['statuscode']\n            if statuscode == '0':\n                if res['data']['roomInfo']['live_status'] == '1':\n                    anchor, = res['data']['roomInfo']['anchor']\n                    real_url = anchor['media_url']\n                    return real_url\n                else:\n                    raise Exception('未开播')\n            else:\n                raise Exception('房间不存在')\n        else:\n            raise Exception('参数错误')\n\n\ndef get_real_url(rid):\n    try:\n        ss = ShowSelf(rid)\n        return ss.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入秀色直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "sports_iqiyi.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/6/19 20:39\n# @Project: my-spiders\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\n\nimport binascii\nimport hashlib\nimport json\nimport re\nimport time\nfrom urllib.parse import urlencode\n\nimport execjs\nimport requests\n\n\nclass sIQiYi:\n\n    def __init__(self, rid):\n        \"\"\"\n        收费直播间、未开播直播间、已结束直播间获取到的地址均无法播放；\n        Args:\n            rid: 这里传入完整的直播间地址\n        \"\"\"\n        url = rid\n        self.rid = url.split('/')[-1]\n        self.s = requests.Session()\n\n    def decodeurl(self):\n        \"\"\"\n        传入url地址，截取url中的直播间id\n        字符串lgqipu倒序后转为十进制数，作为qpid解码的传参\n        Returns:\n            qpid\n        \"\"\"\n        o = 'lgqipu'\n        o = int(binascii.hexlify(o[::-1].encode()), 16)\n\n        s = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'\n        a = 0\n        rr = enumerate(self.rid)\n        for i, _ in rr:\n            a += s.index(_) * pow(36, len(self.rid) - (i + 1))\n\n        a = f'{a:b}'\n        n = f'{o:b}'\n        x = len(a)\n        y = len(n)\n        if x > y:\n            i = a[:x - y]\n            a = a[x - y:]\n        else:\n            i = n[:y - x]\n            n = n[y - x:]\n\n        for rs, ele in enumerate(a):\n            if ele == n[rs]:\n                i += '0'\n            else:\n                i += '1'\n        qpid = int(i, 2)\n        return qpid\n\n    def get_real_url(self):\n        \"\"\"\n        里面iqiyi.js是个加盐的md5，execjs执行后获取cmd5x的返回值\n        Returns:\n            m3u8格式播放地址\n        Raises:\n            Could not find an available JavaScript runtime: 是否安装了js环境\n        \"\"\"\n        qpid = self.decodeurl()\n        uid = 'ba4fe551bd889d73f3d321d2fadc6130'\n        ve = hashlib.md5(f'{qpid}function getTime() {{ [native code] }}{uid}'.encode('utf-8')).hexdigest()\n        v = {\n            'lp': qpid,\n            'src': '01014351010000000000',\n            'ptid': '02037251010000000000',\n            'uid': '',\n            'rateVers': 'H5_QIYI',\n            'k_uid': uid,\n            'qdx': 'n',\n            'qdv': 3,\n            'dfp': '',\n            've': ve,\n            'v': 1,\n            'k_err_retries': 0,\n            'tm': int(time.time()),\n            'k_ft4': 17179869185,\n            'k_ft1': 141287244169216,\n            'k_ft5': 1,\n            'qd_v': 1,\n            'qdy': 'a',\n            'qds': 0,\n            # 'callback': 'Q3d080ff19d8f233acb05683bf38e3a15',\n            # 'vf': 'f0b986f100ae81fff8e8f8f96053e815',\n        }\n        k = '/jp/live?' + urlencode(v)\n        cb = hashlib.md5(k.encode('utf-8')).hexdigest()\n        k = f'{k}&callback=Q{cb}'\n\n        # 生成vf\n        with open('iqiyi.js', 'r') as f:\n            content = f.read()\n        try:\n            cmd5x = execjs.compile(content)\n            vf = cmd5x.call('cmd5x', k)\n        except RuntimeError:\n            raise Exception('Could not find an available JavaScript runtime.')\n\n        # 请求url\n        url = f'https://live.video.iqiyi.com{k}&vf={vf}'\n        res = self.s.get(url).text\n        data = re.search(r'try{\\w{33}\\(([\\w\\W]+)\\s\\);}catch\\(e\\){};', res).group(1)\n        data = json.loads(data)\n        if data['code'] == 'A00004':\n            raise Exception('直播间地址错误！')\n        elif data['code'] == 'A00000':\n            try:\n                url = data['data']['streams'][-1]['url']\n            except IndexError:\n                raise Exception('可能直播未开始直播或为付费直播！')\n        else:\n            raise Exception('无法定位错误原因，可提交issue！')\n        return url\n\n\ndef get_real_url(rid):\n    try:\n        siqiyi = sIQiYi(rid)\n        return siqiyi.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入爱奇艺体育直播间完整地址地址，注意只能获取免费直播：\\n')\n    # https://sports.iqiyi.com/resource/pcw/live/gwbgbfbgc3\n    print(get_real_url(r))\n"
  },
  {
    "path": "tiktok.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/2 23:23\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport re\n\nimport requests\n\n\nclass TikTok:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',\n        }\n        res = requests.get(self.rid, headers=headers).text\n        url = re.search(r'\"LiveUrl\":\"(.*?m3u8)\",', res)\n\n        if url:\n            return url.group(1)\n        else:\n            raise Exception('link invalid')\n\n\ndef get_real_url(rid):\n    try:\n        tt = TikTok(rid)\n        return tt.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    # https://vm.tiktok.com/ZMe45tomE\n    r = input('请输入 TikTok 分享链接：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "tuho.py",
    "content": "# 星光直播：https://www.tuho.tv/28545037\n\nimport requests\nimport re\n\n\nclass TuHo:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://www.tuho.tv/{self.rid}').text\n        flv = re.search(r'videoPlayFlv\":\"(https[\\s\\S]+?flv)', res)\n        if flv:\n            status = re.search(r'isPlaying\\s:\\s(\\w+),', res).group(1)\n            if status == 'true':\n                real_url = flv.group(1).replace('\\\\', '')\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        th = TuHo(rid)\n        return th.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入星光直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "twitch.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/2 16:20\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport json\nimport re\nfrom urllib.parse import urlencode\n\n# twitch 直播需要科学上网\nimport requests\n\n\nclass Twitch:\n\n    def __init__(self, rid):\n        # rid = channel_name\n        self.rid = rid\n        with requests.Session() as self.s:\n            pass\n\n    def get_client_id(self):\n        try:\n            res = self.s.get(f'https://www.twitch.tv/{self.rid}').text\n            client_id = re.search(r'clientId=\"(.*?)\"', res).group(1)\n            return client_id\n        except requests.exceptions.ConnectionError:\n            raise Exception('ConnectionError')\n\n    def get_sig_token(self):\n        data = {\n            \"operationName\": \"PlaybackAccessToken_Template\",\n            \"query\": \"query PlaybackAccessToken_Template($login: String!, $isLive: Boolean!, $vodID: ID!, \"\n                     \"$isVod: Boolean!, $playerType: String!) {  streamPlaybackAccessToken(channelName: $login, \"\n                     \"params: {platform: \\\"web\\\", playerBackend: \\\"mediaplayer\\\", playerType: $playerType}) @include(\"\n                     \"if: $isLive) {    value    signature    __typename  }  videoPlaybackAccessToken(id: $vodID, \"\n                     \"params: {platform: \\\"web\\\", playerBackend: \\\"mediaplayer\\\", playerType: $playerType}) @include(\"\n                     \"if: $isVod) {    value    signature    __typename  }}\",\n            \"variables\": {\n                \"isLive\": True,\n                \"login\": self.rid,\n                \"isVod\": False,\n                \"vodID\": \"\",\n                \"playerType\": \"site\"\n            }\n        }\n\n        headers = {\n            'Client-ID': self.get_client_id(),\n            'Referer': 'https://www.twitch.tv/',\n            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/90.0.4430.93 Safari/537.36',\n        }\n        res = self.s.post('https://gql.twitch.tv/gql', headers=headers, data=json.dumps(data)).json()\n        try:\n            token, signature, _ = res['data']['streamPlaybackAccessToken'].values()\n        except AttributeError:\n            raise Exception(\"Channel does not exist\")\n\n        return signature, token\n\n    def get_real_url(self):\n        signature, token = self.get_sig_token()\n        params = {\n            'allow_source': 'true',\n            'dt': 2,\n            'fast_bread': 'true',\n            'player_backend': 'mediaplayer',\n            'playlist_include_framerate': 'true',\n            'reassignments_supported': 'true',\n            'sig': signature,\n            'supported_codecs': 'vp09,avc1',\n            'token': token,\n            'cdm': 'wv',\n            'player_version': '1.4.0',\n        }\n        url = f'https://usher.ttvnw.net/api/channel/hls/{self.rid}.m3u8?{urlencode(params)}'\n        return url\n\n\ndef get_real_url(rid):\n    try:\n        tw = Twitch(rid)\n        return tw.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入 twitch 房间名：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "v6cn.py",
    "content": "# 获取六间房直播的真实流媒体地址。\n\nimport requests\nimport re\n\n\nclass V6CN:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        try:\n            response = requests.get(f'https://v.6.cn/{self.rid}').text\n            result = re.findall(r'\"flvtitle\":\"v(\\d*?)-(\\d*?)\"', response)[0]\n            uid = result[0]\n            flvtitle = 'v{}-{}'.format(*result)\n            response = requests.get(f'https://rio.6rooms.com/live/?s={uid}').text\n            hip = 'https://' + re.search(r'<watchip>(.*\\.com).*?</watchip>', response).group(1)\n            real_url = [f'{hip}/{flvtitle}/palylist.m3u8', f'{hip}/httpflv/{flvtitle}']\n        except Exception:\n            raise Exception('直播间不存在或未开播')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        v6cn = V6CN(rid)\n        return v6cn.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入六间房直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "wali.py",
    "content": "# 小米直播：https://live.wali.com/fe\n\nimport requests\n\n\nclass WaLi:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        zuid = self.rid.split('_')[0]\n        with requests.Session() as s:\n            res = s.get(f'https://s.zb.mi.com/get_liveinfo?lid={self.rid}&zuid={zuid}').json()\n        status = res['data']['status']\n        if status == 1:\n            flv = res['data']['video']['flv']\n            return flv.replace('http', 'https')\n        else:\n            raise Exception('直播间不存在或未开播')\n\n\ndef get_real_url(rid):\n    try:\n        wali = WaLi(rid)\n        return wali.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入小米直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "woxiu.py",
    "content": "# 我秀直播：https://www.woxiu.com/\n\nimport requests\n\n\nclass WoXiu:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 '\n        }\n        url = f'https://m.woxiu.com/index.php?action=M/Live&do=LiveInfo&room_id={self.rid}'\n        with requests.Session() as s:\n            res = s.get(url, headers=headers)\n        try:\n            res = res.json()\n        except Exception:\n            raise Exception('直播间不存在')\n        status = res['online']\n        if status:\n            live_stream = res['live_stream']\n            return live_stream\n        else:\n            raise Exception('未开播')\n\n\ndef get_real_url(rid):\n    try:\n        wx = WoXiu(rid)\n        return wx.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入我秀直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "xunlei.py",
    "content": "# 迅雷直播：https://live.xunlei.com/global/index.html?id=0\n\nimport requests\nimport hashlib\nimport time\nfrom urllib.parse import urlencode\n\n\nclass XunLei:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        url = 'https://biz-live-ssl.xunlei.com//caller'\n        headers = {\n            'cookie': 'appid=1002'\n        }\n        _t = int(time.time() * 1000)\n        u = '1002'\n        f = '&*%$7987321GKwq'\n        params = {\n            '_t': _t,\n            'a': 'play',\n            'c': 'room',\n            'hid': 'h5-e70560ea31cc17099395c15595bdcaa1',\n            'uuid': self.rid,\n        }\n        data = urlencode(params)\n        p = hashlib.md5(f'{u}{data}{f}'.encode('utf-8')).hexdigest()\n        params['sign'] = p\n        with requests.Session() as s:\n            res = s.get(url, params=params, headers=headers).json()\n        if res['result'] == 0:\n            play_status = res['data']['play_status']\n            if play_status == 1:\n                real_url = res['data']['data']['stream_pull_https']\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间可能不存在')\n\n\ndef get_real_url(rid):\n    try:\n        xl = XunLei(rid)\n        return xl.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入迅雷直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "yangshipin.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/3 12:28\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\n# CCTV-1: https://m.yangshipin.cn/video?type=1&vid=2000210103&pid=600001859\n# 需要替换 headers 中登陆的 cookie\n# 目前网页版链接有效时间很短，且每个IP每天的请求数量有限制\n# APP版本的链接放时间更长，但需要反编译获取ckey生成方式，以后再更新。\n\nimport binascii\nimport ctypes\nimport time\nimport uuid\nfrom urllib.parse import parse_qs\n\nimport requests\nfrom Crypto.Cipher import AES\n\n\ndef aes_encrypt(text):\n    \"\"\"\n    AES加密\n    \"\"\"\n    key = binascii.a2b_hex('4E2918885FD98109869D14E0231A0BF4')\n    iv = binascii.a2b_hex('16B17E519DDD0CE5B79D7A63A4DD801C')\n    pad = 16 - len(text) % 16\n    text = text + pad * chr(pad)\n    text = text.encode()\n    cipher = AES.new(key, AES.MODE_CBC, iv)\n    encrypt_bytes = cipher.encrypt(text)\n    return binascii.b2a_hex(encrypt_bytes).decode()\n\n\nclass YangShiPin:\n\n    def __init__(self, rid):\n        var = parse_qs(rid)\n        vid, = var['vid']\n        pid, = var['pid']\n\n        platform = 4330701\n        guid = 'ko7djb70_vbjvrg5gcm'\n        txvlive_version = '3.0.37'\n        tt = int(time.time())\n        jc = 'mg3c3b04ba'\n        wu = f'|{vid}|{tt}|{jc}|{txvlive_version}|{guid}|{platform}|https://m.yangshipin.cn/|mozilla/5.0 (iphone; ' \\\n             f'cpu||Mozilla|Netscape|Win32| '\n\n        u = 0\n        for i in wu:\n            _char = ord(i)\n            u = (u << 5) - u + _char\n            u &= u & 0xffffffff\n        bu = ctypes.c_int32(u).value\n\n        xu = f'|{bu}{wu}'\n        # ckey是个aes加密，CBC模式，pkcs7填充\n        ckey = ('--01' + aes_encrypt(xu)).upper()\n\n        self.params = {\n            'cmd': 2,\n            'cnlid': vid,\n            'pla': 0,\n            'stream': 2,\n            'system': 1,\n            'appVer': '3.0.37',\n            'encryptVer': '8.1',\n            'qq': 0,\n            'device': 'PC',\n            'guid': 'ko7djb70_vbjvrg5gcm',\n            'defn': 'auto',\n            'host': 'yangshipin.cn',\n            'livepid': pid,\n            'logintype': 1,\n            'vip_status': 1,\n            'livequeue': 1,\n            'fntick': tt,\n            'tm': tt,\n            'sdtfrom': 113,\n            'platform': platform,\n            'cKey': ckey,\n            'queueStatus': 0,\n            'uhd_flag': 4,\n            'flowid': uuid.uuid4().hex,\n            'sphttps': 1,\n            # 'callback': 'txvlive_videoinfoget_9046016361',\n        }\n\n    def get_real_url(self):\n        headers = {\n            'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, '\n                          'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',\n            'referer': 'https://m.yangshipin.cn/',\n            'cookie': ''\n        }\n        res = requests.get('https://liveinfo.yangshipin.cn/', headers=headers, params=self.params).json()\n        url = res.get('playurl', 0)\n        if url:\n            return url\n        else:\n            return res\n\n\ndef get_real_url(rid):\n    try:\n        ysp = YangShiPin(rid)\n        return ysp.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('显示“无登录信息”，则需要填充cookie。请输入央视频地址：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "yizhibo.py",
    "content": "# 获取一直播的真实流媒体地址。\n\nimport requests\nimport re\n\n\nclass YiZhiBo:\n\n    def __init__(self, rid):\n        \"\"\"\n        一直播需要传入直播间的完整地址\n        Args:\n            rid:完整地址\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        try:\n            res = self.s.get(self.rid).text\n            play_url, status_code = re.findall(r'play_url:\"(.*?)\"[\\s\\S]*status:(\\d+),', res)[0]\n            if status_code == '10':\n                return play_url\n            else:\n                raise Exception('未开播')\n        except Exception:\n            raise Exception('获取错误')\n\n\ndef get_real_url(rid):\n    try:\n        yzb = YiZhiBo(rid)\n        return yzb.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入一直播房间地址：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "youku.py",
    "content": "# 获取@优酷轮播台@的真实流媒体地址。\n# 优酷轮播台是优酷直播live.youku.com下的一个子栏目，轮播一些经典电影电视剧，个人感觉要比其他直播平台影视区的画质要好，\n# 而且没有平台水印和主播自己贴的乱七八糟的字幕遮挡。\n# liveId 是如下形式直播间链接:\n# “https://vku.youku.com/live/ilproom?spm=a2hcb.20025885.m_16249_c_59932.d_11&id=8019610&scm=20140670.rcmd.16249.live_8019610”中的8019610字段。\n\nimport requests\nimport time\nimport hashlib\nimport json\n\n\nclass YouKu:\n\n    def __init__(self, rid):\n        \"\"\"\n        获取优酷轮播台的流媒体地址\n        Args:\n            rid: 直播间url中id=8019610，其中id即为房间号\n        \"\"\"\n        self.rid = rid\n        self.s = requests.Session()\n\n    def get_real_url(self):\n        try:\n            tt = str(int(time.time() * 1000))\n            data = json.dumps({'liveId': self.rid, 'app': 'Pc'}, separators=(',', ':'))\n            url = 'https://acs.youku.com/h5/mtop.youku.live.com.livefullinfo/1.0/?appKey=24679788'\n            cookies = self.s.get(url).cookies\n            token = cookies.get_dict().get('_m_h5_tk')[0:32]\n            sign = hashlib.md5(f'{token}&{tt}&24679788&{data}'.encode('utf-8')).hexdigest()\n            params = {\n                't': tt,\n                'sign': sign,\n                'data': data\n            }\n            response = self.s.get(url, params=params).json()\n            streamname = response.get('data').get('data').get('stream')[0].get('streamName')\n            real_url = f'https://lvo-live.youku.com/vod2live/{streamname}_mp4hd2v3.m3u8?&expire=21600&psid=1&ups_ts=' \\\n                       f'{int(time.time())}&vkey= '\n        except Exception:\n            raise Exception('请求错误')\n        return real_url\n\n\ndef get_real_url(rid):\n    try:\n        yk = YouKu(rid)\n        return yk.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入优酷轮播台房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "yuanbobo.py",
    "content": "# 热猫直播：https://zhibo.yuanbobo.com/\nimport requests\nimport re\n\n\nclass YuanBoBo:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        with requests.Session() as s:\n            res = s.get(f'https://zhibo.yuanbobo.com/{self.rid}').text\n        stream_id = re.search(r\"stream_id:\\s+'(\\d+)'\", res)\n        if stream_id:\n            status = re.search(r\"status:\\s+'(\\d)'\", res).group(1)\n            if status == '1':\n                real_url = f'https://tliveplay.yuanbobo.com/live/{stream_id.group(1)}.m3u8'\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        th = YuanBoBo(rid)\n        return th.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入热猫直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "yy.py",
    "content": "# 获取YY直播的真实流媒体地址。https://www.yy.com/1349606469\n# 默认获取最高画质\n\nimport requests\nimport re\nimport json\n\n\nclass YY:\n\n    def __init__(self, rid):\n        self.rid = rid\n\n    def get_real_url(self):\n        headers = {\n            'referer': f'https://wap.yy.com/mobileweb/{self.rid}',\n            'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/95.0.4638.69 Safari/537.36 '\n        }\n        room_url = f'https://interface.yy.com/hls/new/get/{self.rid}/{self.rid}/1200?source=wapyy&callback='\n        with requests.Session() as s:\n            res = s.get(room_url, headers=headers)\n        if res.status_code == 200:\n            data = json.loads(res.text[1:-1])\n            if data.get('hls', 0):\n                xa = data['audio']\n                xv = data['video']\n                xv = re.sub(r'_0_\\d+_0', '_0_0_0', xv)\n                url = f'https://interface.yy.com/hls/get/stream/15013/{xv}/15013/{xa}?source=h5player&type=m3u8'\n                res = s.get(url).json()\n                real_url = res['hls']\n                return real_url\n            else:\n                raise Exception('未开播')\n        else:\n            raise Exception('直播间不存在')\n\n\ndef get_real_url(rid):\n    try:\n        yy = YY(rid)\n        return yy.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('输入YY直播房间号：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "zhanqi.py",
    "content": "# 获取战旗直播（战旗TV）的真实流媒体地址。https://www.zhanqi.tv/lives\n# 默认最高画质\n\nimport json\nimport re\n\nimport requests\n\n\nclass ZhanQi:\n\n    def __init__(self, rid):\n        \"\"\"\n        战旗直播间有两种：一种是普通直播间号为数字或字幕；另一种是官方的主题直播间，链接带topic。\n        所以先判断一次后从网页源代码里获取数字直播间号\n        Args:\n            rid:直播间链接，从网页源码里获取真实数字rid\n        \"\"\"\n        self.s = requests.Session()\n        res = self.s.get(rid).text\n        self.rid = re.search(r'\"code\":\"(\\d+)\"', res).group(1)\n\n    def get_real_url(self):\n        res = self.s.get(f'https://m.zhanqi.tv/api/static/v2.1/room/domain/{self.rid}.json')\n        try:\n            res = res.json()\n            videoid = res['data']['videoId']\n            status = res['data']['status']\n        except (KeyError, json.decoder.JSONDecodeError):\n            raise Exception('Incorrect rid')\n\n        if status == '4':\n            # 获取gid\n            res = self.s.get('https://www.zhanqi.tv/api/public/room.viewer')\n            try:\n                res = res.json()\n                gid = res['data']['gid']\n            except KeyError:\n                raise Exception('Getting gid incorrectly')\n\n            # 获取cdn_host\n            res = self.s.get('https://umc.danuoyi.alicdn.com/dns_resolve_https?app=zqlive&host_key=alhdl-cdn.zhanqi.tv')\n            cdn_host, *_ = res.json().get('redirect_domain')\n\n            # 获取chain_key\n            data = {\n                'stream': f'{videoid}.flv',\n                'cdnKey': 202,\n                'platform': 128,\n            }\n            headers = {\n                'cookie': f'gid={gid}',\n            }\n            res = self.s.post('https://www.zhanqi.tv/api/public/burglar/chain', data=data, headers=headers).json()\n            chain_key = res['data']['key']\n            url = f'https://{cdn_host}/alhdl-cdn.zhanqi.tv/zqlive/{videoid}.flv?{chain_key}&playNum=68072487067' \\\n                  f'&gId={gid}&ipFrom=1&clientIp=&fhost=h5&platform=128'\n            return url\n        else:\n            raise Exception('No streaming')\n\n\ndef get_real_url(rid):\n    try:\n        zq = ZhanQi(rid)\n        return zq.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    # 直播间链接类似：https://www.zhanqi.tv/topic/owl 或 https://www.zhanqi.tv/152600919\n    r = input('输入战旗直播间的链接：\\n')\n    print(get_real_url(r))\n"
  },
  {
    "path": "zhibotv.py",
    "content": "# -*- coding: utf-8 -*-\n# @Time: 2021/5/13 20:27\n# @Project: real-url\n# @Author: wbt5\n# @Blog: https://wbt5.com\n\nimport requests\n\n\nclass ZhiBotv:\n\n    def __init__(self, rid):\n        \"\"\"\n        中国体育&新传宽频，直播间地址如：https://v.zhibo.tv/10007\n        Args:\n            rid:房间号\n        \"\"\"\n        self.rid = rid\n        self.params = {\n            'token': '',\n            'roomId': self.rid,\n            'angleId': '',\n            'lineId': '',\n            'definition': 'hd',\n            'statistics': 'pc|web|1.0.0|0|0|0|local|5.0.1',\n        }\n        self.BASE_URL = 'https://rest.zhibo.tv/room/get-pull-stream-info-v430'\n        self.HEADERS = {\n            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '\n                          'Chrome/95.0.4638.69 Safari/537.36 ',\n            'Referer': 'https://www.zhibo.tv/live/'\n        }\n\n    def get_real_url(self):\n        \"\"\"\n        no streaming 没开播;\n        non-existent rid 房间号不存在;\n        :return: url\n        \"\"\"\n        with requests.Session() as s:\n            res = s.get(self.BASE_URL, params=self.params, headers=self.HEADERS).json()\n            if 'hlsHUrl' in res['data']:\n                url = res['data'].get('hlsHUrl')\n                if url:\n                    return url\n                else:\n                    raise Exception('no streaming')\n            else:\n                raise Exception('non-existent rid')\n\n\ndef get_real_url(rid):\n    try:\n        zbtv = ZhiBotv(rid)\n        return zbtv.get_real_url()\n    except Exception as e:\n        print('Exception：', e)\n        return False\n\n\nif __name__ == '__main__':\n    r = input('请输入中国体育房间号：\\n')\n    print(get_real_url(r))\n"
  }
]