Repository: wbt5/real-url Branch: master Commit: b6daf0abcd44 Files: 114 Total size: 1012.6 KB Directory structure: gitextract_z4z_ib8x/ ├── .gitattributes ├── .gitignore ├── 173.py ├── 17live.py ├── 2cq.py ├── 51lm.py ├── 95xiu.py ├── 9xiu.py ├── LICENSE ├── README.md ├── acfun.py ├── bigo.py ├── bilibili.py ├── cc.py ├── changyou.py ├── danmu/ │ ├── danmaku/ │ │ ├── __init__.py │ │ ├── acfun.proto │ │ ├── acfun.py │ │ ├── acfun_pb2.py │ │ ├── bilibili.py │ │ ├── cc.py │ │ ├── douyu.py │ │ ├── egame.py │ │ ├── huajiao.proto │ │ ├── huajiao.py │ │ ├── huajiao_pb2.py │ │ ├── huomao.py │ │ ├── huya.py │ │ ├── inke.py │ │ ├── kuaishou.proto │ │ ├── kuaishou.py │ │ ├── kuaishou_pb2.py │ │ ├── kugou.proto │ │ ├── kugou.py │ │ ├── kugou_pb2.py │ │ ├── laifeng.py │ │ ├── longzhu.py │ │ ├── look.py │ │ ├── pps.py │ │ ├── qf.py │ │ ├── tars/ │ │ │ ├── EndpointF.py │ │ │ ├── QueryF.py │ │ │ ├── __TimeoutQueue.py │ │ │ ├── __adapterproxy.py │ │ │ ├── __async.py │ │ │ ├── __init__.py │ │ │ ├── __logger.py │ │ │ ├── __packet.py │ │ │ ├── __rpc.py │ │ │ ├── __servantproxy.py │ │ │ ├── __tars.py │ │ │ ├── __trans.py │ │ │ ├── __tup.py │ │ │ ├── __util.py │ │ │ ├── core.py │ │ │ ├── exception.py │ │ │ └── tars/ │ │ │ ├── EndpointF.tars │ │ │ ├── QueryF.tars │ │ │ └── __init__.py │ │ ├── yqs.proto │ │ ├── yqs.py │ │ ├── yqs_pb2.py │ │ └── zhanqi.py │ └── main.py ├── douyin.py ├── douyu.py ├── egame.py ├── fengbolive.py ├── hongle.py ├── huajiao.py ├── huomao.py ├── huya.py ├── imifun.py ├── immomo.py ├── inke.py ├── iqiyi.js ├── iqiyi.py ├── ixigua.py ├── jd.py ├── kbs.py ├── kk.py ├── kuaishou.py ├── kugou.py ├── kuwo.py ├── laifeng.py ├── lehai.py ├── liveu.py ├── longzhu.py ├── look.py ├── maoer.py ├── migu.py ├── now.py ├── pps.py ├── ppsport.py ├── qf.py ├── qie.py ├── renren.py ├── requirements.txt ├── showself.py ├── sports_iqiyi.py ├── tiktok.py ├── tuho.py ├── twitch.py ├── v6cn.py ├── wali.py ├── woxiu.py ├── xunlei.py ├── yangshipin.py ├── yizhibo.py ├── youku.py ├── yuanbobo.py ├── yy.py ├── zhanqi.py └── zhibotv.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ *.js linguist-language=python ================================================ FILE: .gitignore ================================================ # Byte-compiled / optimized / DLL files __pycache__/ .idea/* *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ ================================================ FILE: 173.py ================================================ # 艺气山直播:http://www.173.com/room/category?categoryId=11 import requests class YQS: def __init__(self, rid): self.rid = rid def get_real_url(self): params = f'roomId={self.rid}' with requests.Session() as s: res = s.post('https://www.173.com/room/getVieoUrl', params=params).json() data = res['data'] if data: status = data['status'] if status == 2: return data['url'] else: raise Exception('未开播') else: raise Exception('直播间不存在') def get_real_url(rid): try: yqs = YQS(rid) return yqs.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入艺气山直播房间号:\n') print(get_real_url(r)) ================================================ FILE: 17live.py ================================================ # 获取17直播的真实流媒体地址,可能需要挂国外代理才行。 # 17直播间链接形式:https://17.live/live/276480 import requests class Live17: def __init__(self, rid): """ # 可能需要挂代理。 # self.proxies = { # "http": "http://xxxx:1080", # "https": "http://xxxx:1080", # } Args: rid: """ self.rid = rid self.BASE_URL = 'https://api-dsa.17app.co/api/v1/lives/' def get_real_url(self): try: # res = requests.get(f'{self.BASE_URL}{self.rid}', proxies=self.proxies).json() res = requests.get(f'{self.BASE_URL}{self.rid}').json() real_url_default = res.get('rtmpUrls')[0].get('url') real_url_modify = real_url_default.replace('global-pull-rtmp.17app.co', 'china-pull-rtmp-17.tigafocus.com') real_url = [real_url_modify, real_url_default] except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: live17 = Live17(rid) return live17.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入17直播房间号:\n') print(get_real_url(r)) ================================================ FILE: 2cq.py ================================================ # 棉花糖直播:https://www.2cq.com/rank import requests class MHT: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: res = s.get(f'https://www.2cq.com/proxy/room/room/info?roomId={self.rid}&appId=1004') res = res.json() if res['status'] == 1: result = res['result'] if result['liveState'] == 1: real_url = result['pullUrl'] return real_url else: raise Exception('未开播') else: raise Exception('直播间可能不存在') def get_real_url(rid): try: mht = MHT(rid) return mht.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入棉花糖直播房间号:\n') print(get_real_url(r)) ================================================ FILE: 51lm.py ================================================ # 羚萌直播:https://live.51lm.tv/programs/Hot from urllib.parse import urlencode import requests import time import hashlib class LM: def __init__(self, rid): self.rid = rid self.BASE_URL = 'https://www.51lm.tv/live/room/info/basic' def get_real_url(self): roominfo = {'programId': self.rid} def g(d): return hashlib.md5(f'{d}#{urlencode(roominfo)}#Ogvbm2ZiKE'.encode('utf-8')).hexdigest() lminfo = { 'h': int(time.time()) * 1000, 'i': -246397986, 'o': 'iphone', 's': 'G_c17a64eff3f144a1a48d9f02e8d981c2', 't': 'H', 'v': '4.20.43', 'w': 'a710244508d3cc14f50d24e9fecc496a' } u = g(urlencode(lminfo)) lminfo = f'G={u}&{urlencode(lminfo)}' with requests.Session() as s: res = s.post(self.BASE_URL, json=roominfo, headers={'lminfo': lminfo}).json() code = res['code'] if code == 200: status = res['data']['isLiving'] if status == 'True': real_url = res['data']['playUrl'] return real_url else: raise Exception('未开播') elif code == -1: raise Exception('输入错误') elif code == 1201: raise Exception('直播间不存在') def get_real_url(rid): try: lm = LM(rid) return lm.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入羚萌直播房间号:\n') print(get_real_url(r)) ================================================ FILE: 95xiu.py ================================================ # 95秀:http://www.95.cn/ import requests import re class JWXiu: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: res = s.get(f'https://www.95.cn/{self.rid}.html').text try: uid = re.search(r'"uid":(\d+),', res).group(1) status = re.search(r'"is_offline":"(\d)"', res).group(1) except AttributeError: raise Exception('没有找到直播间') if status == '0': real_url = f'https://play1.95xiu.com/app/{uid}.flv' return real_url else: raise Exception('未开播') def get_real_url(rid): try: jwx = JWXiu(rid) return jwx.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入95秀房间号:\n') print(get_real_url(r)) ================================================ FILE: 9xiu.py ================================================ # 九秀直播:https://www.9xiu.com/other/classify?tag=all&index=all import requests class JXiu: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: url = f'https://h5.9xiu.com/room/live/enterRoom?rid={self.rid}' headers = { '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' } res = s.get(url, headers=headers).json() if res['code'] == 200: status = res['data']['status'] if status == 0: raise Exception('未开播') elif status == 1: live_url = res['data']['live_url'] return live_url else: raise Exception('直播间可能不存在') def get_real_url(rid): try: jx = JXiu(rid) return jx.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入九秀直播房间号:\n') print(get_real_url(r)) ================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ================================================ FILE: README.md ================================================ # Real-Url ## 说明 没想到还有这么多朋友发 issue 和邮件咨询问题,感谢大家的支持🎈!因为有时很忙,回复和提交代码的周期会有点长,抱歉哦😋 这个仓库存放的是:获取一些直播平台真实流媒体地址(直播源)和弹幕的 Python 代码实现。获取的地址经测试,均可在 PotPlayer、VLC、DPlayer(flv.js + hls.js)等播放器中播放。 > 🤘👌🤙🙏🐉👉 :如果该项目能帮助到您,欢迎 star 和 pr;或在您的项目中标注 Real-Url 为参考来源。 目前已实现: **59** 个直播平台的直播源获取:斗鱼直播、虎牙直播、哔哩哔哩直播、战旗直播、网易 CC 直播、火猫直播、企鹅电竞、YY 直播、一直播、快手直播、花椒直播、映客直播、西瓜直播、触手直播(已倒闭)、NOW 直播、抖音直播,爱奇艺直播、酷狗直播、龙珠直播、PPS 奇秀直播、六间房、17 直播、来疯直播、优酷轮播台、网易 LOOK 直播、千帆直播、陌陌直播、小米直播、迅雷直播、京东直播、企鹅体育、人人直播、棉花糖直播、九秀直播、羚萌直播、95秀、新浪疯播、红人直播、艾米直播、KK直播、酷我聚星、乐嗨直播、秀色直播、星光直播、我秀直播、热猫直播、艺气山直播、AcFun 直播、猫耳FM、畅秀阁、Twitch、TikTok、央视频、PP体育、zhibotv、腾讯体育直播、爱奇艺体育直播、liveU、bigolive、咪咕视频体育。 **18** 个直播平台的弹幕获取:斗鱼直播、虎牙直播、哔哩哔哩直播、快手直播、火猫直播、企鹅电竞、花椒直播、映客直播、网易 CC 直播、酷狗直播、龙珠直播、PPS 奇秀、搜狐千帆、战旗直播、来疯直播、网易 LOOK 直播、AcFun 直播、艺气山直播。 ## 运行 1. 项目使用了很简单的 Python 代码,仅在 Python 3 环境运行测试。 2. 具体所需模块请查看 requirements.txt 3. 获取斗鱼和爱奇艺的直播源,需 JavaScript 环境,可使用 node.js。爱奇艺直播里有个参数是加盐的 MD5,由仓库中的 iqiyi.js 生成。 4. 每个平台的直播源和弹幕获取功能相互独立,以后再整合。弹幕食用:python main.py ## 反馈 有直播平台失效或新增其他平台解析的,可发 [issue](https://github.com/wbt5/real-url/issues/new)。 ## 更新 2021.11.7::sparkles:新增咪咕体育。 2021.8.15::sparkles:新增 liveU、bigolive。 2021.7.4::art:更新哔哩哔哩直播源;:bug:修复Acfun直播弹幕;:bug:修复企鹅电竞弹幕。 2021.6.20::sparkles:新增爱奇艺体育直播。 2021.6.13::bug:修复腾讯体育。 2021.6.12::bug:修复斗鱼直播。 2021.05.22::sparkles:新增腾讯体育直播。 2021.05.15::art:更新爱奇艺、:bug:修复战旗直播。 2021.05.13: :sparkles:新增 zhibotv。 2021.05.05::sparkles:新增 PP体育。 2021.05.03::sparkles:新增 央视频。 2021.05.02::sparkles:新增 Twitch、TikTok。 2021.05.01::sparkles:新增畅秀阁、猫耳FM。 2020.12.20:修复直播源:抖音、艺气山、花椒、快手、来疯、龙珠、PPS、人人直播、17live 可能需要挂代理。 2020.10.17:修复:西瓜直播、YY直播。 2020.09.26:更新:虎牙直播源;注释掉未完成的 YY 直播弹幕功能。 2020.09.12:新增:斗鱼添加一个从PC网页端获取直播源的方法,可选线路和清晰度;新增requirements.txt文件;更新代码。 2020.08.18:更新快手直播源,现在播放链接需要带参数;更新快手直播弹幕,直接用 protobuf 序列化;新增 AcFun、艺气山两个平台的弹幕功能。 2020.08.08:新增 AcFun 直播、艺气山直播;更新:哔哩哔哩直播、虎牙直播、红人直播;优化:斗鱼直播。 2020.07.31:新增 19 个直播平台,详见上面说明;更新YY直播,现在可以获取最高画质;优化战旗直播、优酷直播代码; 2020.07.25:新增网易 LOOK 直播弹幕获取;修复斗鱼直播源;新增陌陌直播源。 2020.07.19:新增来疯直播弹幕获取 2020.07.18:新增酷狗、龙珠、PPS奇秀、搜狐千帆、战旗直播等5个平台的弹幕获取 2020.07.11:新增网易CC直播弹幕获取 2020.07.05:新增花椒直播、映客直播弹幕获取;更新虎牙直播源 2020.06.25:新增🐧企鹅电竞弹幕获取 2020.06.19:新增火猫直播弹幕获取 2020.06.18:新增弹幕功能 - 添加斗鱼、虎牙、哔哩哔哩和快手 4 个平台的弹幕获取。后续添加其他平台。 - 实现弹幕功能的代码和思路主要来自:[danmaku](https://github.com/IsoaSFlus/danmaku) 和 [ks_barrage](https://github.com/py-wuhao/ks_barrage),感谢两位大佬! 2020.05.30:更新虎牙直播。 2020.05.25:更新哔哩哔哩直播。 - 默认获取最高画质,不同清晰度取决于请求参数中的 qn。 - 增加 .m3u8 格式播放链接的获取方法。 2020.05.23:更新17直播、虎牙直播 2020.05.19:更新火猫、快手、酷狗、PPS 2020.05.08:新增优酷轮播台、look 直播、千帆直播; - 新增优酷轮播台:优酷轮播台是优酷直播下的一个子栏目,轮播一些经典电影电视剧,个人感觉要比其他直播平台影视区的画质要好,而且没有平台水印和主播自己贴的乱七八糟的字幕遮挡。 - 新增 LOOK 直播:LOOK 直播是网易云音乐旗下的直播平台。 - 新增千帆直播:千帆直播是搜狐旗下的直播平台。 2020.05.01:新增优酷的来疯直播。 2020.04.30:新增17直播。 2020.04.24:修复虎牙、哔哩哔哩、快手、爱奇艺。 2020.02.26:更新一直播。 2020.01.18:更新抖音直播。 2020.01.10:新增酷狗直播、龙珠直播、PPS奇秀直播、六间房。 2020.01.09:新增爱奇艺直播。 2020.01.07:新增抖音直播;删除一个直播平台。 2020.01.03:修复快手直播,请求移动网页版。 2019.12.31:修复快手直播。 2019.12.07:修复哔哩哔哩直播。 2019.12.04:更新斗鱼直播,新增一种获取方式。 2019.11.24:新增收米直播。 2019.11.18:新增西瓜直播;触手直播;NOW直播。 2019.11.18:新增一直播;快手直播;花椒直播;映客直播。 2019.11.17:新增火猫直播;新增企鹅电竞;新增YY直播。 2019.11.16:新增战旗tv直播源;新增网易CC直播。 2019.11.09:新增哔哩哔哩直播源。 2019.11.03:新增虎牙直播源。 2019.11.02:修复斗鱼预览地址获取的方法;新增未开播房间的判断。 ## 鸣谢 感谢 [JetBrains](https://www.jetbrains.com/?from=real-url) 提供的 free JetBrains Open Source license [![JetBrains-logo](https://i.loli.net/2020/10/03/E4h5FZmSfnGIgap.png)](https://www.jetbrains.com/?from=real-url) ================================================ FILE: acfun.py ================================================ # AcFun直播:https://live.acfun.cn/ # 默认最高画质 import requests import json class AcFun: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { 'content-type': 'application/x-www-form-urlencoded', 'cookie': '_did=H5_', 'referer': 'https://m.acfun.cn/' } url = 'https://id.app.acfun.cn/rest/app/visitor/login' data = 'sid=acfun.api.visitor' with requests.Session() as s: res = s.post(url, data=data, headers=headers).json() userid = res['userId'] visitor_st = res['acfun.api.visitor_st'] url = 'https://api.kuaishouzt.com/rest/zt/live/web/startPlay' params = { 'subBiz': 'mainApp', 'kpn': 'ACFUN_APP', 'kpf': 'PC_WEB', 'userId': userid, 'did': 'H5_', 'acfun.api.visitor_st': visitor_st } data = f'authorId={self.rid}&pullStreamType=FLV' res = s.post(url, params=params, data=data, headers=headers).json() if res['result'] == 1: data = res['data'] videoplayres = json.loads(data['videoPlayRes']) liveadaptivemanifest, = videoplayres['liveAdaptiveManifest'] adaptationset = liveadaptivemanifest['adaptationSet'] representation = adaptationset['representation'][-1] real_url = representation['url'] return real_url else: raise Exception('直播已关闭') def get_real_url(rid): try: acfun = AcFun(rid) return acfun.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入AcFun直播房间号:\n') print(get_real_url(r)) ================================================ FILE: bigo.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/8/15 16:00 # @Project: my-spiders # @Author: wbt5 # @Blog: https://wbt5.com # BIGO LIVE:https://www.bigo.tv/cn/ import requests class Bigo: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: url = f'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo' res = s.post(url, data={'siteId': self.rid}).json() hls_src = res['data']['hls_src'] play_url = hls_src if hls_src else '不存在或未开播' return play_url def get_real_url(rid): try: url = Bigo(rid) return url.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入bigo直播房间号:\n') print(get_real_url(r)) ================================================ FILE: bilibili.py ================================================ # 获取哔哩哔哩直播的真实流媒体地址,默认获取直播间提供的最高画质 # qn=150高清 # qn=250超清 # qn=400蓝光 # qn=10000原画 import requests class BiliBili: def __init__(self, rid): """ 有些地址无法在PotPlayer播放,建议换个播放器试试 Args: rid: """ rid = rid self.header = { 'User-Agent': 'Mozilla/5.0 (iPod; CPU iPhone OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) CriOS/87.0.4280.163 Mobile/15E148 Safari/604.1', } # 先获取直播状态和真实房间号 r_url = 'https://api.live.bilibili.com/room/v1/Room/room_init' param = { 'id': rid } with requests.Session() as self.s: res = self.s.get(r_url, headers=self.header, params=param).json() if res['msg'] == '直播间不存在': raise Exception(f'bilibili {rid} {res["msg"]}') live_status = res['data']['live_status'] if live_status != 1: raise Exception(f'bilibili {rid} 未开播') self.real_room_id = res['data']['room_id'] def get_real_url(self, current_qn: int = 10000) -> dict: url = 'https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo' param = { 'room_id': self.real_room_id, 'protocol': '0,1', 'format': '0,1,2', 'codec': '0,1', 'qn': current_qn, 'platform': 'h5', 'ptype': 8, } res = self.s.get(url, headers=self.header, params=param).json() stream_info = res['data']['playurl_info']['playurl']['stream'] qn_max = 0 for data in stream_info: accept_qn = data['format'][0]['codec'][0]['accept_qn'] for qn in accept_qn: qn_max = qn if qn > qn_max else qn_max if qn_max != current_qn: param['qn'] = qn_max res = self.s.get(url, headers=self.header, params=param).json() stream_info = res['data']['playurl_info']['playurl']['stream'] stream_urls = {} # flv流无法播放,暂修改成获取hls格式的流, for data in stream_info: format_name = data['format'][0]['format_name'] if format_name == 'ts': base_url = data['format'][-1]['codec'][0]['base_url'] url_info = data['format'][-1]['codec'][0]['url_info'] for i, info in enumerate(url_info): host = info['host'] extra = info['extra'] stream_urls[f'线路{i + 1}'] = f'{host}{base_url}{extra}' break return stream_urls def get_real_url(rid): try: bilibili = BiliBili(rid) return bilibili.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入bilibili直播房间号:\n') print(get_real_url(r)) ================================================ FILE: cc.py ================================================ # 获取网易CC的真实流媒体地址。 # 默认为最高画质 import requests class CC: def __init__(self, rid): self.rid = rid def get_real_url(self): room_url = f'https://api.cc.163.com/v1/activitylives/anchor/lives?anchor_ccid={self.rid}' response = requests.get(url=room_url).json() data = response.get('data', 0) if data: channel_id = data.get(f'{self.rid}').get('channel_id', 0) if channel_id: response = requests.get(f'https://cc.163.com/live/channel/?channelids={channel_id}').json() real_url = response.get('data')[0].get('sharefile') else: raise Exception('直播间不存在') else: raise Exception('输入错误') return real_url def get_real_url(rid): try: cc = CC(rid) return cc.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入网易CC直播房间号:\n') print(get_real_url(r)) ================================================ FILE: changyou.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/1 17:40 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import json import requests class ChangYou: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 ' } url = 'http://cxg.changyou.com/landingpage/getstreamname.action?roomid={}'.format(self.rid) with requests.Session() as s: res = s.get(url, headers=headers).json() try: code = res['code'] if code == 'error': return res['msg'] else: stream = res['obj']['stream'] url = 'http://pull.wscdn.cxg.changyou.com/show/{}.flv'.format(stream) return url except json.decoder.JSONDecodeError: return '输入错误' def get_real_url(rid): try: cxg = ChangYou(rid) return cxg.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入畅秀阁roomid:\n') print(get_real_url(r)) ================================================ FILE: danmu/danmaku/__init__.py ================================================ import asyncio import re import aiohttp from .yqs import YiQiShan from .acfun import AcFun from .bilibili import Bilibili from .cc import CC from .douyu import Douyu from .egame import eGame from .huajiao import HuaJiao from .huomao import HuoMao from .huya import Huya from .inke import Inke from .kuaishou import KuaiShou from .kugou import KuGou from .laifeng import LaiFeng from .longzhu import LongZhu from .look import Look from .pps import QiXiu from .qf import QF from .zhanqi import ZhanQi # from .yy import YY __all__ = ['DanmakuClient'] class DanmakuClient: def __init__(self, url, q): self.__url = '' self.__site = None self.__hs = None self.__ws = None self.__stop = False self.__dm_queue = q self.__link_status = True if 'http://' == url[:7] or 'https://' == url[:8]: self.__url = url else: self.__url = 'http://' + url for u, s in {'douyu.com': Douyu, 'live.bilibili.com': Bilibili, 'huya.com': Huya, 'huomao.com': HuoMao, 'kuaishou.com': KuaiShou, 'egame.qq.com': eGame, 'huajiao.com': HuaJiao, 'inke.cn': Inke, 'cc.163.com': CC, 'fanxing.kugou.com': KuGou, 'zhanqi.tv': ZhanQi, 'longzhu.com': LongZhu, 'pps.tv': QiXiu, 'qf.56.com': QF, 'laifeng.com': LaiFeng, 'look.163.com': Look, 'acfun.cn': AcFun, '173.com': YiQiShan, 'yy.com': ''}.items(): if re.match(r'^(?:http[s]?://)?.*?%s/(.+?)$' % u, url): self.__site = s self.__u = u break if self.__site is None: print('Invalid link!') exit() self.__hs = aiohttp.ClientSession() async def init_ws(self): ws_url, reg_datas = await self.__site.get_ws_info(self.__url) self.__ws = await self.__hs.ws_connect(ws_url) if reg_datas: for reg_data in reg_datas: if self.__u == 'qf.56.com' or self.__u == 'laifeng.com' or self.__u == 'look.163.com': await self.__ws.send_str(reg_data) else: await self.__ws.send_bytes(reg_data) async def heartbeats(self): while not self.__stop and self.__site.heartbeat: await asyncio.sleep(self.__site.heartbeatInterval) try: if self.__u == 'qf.56.com' or self.__u == 'laifeng.com' or self.__u == 'look.163.com': await self.__ws.send_str(self.__site.heartbeat) else: await self.__ws.send_bytes(self.__site.heartbeat) except: pass async def fetch_danmaku(self): while not self.__stop: async for msg in self.__ws: self.__link_status = True ms = self.__site.decode_msg(msg.data) for m in ms: await self.__dm_queue.put(m) await asyncio.sleep(1) await self.init_ws() await asyncio.sleep(1) async def init_ws_huajiao(self): rid = re.search(r'\d+', self.__url).group(0) s = self.__site(rid) self.__ws = await self.__hs.ws_connect(self.__site.ws_url) await self.__ws.send_bytes(s.sendHandshakePack()) count = 0 async for msg in self.__ws: if count == 0: await self.__ws.send_bytes(s.sendLoginPack(msg.data)) elif count == 1: await self.__ws.send_bytes(s.sendJoinChatroomPack(msg.data)) elif count > 2: ms = s.decode_msg(msg.data) for m in ms: await self.__dm_queue.put(m) count += 1 async def init_ws_acfun(self): self.__ws = await self.__hs.ws_connect(self.__site.ws_url) await self.__ws.send_bytes(self.__s.encode_packet('register')) async def ping_acfun(self): while True: await asyncio.sleep(1) await self.__ws.send_bytes(self.__s.encode_packet('ping')) async def keepalive_acfun(self): while True: await asyncio.sleep(50) await self.__ws.send_bytes(self.__s.encode_packet('keepalive')) async def heartbeat_acfun(self): while True: await asyncio.sleep(10) await self.__ws.send_bytes(self.__s.encode_packet('ztlivecsheartbeat')) async def fetch_danmaku_acfun(self): count = 0 async for msg in self.__ws: self.__link_status = True ms = self.__s.decode_packet(msg.data) if count == 0: await self.__ws.send_bytes(self.__s.encode_packet('ztlivecsenterroom')) count += 1 for m in ms: await self.__dm_queue.put(m) async def init_ws_173(self): self.__ws = await self.__hs.ws_connect(self.__site.ws_url) await self.__ws.send_bytes(self.__s.pack('startup')) await asyncio.sleep(1) await self.__ws.send_bytes(self.__s.pack('enterroomreq')) async def tcphelloreq_173(self): while True: await asyncio.sleep(10) await self.__ws.send_bytes(self.__s.pack('tcphelloreq')) async def roomhelloreq_173(self): while True: await asyncio.sleep(5) await self.__ws.send_bytes(self.__s.pack('roomhelloreq')) async def fetch_danmaku_173(self): async for msg in self.__ws: self.__link_status = True ms = self.__s.unpack(msg.data) for m in ms: await self.__dm_queue.put(m) async def init_ws_yy(self): self.__ws = await self.__hs.ws_connect(self.__site.ws_url) await self.__ws.send_bytes(self.__s.LoginUDB()) async def heartbeat_yy(self): while True: await asyncio.sleep(10) await self.__ws.send_bytes(self.__s.pingAp()) async def fetch_danmaku_yy(self): count = 0 async for msg in self.__ws: self.__link_status = True ms = self.__s.onProto(msg.data) if count == 0: await self.__ws.send_bytes(self.__s.loginAp()) await self.__ws.send_bytes(self.__s.joinServiceBc()) count += 1 for m in ms: await self.__dm_queue.put(m) async def start(self): if self.__u == 'huajiao.com': await self.init_ws_huajiao() elif self.__u == 'acfun.cn': rid = re.search(r'\d+', self.__url).group(0) self.__s = self.__site(rid) await self.init_ws_acfun() await asyncio.gather( self.ping_acfun(), self.fetch_danmaku_acfun(), self.keepalive_acfun(), self.heartbeat_acfun(), ) elif self.__u == '173.com': rid = self.__url.split('/')[-1] self.__s = self.__site(rid) await self.init_ws_173() await asyncio.gather( self.fetch_danmaku_173(), self.tcphelloreq_173(), self.roomhelloreq_173(), ) elif self.__u == 'yy.com': rid = self.__url.split('/')[-1] self.__s = self.__site(int(rid)) await self.init_ws_yy() await asyncio.gather( self.fetch_danmaku_yy(), self.heartbeat_yy() ) else: await self.init_ws() await asyncio.gather( self.heartbeats(), self.fetch_danmaku(), ) async def stop(self): self.__stop = True await self.__hs.close() ================================================ FILE: danmu/danmaku/acfun.proto ================================================ syntax = "proto2"; package AcFunPack; message RegisterRequest { optional AppInfo appInfo = 1; optional DeviceInfo deviceInfo = 2; optional EnvInfo envInfo = 3; optional PresenceStatus presenceStatus = 4; optional ActiveStatus appActiveStatus = 5; optional bytes appCustomStatus = 6; optional PushServiceToken pushServiceToken = 7; optional int64 instanceId = 8; repeated PushServiceToken pushServiceTokenList = 9; optional int32 keepaliveIntervalSec = 10; optional ZtCommonInfo ztCommonInfo = 11; enum PresenceStatus { kPresenceOffline = 0; kPresenceOnline = 1; } enum ActiveStatus { kInvalid = 0; kAppInForeground = 1; kAppInBackground = 2; } } message RegisterResponse { optional AccessPointsConfig accessPointsConfig = 1; optional bytes sessKey = 2; optional int64 instanceId = 3; optional SdkOption sdkOption = 4; optional AccessPointsConfig accessPointsConfigIpv6 = 5; } message AccessPointsConfig { repeated AccessPoint optimalAps = 1; repeated AccessPoint backupAps = 2; repeated uint32 availablePorts = 3; optional AccessPoint forceLastConnectedAp = 4; } message AccessPoint { optional AddressType addressType = 1; optional uint32 port = 2; optional fixed32 ipV4 = 3; optional bytes ipV6 = 4; optional string domain = 5; enum AddressType { kIPV4 = 0; kIPV6 = 1; kDomain = 2; } } message SdkOption { optional int32 reportIntervalSeconds = 1; optional string reportSecurity = 2; optional int32 lz4CompressionThresholdBytes = 3; repeated string netCheckServers = 4; } message ZtLiveCsEnterRoom { optional bool isAuthor = 1; optional uint32 reconnectCount = 2; optional uint32 lastErrorCode = 3; optional string enterRoomAttach = 4; optional string clientLiveSdkVersion = 5; } message ZtLiveCsHeartbeat { optional uint64 clientTimestampMs = 1; optional bool sequence = 2; } message CsCmd { optional string cmdType = 1; optional bytes payload = 2; optional string ticket = 3; optional string liveId = 4; } message AppInfo { optional string appName = 1; optional string appVersion = 2; optional string appChannel = 3; optional string sdkVersion = 4; map < string, string > extensionInfo = 5; } message DeviceInfo { optional PlatformType platformType = 1; optional string osVersion = 2; optional string deviceModel = 3; optional bytes imeiMd5 = 4; optional string deviceId = 5; optional string softDid = 6; optional string kwaiDid = 7; optional string manufacturer = 8; optional string deviceName = 9; enum PlatformType { kInvalid = 0; kAndroid = 1; kiOS = 2; kWindows = 3; WECHAT_ANDROID = 4; WECHAT_IOS = 5; H5 = 6; H5_ANDROID = 7; H5_IOS = 8; H5_WINDOWS = 9; H5_MAC = 10; kPlatformNum = 11; } } message EnvInfo { optional NetworkType networkType = 1; optional bytes apnName = 2; enum NetworkType { kInvalid = 0; kWIFI = 1; kCellular = 2; } } message PushServiceToken { optional PushType pushType = 1; optional bytes token = 2; optional bool isPassThrough = 3; enum PushType { kPushTypeInvalid = 0; kPushTypeAPNS = 1; kPushTypeXmPush = 2; kPushTypeJgPush = 3; kPushTypeGtPush = 4; kPushTypeOpPush = 5; kPushTypeVvPush = 6; kPushTypeHwPush = 7; kPushTypeFcm = 8; } } message ZtCommonInfo { optional string kpn = 1; optional string kpf = 2; optional int64 uid = 4; optional string did = 5; } message PingResponse { optional sfixed32 serverTimestamp = 1; optional fixed32 clientIp = 2; optional fixed32 redirectIp = 3; optional uint32 redirectPort = 4; } message PingRequest { optional PingType pingType = 1; optional uint32 pingRound = 2; enum PingType { kInvalid = 0; kPriorRegister = 1; kPostRegister = 2; } } message UpstreamPayload { optional string command = 1; optional int64 seqId = 2; optional uint32 retryCount = 3; optional bytes payloadData = 4; optional UserInstance userInstance = 5; optional int32 errorCode = 6; optional SettingInfo settingInfo = 7; optional RequsetBasicInfo requestBasicInfo = 8; optional string subBiz = 9; optional FrontendInfo frontendInfo = 10; optional string kpn = 11; optional bool anonymouseUser = 12; } message DownstreamPayload { optional string command = 1; optional int64 seqId = 2; optional int32 errorCode = 3; optional bytes payloadData = 4; optional string errorMsg = 5; optional bytes errorData = 6; optional string subBiz = 7; } message UserInstance { optional User user = 1; optional int64 instanceId = 2; } message User { optional int32 appId = 1; optional int64 uid = 2; } message SettingInfo { optional string locale = 1; optional sint32 timezone = 2; } message RequsetBasicInfo { optional DeviceInfo.PlatformType clientType = 1; optional string deviceId = 2; optional string clientIp = 3; optional string appVersion = 4; optional string channel = 5; optional AppInfo appInfo = 6; optional DeviceInfo deviceInfo = 7; optional EnvInfo envInfo = 8; optional int32 clientPort = 9; optional string location = 10; optional string kpf = 11; } message FrontendInfo { optional string ip = 1; optional int32 port = 2; } message PacketHeader { optional int32 appId = 1; optional int64 uid = 2; optional int64 instanceId = 3; optional uint32 flags = 4; optional EncodingType encodingType = 6; optional uint32 decodedPayloadLen = 7; optional EncryptionMode encryptionMode = 8; optional TokenInfo tokenInfo = 9; optional int64 seqId = 10; repeated Feature features = 11; optional string kpn = 12; enum Flags { option allow_alias = true; kDirUpstream = 0; kDirDownstream = 1; kDirMask = 1; } enum EncodingType { kEncodingNone = 0; kEncodingLz4 = 1; } enum EncryptionMode { kEncryptionNone = 0; kEncryptionServiceToken = 1; kEncryptionSessionKey = 2; } enum Feature { kReserve = 0; kCompressLz4 = 1; } } message TokenInfo { optional TokenType tokenType = 1; optional bytes token = 2; enum TokenType { kInvalid = 0; kServiceToken = 1; } } message KeepAliveRequest { optional RegisterRequest.PresenceStatus presenceStatus = 1; optional RegisterRequest.ActiveStatus appActiveStatus = 2; optional PushServiceToken pushServiceToken = 3; repeated PushServiceToken pushServiceTokenList = 4; repeated int32 keepaliveIntervalSec = 5; } message ZtLiveScMessage { optional string messageType = 1; optional int32 compressionType = 2; optional bytes payload = 3; optional string liveId = 4; optional string ticket = 5; optional uint64 serverTimestampMs = 6; } message ZtLiveScNotifySignal { repeated ZtLiveNotifySignalItem item = 1; message ZtLiveNotifySignalItem { optional string signalType = 1; repeated bytes payload = 2; } } message ZtLiveScActionSignal { repeated ZtLiveActionSignalItem item = 1; message ZtLiveActionSignalItem { optional string signalType = 1; repeated bytes payload = 2; } } message ZtLiveScStateSignal { repeated ZtLiveStateSignalItem item = 1; message ZtLiveStateSignalItem { optional string signalType = 1; repeated bytes payload = 2; } } message ZtLiveScStatusChanged { optional int32 type = 1; optional uint64 maxRandomDelayMs = 2; optional BannedInfo bannedInfo = 3; message BannedInfo { optional string banReason = 1; } } message CommonActionSignalComment { optional string content = 1; optional uint64 sendTimeMs = 2; optional ZtLiveUserInfo userInfo = 3; } message CommonActionSignalLike { optional ZtLiveUserInfo userInfo = 1; optional uint64 sendTimeMs = 2; } message CommonActionSignalGift { optional ZtLiveUserInfo userInfo = 1; optional uint64 sendTimeMs = 2; optional uint64 giftId = 3; optional uint32 batchSize = 4; optional uint32 comboCount = 5; optional uint64 rank = 6; optional string comboKey = 7; optional uint64 slotDisplayDurationMs = 8; optional uint64 expireDurationMs = 9; } message CommonStateSignalDisplayInfo { optional string watchingCount = 1; optional string likeCount = 2; optional uint32 likeDelta = 3; } message CommonStateSignalTopUsers { repeated TopUser topUser = 1; message TopUser { optional ZtLiveUserInfo userInfo = 1; optional string customWatchingListData = 2; optional string displaySendAmount = 3; optional bool anonymousUser = 4; } } message CommonActionSignalUserEnterRoom { optional ZtLiveUserInfo userInfo = 1; optional uint64 sendTimeMs = 2; } message CommonActionSignalUserFollowAuthor { optional ZtLiveUserInfo userInfo = 1; optional uint64 sendTimeMs = 2; } message CommonActionSignalRichText { optional UserInfoSegment userInfo = 1; optional PlainSegment plain = 2; optional ImageSegment image = 3; } message UserInfoSegment { optional ZtLiveUserInfo user = 1; optional string color = 2; } message PlainSegment { optional string text = 1; optional string color = 2; } message ImageSegment { optional ImageCdnNode cdnNode = 1; optional string alternativeText = 2; optional string alternativeColor = 3; } message CommonNotifySignalKickedOut { optional string reason = 1; } message CommonNotifySignalViolationAlert { optional string violationContent = 1; } message CommonStateSignalCurrentRedpackList { } message CommonStateSignalRecentComment { optional CommonActionSignalComment comment = 1; } message CommonStateSignalChatReady { optional string chatId = 1; optional ZtLiveUserInfo guestUserInfo = 2; optional int32 mediaType = 3; } message CommonStateSignalChatEnd { optional string chatId = 1; optional int32 endType = 2; } message AcfunActionSignalThrowBanana { optional UserInfo visitor = 1; optional int32 count = 2; optional uint64 sendTimeMs = 3; } message AcfunStateSignalDisplayInfo { optional string bananaCount = 1; } message AcfunActionSignalJoinClub { optional UserInfo fansInfo = 1; optional UserInfo uperInfo = 2; optional uint64 joinTimeMs = 3; } message ZtLiveUserInfo { optional uint64 userId = 1; optional string nickname = 2; optional ImageCdnNode avatar = 3; } message ImageCdnNode { optional string cdn = 1; optional string url = 2; optional string urlPattern = 3; } message UserInfo { optional uint64 userId = 1; optional string name = 2; } ================================================ FILE: danmu/danmaku/acfun.py ================================================ # AcFun直播现在属于快手旗下了,其JS源码中也可以看到很多名为'kuaishou'的变量,所以和快手直播弹幕的获取方法有点类似,都使用了protobuf压缩数据。 # 在mplayer-live.xxx.js中可以看到所有websocket过程。奇怪的是,其序列化和反序列化时代码并不统一,可能有啥"特殊意义"我没看懂。 # ws请求过程:Register--EnterRoom--Heartbeat,其中Register后返回的第一条数据里有sessionkey和instanceid。 # 在Chrome调试时发现客户端一直会向服务器发送:每1秒一次ping;每10秒一次keepalive,模拟实现时,不发送也正常。 import base64 import gzip import struct import time import requests from Crypto import Random from Crypto.Cipher import AES from Crypto.Util.Padding import pad from . import acfun_pb2 as pb class AcFun: ws_url = 'wss://link.xiatou.com/' def __init__(self, rid): self.encryptionmode = 0 # 加密模式,0不加密,1时key=ssecurity,2时key=sessionkey self.seqId = 0 # 客户端发送请求时都会加1 self.payload_len = 0 self.sessionkey = b'' self.instanceid = 0 # 初始值0 self.gift = { # 有些直播间的礼物编号不一样,实际打开直播间页面会有一次XHR请求 1: '香蕉', 17: '快乐水', 9: '告白', 35: '氧气瓶', 4: '牛啤', 33: '情书', 8: '星蕉雨', 31: '金坷垃', 34: '狗粮', 2: '吃瓜', 12: '打Call', 32: '变身腰带', 15: 'AC机娘', 16: '猴岛', 10: '666', 11: '菜鸡', 30: '鸽鸽', 13: '立FLAG', 6: '魔法棒', 7: '好人卡', 14: '窜天猴', 21: '生日快乐', 5: '手柄', 29: '大触' } # 下面获取一些加入房间所需注册参数 headers = { 'content-type': 'application/x-www-form-urlencoded', 'cookie': '_did=H5_', 'referer': 'https://m.acfun.cn/' } url = 'https://id.app.acfun.cn/rest/app/visitor/login' form_data = 'sid=acfun.api.visitor' with requests.Session() as s: res = s.post(url, data=form_data, headers=headers).json() status, *d = res.values() if status == 0: # 未登陆访客获取的3个参数 acsecurity, self.uid, visitor_st = d self.ssecurity = base64.b64decode(acsecurity) self.token = visitor_st.encode() else: raise Exception('token 获取错误') url = 'https://api.kuaishouzt.com/rest/zt/live/web/startPlay' params = { 'subBiz': 'mainApp', 'kpn': 'ACFUN_APP', 'kpf': 'OUTSIDE_IOS_H5', 'userId': self.uid, 'did': 'H5_', 'acfun.api.visitor_st': visitor_st } data = 'authorId={}&pullStreamType=SINGLE_HLS'.format(rid) res = s.post(url, params=params, data=data, headers=headers).json() if res['result'] == 1: data = res['data'] # 获取直播间的几个参数 self.availabletickets, *_ = data['availableTickets'] self.enterroomattach = data['enterRoomAttach'] self.liveid = data['liveId'] else: raise Exception('直播已关闭') @staticmethod # aes加密,iv随机;key值取决去encryptionmode def aes_encode(t, key): t = pad(t, AES.block_size) iv = Random.new().read(AES.block_size) mode = AES.MODE_CBC c = AES.new(key, mode, iv) res = c.encrypt(t) return iv + res # 把iv加到头部 @staticmethod # 这里传入的待解密数据不用补全,一直都是16的整数倍。key值取决去encryptionmode。pkcs7模式去掉最后的填充padding。 def aes_decode(t, key): iv = t[:16] n = t[16:] # n = pad(n, AES.block_size) mode = AES.MODE_CBC c = AES.new(key, mode, iv) res = c.decrypt(n) length = len(res) padding = res[length - 1] res = res[0:length - padding] return res def register(self): # 注册 p = pb.RegisterRequest() p.appActiveStatus = 1 p.appInfo.appName = 'link-sdk' p.appInfo.sdkVersion = '1.2.1' p.deviceInfo.deviceModel = 'h5' p.deviceInfo.platformType = 6 p.instanceId = 0 p.presenceStatus = 1 p.ztCommonInfo.kpn = 'ACFUN_APP' p.ztCommonInfo.kpf = 'OUTSIDE_IOS_H5' p.ztCommonInfo.uid = self.uid register_data = p.SerializeToString() self.encryptionmode = 1 self.seqId = 1 return register_data def keepalive(self): # keepalive p = pb.KeepAliveRequest() p.appActiveStatus = 1 p.presenceStatus = 1 keepalive_data = p.SerializeToString() self.encryptionmode = 2 self.seqId += 1 return keepalive_data def ping(self): # ping p = pb.PingRequest() # p.pingType = 2 ping_data = p.SerializeToString() self.seqId += 1 self.encryptionmode = 2 return ping_data def ztlivecsenterroom(self): return self.cscmd('ZtLiveCsEnterRoom') def ztlivecsheartbeat(self): # 心跳数据 return self.cscmd('ZtLiveCsHeartbeat') def cscmd(self, payload_type): p = getattr(pb, payload_type)() if payload_type == 'ZtLiveCsEnterRoom': p.isAuthor = False p.reconnectCount = 0 p.enterRoomAttach = self.enterroomattach p.clientLiveSdkVersion = 'kwai-acfun-live-link' elif payload_type == 'ZtLiveCsHeartbeat': p.sequence = self.seqId p.clientTimestampMs = int(time.time() * 1000) payload = p.SerializeToString() p = pb.CsCmd() p.cmdType = payload_type p.ticket = self.availabletickets p.payload = payload p.liveId = self.liveid cscmd_data = p.SerializeToString() self.seqId += 1 self.encryptionmode = 2 return cscmd_data def encode_payload(self, payload_type): # 要发送的原始数据都是先序列化再拼接 c = { 'keepalive': 'Basic.KeepAlive', 'register': 'Basic.Register', 'ping': 'Basic.Ping', 'ztlivecsenterroom': 'Global.ZtLiveInteractive.CsCmd', 'ztlivecsheartbeat': 'Global.ZtLiveInteractive.CsCmd' } p = pb.UpstreamPayload() p.command = c[payload_type] p.retryCount = 1 p.payloadData = getattr(self, payload_type)() p.seqId = self.seqId p.subBiz = 'mainApp' e = p.SerializeToString() key = self.ssecurity if self.encryptionmode == 1 else self.sessionkey payload_data = AcFun.aes_encode(e, key) if self.encryptionmode != 0 else e self.payload_len = len(e) return payload_data def encode_head(self): # 头部数据,里面有原始数据长度 p = pb.PacketHeader() p.appId = 13 p.decodedPayloadLen = self.payload_len p.encryptionMode = self.encryptionmode p.instanceId = self.instanceid p.kpn = 'ACFUN_APP' p.seqId = self.seqId if self.encryptionmode == 1: p.tokenInfo.tokenType = 1 p.tokenInfo.token = self.token p.uid = self.uid head = p.SerializeToString() return head def encode_packet(self, payload_type): # 数据组成:固定数据 + 头部长度 + 原始数据长度 + 头部 + 原始数据 body = self.encode_payload(payload_type) head = self.encode_head() data = struct.pack('!HHII', 43981, 1, len(head), len(body)) data += head + body return data def decode_packet(self, data): # 数据解包 msgs = [{'name': '', 'content': '', 'msg_type': 'other'}] head_length, body_length = struct.unpack('!II', data[4:12]) if 12 + head_length + body_length != len(data): raise Exception('downstream message size is not correct') # 头部解包 e = data[12:head_length + 12] c = pb.PacketHeader() c.ParseFromString(e) encryptionmode = c.encryptionMode # 根据加密模式确定解密的key # body解包 h = data[head_length + 12:] key = self.ssecurity if encryptionmode == 1 else self.sessionkey n = AcFun.aes_decode(h, key) if encryptionmode != 0 else h u = pb.DownstreamPayload() u.ParseFromString(n) # header = c # body = u payload = u.payloadData command = u.command # 根据command确定返回数据类型 # print(command) if command == 'Basic.Register': # websocket第一次返回数据,确定sessKey和instanceId p = pb.RegisterResponse() p.ParseFromString(payload) self.sessionkey = p.sessKey self.instanceid = p.instanceId elif command == 'Push.ZtLiveInteractive.Message': # 'Push.ZtLiveInteractive.Message' a = pb.ZtLiveScMessage() a.ParseFromString(payload) o = a.messageType s = a.payload if a.compressionType == 2: s = gzip.decompress(s) if o == 'ZtLiveScTicketInvalid': raise Exception('ZtLiveScTicketInvalid') # o可为'ZtLiveScNotifySignal' 'ZtLiveScActionSignal' 等,弹幕礼物入场点赞等在ZtLiveScActionSignal中 elif o == 'ZtLiveScActionSignal': p = getattr(pb, o)() p.ParseFromString(s) for i in p.item: p = getattr(pb, i.signalType)() # signalType: # CommonActionSignalComment 评论 # CommonActionSignalGift 礼物 # CommonActionSignalUserEnterRoom 入场 # CommonActionSignalLike 点赞 # CommonActionSignalUserFollowAuthor 关注主播 # 等等等 u = { 'CommonActionSignalUserEnterRoom': '进入直播间', 'CommonActionSignalUserFollowAuthor': '关注了主播', 'CommonActionSignalComment': '', 'CommonActionSignalLike': '点赞了❤', 'CommonActionSignalGift': '' } for a_payload in i.payload: # i.payload 是 repeated 类型 p.ParseFromString(a_payload) if i.signalType in u.keys(): user = p.userInfo.nickname content = u[i.signalType] if i.signalType == 'CommonActionSignalComment': content = p.content elif i.signalType == 'CommonActionSignalGift': content = '送出 ' + self.gift.get(p.giftId, '') msg = {'name': user, 'content': content, 'msg_type': 'danmaku'} msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/acfun_pb2.py ================================================ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: acfun.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='acfun.proto', package='AcFunPack', syntax='proto2', serialized_options=None, create_key=_descriptor._internal_create_key, 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' ) _REGISTERREQUEST_PRESENCESTATUS = _descriptor.EnumDescriptor( name='PresenceStatus', full_name='AcFunPack.RegisterRequest.PresenceStatus', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kPresenceOffline', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPresenceOnline', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=532, serialized_end=591, ) _sym_db.RegisterEnumDescriptor(_REGISTERREQUEST_PRESENCESTATUS) _REGISTERREQUEST_ACTIVESTATUS = _descriptor.EnumDescriptor( name='ActiveStatus', full_name='AcFunPack.RegisterRequest.ActiveStatus', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kInvalid', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kAppInForeground', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kAppInBackground', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=593, serialized_end=665, ) _sym_db.RegisterEnumDescriptor(_REGISTERREQUEST_ACTIVESTATUS) _ACCESSPOINT_ADDRESSTYPE = _descriptor.EnumDescriptor( name='AddressType', full_name='AcFunPack.AccessPoint.AddressType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kIPV4', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kIPV6', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kDomain', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=1207, serialized_end=1255, ) _sym_db.RegisterEnumDescriptor(_ACCESSPOINT_ADDRESSTYPE) _DEVICEINFO_PLATFORMTYPE = _descriptor.EnumDescriptor( name='PlatformType', full_name='AcFunPack.DeviceInfo.PlatformType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kInvalid', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kAndroid', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kiOS', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kWindows', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WECHAT_ANDROID', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='WECHAT_IOS', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='H5', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='H5_ANDROID', index=7, number=7, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='H5_IOS', index=8, number=8, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='H5_WINDOWS', index=9, number=9, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='H5_MAC', index=10, number=10, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPlatformNum', index=11, number=11, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=2102, serialized_end=2286, ) _sym_db.RegisterEnumDescriptor(_DEVICEINFO_PLATFORMTYPE) _ENVINFO_NETWORKTYPE = _descriptor.EnumDescriptor( name='NetworkType', full_name='AcFunPack.EnvInfo.NetworkType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kInvalid', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kWIFI', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kCellular', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=2370, serialized_end=2423, ) _sym_db.RegisterEnumDescriptor(_ENVINFO_NETWORKTYPE) _PUSHSERVICETOKEN_PUSHTYPE = _descriptor.EnumDescriptor( name='PushType', full_name='AcFunPack.PushServiceToken.PushType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kPushTypeInvalid', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeAPNS', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeXmPush', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeJgPush', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeGtPush', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeOpPush', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeVvPush', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeHwPush', index=7, number=7, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPushTypeFcm', index=8, number=8, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=2541, serialized_end=2736, ) _sym_db.RegisterEnumDescriptor(_PUSHSERVICETOKEN_PUSHTYPE) _PINGREQUEST_PINGTYPE = _descriptor.EnumDescriptor( name='PingType', full_name='AcFunPack.PingRequest.PingType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kInvalid', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPriorRegister', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kPostRegister', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=2993, serialized_end=3056, ) _sym_db.RegisterEnumDescriptor(_PINGREQUEST_PINGTYPE) _PACKETHEADER_FLAGS = _descriptor.EnumDescriptor( name='Flags', full_name='AcFunPack.PacketHeader.Flags', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kDirUpstream', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kDirDownstream', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kDirMask', index=2, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=b'\020\001', serialized_start=4427, serialized_end=4490, ) _sym_db.RegisterEnumDescriptor(_PACKETHEADER_FLAGS) _PACKETHEADER_ENCODINGTYPE = _descriptor.EnumDescriptor( name='EncodingType', full_name='AcFunPack.PacketHeader.EncodingType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kEncodingNone', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kEncodingLz4', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4492, serialized_end=4543, ) _sym_db.RegisterEnumDescriptor(_PACKETHEADER_ENCODINGTYPE) _PACKETHEADER_ENCRYPTIONMODE = _descriptor.EnumDescriptor( name='EncryptionMode', full_name='AcFunPack.PacketHeader.EncryptionMode', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kEncryptionNone', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kEncryptionServiceToken', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kEncryptionSessionKey', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4545, serialized_end=4638, ) _sym_db.RegisterEnumDescriptor(_PACKETHEADER_ENCRYPTIONMODE) _PACKETHEADER_FEATURE = _descriptor.EnumDescriptor( name='Feature', full_name='AcFunPack.PacketHeader.Feature', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kReserve', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kCompressLz4', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4640, serialized_end=4681, ) _sym_db.RegisterEnumDescriptor(_PACKETHEADER_FEATURE) _TOKENINFO_TOKENTYPE = _descriptor.EnumDescriptor( name='TokenType', full_name='AcFunPack.TokenInfo.TokenType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='kInvalid', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='kServiceToken', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=4762, serialized_end=4806, ) _sym_db.RegisterEnumDescriptor(_TOKENINFO_TOKENTYPE) _REGISTERREQUEST = _descriptor.Descriptor( name='RegisterRequest', full_name='AcFunPack.RegisterRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='appInfo', full_name='AcFunPack.RegisterRequest.appInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceInfo', full_name='AcFunPack.RegisterRequest.deviceInfo', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='envInfo', full_name='AcFunPack.RegisterRequest.envInfo', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='presenceStatus', full_name='AcFunPack.RegisterRequest.presenceStatus', index=3, number=4, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appActiveStatus', full_name='AcFunPack.RegisterRequest.appActiveStatus', index=4, number=5, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appCustomStatus', full_name='AcFunPack.RegisterRequest.appCustomStatus', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pushServiceToken', full_name='AcFunPack.RegisterRequest.pushServiceToken', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='instanceId', full_name='AcFunPack.RegisterRequest.instanceId', index=7, number=8, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pushServiceTokenList', full_name='AcFunPack.RegisterRequest.pushServiceTokenList', index=8, number=9, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='keepaliveIntervalSec', full_name='AcFunPack.RegisterRequest.keepaliveIntervalSec', index=9, number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ztCommonInfo', full_name='AcFunPack.RegisterRequest.ztCommonInfo', index=10, number=11, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _REGISTERREQUEST_PRESENCESTATUS, _REGISTERREQUEST_ACTIVESTATUS, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=27, serialized_end=665, ) _REGISTERRESPONSE = _descriptor.Descriptor( name='RegisterResponse', full_name='AcFunPack.RegisterResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='accessPointsConfig', full_name='AcFunPack.RegisterResponse.accessPointsConfig', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sessKey', full_name='AcFunPack.RegisterResponse.sessKey', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='instanceId', full_name='AcFunPack.RegisterResponse.instanceId', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sdkOption', full_name='AcFunPack.RegisterResponse.sdkOption', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='accessPointsConfigIpv6', full_name='AcFunPack.RegisterResponse.accessPointsConfigIpv6', index=4, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=668, serialized_end=886, ) _ACCESSPOINTSCONFIG = _descriptor.Descriptor( name='AccessPointsConfig', full_name='AcFunPack.AccessPointsConfig', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='optimalAps', full_name='AcFunPack.AccessPointsConfig.optimalAps', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='backupAps', full_name='AcFunPack.AccessPointsConfig.backupAps', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='availablePorts', full_name='AcFunPack.AccessPointsConfig.availablePorts', index=2, number=3, type=13, cpp_type=3, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='forceLastConnectedAp', full_name='AcFunPack.AccessPointsConfig.forceLastConnectedAp', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=889, serialized_end=1074, ) _ACCESSPOINT = _descriptor.Descriptor( name='AccessPoint', full_name='AcFunPack.AccessPoint', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='addressType', full_name='AcFunPack.AccessPoint.addressType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='port', full_name='AcFunPack.AccessPoint.port', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ipV4', full_name='AcFunPack.AccessPoint.ipV4', index=2, number=3, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ipV6', full_name='AcFunPack.AccessPoint.ipV6', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain', full_name='AcFunPack.AccessPoint.domain', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _ACCESSPOINT_ADDRESSTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1077, serialized_end=1255, ) _SDKOPTION = _descriptor.Descriptor( name='SdkOption', full_name='AcFunPack.SdkOption', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='reportIntervalSeconds', full_name='AcFunPack.SdkOption.reportIntervalSeconds', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='reportSecurity', full_name='AcFunPack.SdkOption.reportSecurity', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='lz4CompressionThresholdBytes', full_name='AcFunPack.SdkOption.lz4CompressionThresholdBytes', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='netCheckServers', full_name='AcFunPack.SdkOption.netCheckServers', index=3, number=4, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1258, serialized_end=1387, ) _ZTLIVECSENTERROOM = _descriptor.Descriptor( name='ZtLiveCsEnterRoom', full_name='AcFunPack.ZtLiveCsEnterRoom', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='isAuthor', full_name='AcFunPack.ZtLiveCsEnterRoom.isAuthor', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='reconnectCount', full_name='AcFunPack.ZtLiveCsEnterRoom.reconnectCount', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='lastErrorCode', full_name='AcFunPack.ZtLiveCsEnterRoom.lastErrorCode', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='enterRoomAttach', full_name='AcFunPack.ZtLiveCsEnterRoom.enterRoomAttach', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientLiveSdkVersion', full_name='AcFunPack.ZtLiveCsEnterRoom.clientLiveSdkVersion', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1390, serialized_end=1529, ) _ZTLIVECSHEARTBEAT = _descriptor.Descriptor( name='ZtLiveCsHeartbeat', full_name='AcFunPack.ZtLiveCsHeartbeat', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='clientTimestampMs', full_name='AcFunPack.ZtLiveCsHeartbeat.clientTimestampMs', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sequence', full_name='AcFunPack.ZtLiveCsHeartbeat.sequence', index=1, number=2, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1531, serialized_end=1595, ) _CSCMD = _descriptor.Descriptor( name='CsCmd', full_name='AcFunPack.CsCmd', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cmdType', full_name='AcFunPack.CsCmd.cmdType', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='AcFunPack.CsCmd.payload', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ticket', full_name='AcFunPack.CsCmd.ticket', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='liveId', full_name='AcFunPack.CsCmd.liveId', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1597, serialized_end=1670, ) _APPINFO_EXTENSIONINFOENTRY = _descriptor.Descriptor( name='ExtensionInfoEntry', full_name='AcFunPack.AppInfo.ExtensionInfoEntry', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='key', full_name='AcFunPack.AppInfo.ExtensionInfoEntry.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='value', full_name='AcFunPack.AppInfo.ExtensionInfoEntry.value', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'8\001', is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1823, serialized_end=1875, ) _APPINFO = _descriptor.Descriptor( name='AppInfo', full_name='AcFunPack.AppInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='appName', full_name='AcFunPack.AppInfo.appName', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appVersion', full_name='AcFunPack.AppInfo.appVersion', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appChannel', full_name='AcFunPack.AppInfo.appChannel', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sdkVersion', full_name='AcFunPack.AppInfo.sdkVersion', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='extensionInfo', full_name='AcFunPack.AppInfo.extensionInfo', index=4, number=5, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_APPINFO_EXTENSIONINFOENTRY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1673, serialized_end=1875, ) _DEVICEINFO = _descriptor.Descriptor( name='DeviceInfo', full_name='AcFunPack.DeviceInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='platformType', full_name='AcFunPack.DeviceInfo.platformType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='osVersion', full_name='AcFunPack.DeviceInfo.osVersion', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceModel', full_name='AcFunPack.DeviceInfo.deviceModel', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='imeiMd5', full_name='AcFunPack.DeviceInfo.imeiMd5', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceId', full_name='AcFunPack.DeviceInfo.deviceId', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='softDid', full_name='AcFunPack.DeviceInfo.softDid', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kwaiDid', full_name='AcFunPack.DeviceInfo.kwaiDid', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='manufacturer', full_name='AcFunPack.DeviceInfo.manufacturer', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceName', full_name='AcFunPack.DeviceInfo.deviceName', index=8, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _DEVICEINFO_PLATFORMTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1878, serialized_end=2286, ) _ENVINFO = _descriptor.Descriptor( name='EnvInfo', full_name='AcFunPack.EnvInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='networkType', full_name='AcFunPack.EnvInfo.networkType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='apnName', full_name='AcFunPack.EnvInfo.apnName', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _ENVINFO_NETWORKTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2289, serialized_end=2423, ) _PUSHSERVICETOKEN = _descriptor.Descriptor( name='PushServiceToken', full_name='AcFunPack.PushServiceToken', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='pushType', full_name='AcFunPack.PushServiceToken.pushType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='token', full_name='AcFunPack.PushServiceToken.token', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isPassThrough', full_name='AcFunPack.PushServiceToken.isPassThrough', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _PUSHSERVICETOKEN_PUSHTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2426, serialized_end=2736, ) _ZTCOMMONINFO = _descriptor.Descriptor( name='ZtCommonInfo', full_name='AcFunPack.ZtCommonInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='kpn', full_name='AcFunPack.ZtCommonInfo.kpn', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kpf', full_name='AcFunPack.ZtCommonInfo.kpf', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uid', full_name='AcFunPack.ZtCommonInfo.uid', index=2, number=4, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='did', full_name='AcFunPack.ZtCommonInfo.did', index=3, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2738, serialized_end=2804, ) _PINGRESPONSE = _descriptor.Descriptor( name='PingResponse', full_name='AcFunPack.PingResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='serverTimestamp', full_name='AcFunPack.PingResponse.serverTimestamp', index=0, number=1, type=15, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientIp', full_name='AcFunPack.PingResponse.clientIp', index=1, number=2, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='redirectIp', full_name='AcFunPack.PingResponse.redirectIp', index=2, number=3, type=7, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='redirectPort', full_name='AcFunPack.PingResponse.redirectPort', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2806, serialized_end=2905, ) _PINGREQUEST = _descriptor.Descriptor( name='PingRequest', full_name='AcFunPack.PingRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='pingType', full_name='AcFunPack.PingRequest.pingType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pingRound', full_name='AcFunPack.PingRequest.pingRound', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _PINGREQUEST_PINGTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2908, serialized_end=3056, ) _UPSTREAMPAYLOAD = _descriptor.Descriptor( name='UpstreamPayload', full_name='AcFunPack.UpstreamPayload', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='command', full_name='AcFunPack.UpstreamPayload.command', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='seqId', full_name='AcFunPack.UpstreamPayload.seqId', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='retryCount', full_name='AcFunPack.UpstreamPayload.retryCount', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payloadData', full_name='AcFunPack.UpstreamPayload.payloadData', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userInstance', full_name='AcFunPack.UpstreamPayload.userInstance', index=4, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='errorCode', full_name='AcFunPack.UpstreamPayload.errorCode', index=5, number=6, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='settingInfo', full_name='AcFunPack.UpstreamPayload.settingInfo', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='requestBasicInfo', full_name='AcFunPack.UpstreamPayload.requestBasicInfo', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='subBiz', full_name='AcFunPack.UpstreamPayload.subBiz', index=8, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='frontendInfo', full_name='AcFunPack.UpstreamPayload.frontendInfo', index=9, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kpn', full_name='AcFunPack.UpstreamPayload.kpn', index=10, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='anonymouseUser', full_name='AcFunPack.UpstreamPayload.anonymouseUser', index=11, number=12, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3059, serialized_end=3415, ) _DOWNSTREAMPAYLOAD = _descriptor.Descriptor( name='DownstreamPayload', full_name='AcFunPack.DownstreamPayload', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='command', full_name='AcFunPack.DownstreamPayload.command', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='seqId', full_name='AcFunPack.DownstreamPayload.seqId', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='errorCode', full_name='AcFunPack.DownstreamPayload.errorCode', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payloadData', full_name='AcFunPack.DownstreamPayload.payloadData', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='errorMsg', full_name='AcFunPack.DownstreamPayload.errorMsg', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='errorData', full_name='AcFunPack.DownstreamPayload.errorData', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='subBiz', full_name='AcFunPack.DownstreamPayload.subBiz', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3418, serialized_end=3562, ) _USERINSTANCE = _descriptor.Descriptor( name='UserInstance', full_name='AcFunPack.UserInstance', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='user', full_name='AcFunPack.UserInstance.user', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='instanceId', full_name='AcFunPack.UserInstance.instanceId', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3564, serialized_end=3629, ) _USER = _descriptor.Descriptor( name='User', full_name='AcFunPack.User', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='appId', full_name='AcFunPack.User.appId', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uid', full_name='AcFunPack.User.uid', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3631, serialized_end=3665, ) _SETTINGINFO = _descriptor.Descriptor( name='SettingInfo', full_name='AcFunPack.SettingInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='locale', full_name='AcFunPack.SettingInfo.locale', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='timezone', full_name='AcFunPack.SettingInfo.timezone', index=1, number=2, type=17, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3667, serialized_end=3714, ) _REQUSETBASICINFO = _descriptor.Descriptor( name='RequsetBasicInfo', full_name='AcFunPack.RequsetBasicInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='clientType', full_name='AcFunPack.RequsetBasicInfo.clientType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceId', full_name='AcFunPack.RequsetBasicInfo.deviceId', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientIp', full_name='AcFunPack.RequsetBasicInfo.clientIp', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appVersion', full_name='AcFunPack.RequsetBasicInfo.appVersion', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='channel', full_name='AcFunPack.RequsetBasicInfo.channel', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appInfo', full_name='AcFunPack.RequsetBasicInfo.appInfo', index=5, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceInfo', full_name='AcFunPack.RequsetBasicInfo.deviceInfo', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='envInfo', full_name='AcFunPack.RequsetBasicInfo.envInfo', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientPort', full_name='AcFunPack.RequsetBasicInfo.clientPort', index=8, number=9, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='location', full_name='AcFunPack.RequsetBasicInfo.location', index=9, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kpf', full_name='AcFunPack.RequsetBasicInfo.kpf', index=10, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3717, serialized_end=4032, ) _FRONTENDINFO = _descriptor.Descriptor( name='FrontendInfo', full_name='AcFunPack.FrontendInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='ip', full_name='AcFunPack.FrontendInfo.ip', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='port', full_name='AcFunPack.FrontendInfo.port', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4034, serialized_end=4074, ) _PACKETHEADER = _descriptor.Descriptor( name='PacketHeader', full_name='AcFunPack.PacketHeader', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='appId', full_name='AcFunPack.PacketHeader.appId', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uid', full_name='AcFunPack.PacketHeader.uid', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='instanceId', full_name='AcFunPack.PacketHeader.instanceId', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='flags', full_name='AcFunPack.PacketHeader.flags', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='encodingType', full_name='AcFunPack.PacketHeader.encodingType', index=4, number=6, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='decodedPayloadLen', full_name='AcFunPack.PacketHeader.decodedPayloadLen', index=5, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='encryptionMode', full_name='AcFunPack.PacketHeader.encryptionMode', index=6, number=8, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tokenInfo', full_name='AcFunPack.PacketHeader.tokenInfo', index=7, number=9, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='seqId', full_name='AcFunPack.PacketHeader.seqId', index=8, number=10, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='features', full_name='AcFunPack.PacketHeader.features', index=9, number=11, type=14, cpp_type=8, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kpn', full_name='AcFunPack.PacketHeader.kpn', index=10, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _PACKETHEADER_FLAGS, _PACKETHEADER_ENCODINGTYPE, _PACKETHEADER_ENCRYPTIONMODE, _PACKETHEADER_FEATURE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4077, serialized_end=4681, ) _TOKENINFO = _descriptor.Descriptor( name='TokenInfo', full_name='AcFunPack.TokenInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='tokenType', full_name='AcFunPack.TokenInfo.tokenType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='token', full_name='AcFunPack.TokenInfo.token', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _TOKENINFO_TOKENTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4683, serialized_end=4806, ) _KEEPALIVEREQUEST = _descriptor.Descriptor( name='KeepAliveRequest', full_name='AcFunPack.KeepAliveRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='presenceStatus', full_name='AcFunPack.KeepAliveRequest.presenceStatus', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appActiveStatus', full_name='AcFunPack.KeepAliveRequest.appActiveStatus', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pushServiceToken', full_name='AcFunPack.KeepAliveRequest.pushServiceToken', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pushServiceTokenList', full_name='AcFunPack.KeepAliveRequest.pushServiceTokenList', index=3, number=4, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='keepaliveIntervalSec', full_name='AcFunPack.KeepAliveRequest.keepaliveIntervalSec', index=4, number=5, type=5, cpp_type=1, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4809, serialized_end=5104, ) _ZTLIVESCMESSAGE = _descriptor.Descriptor( name='ZtLiveScMessage', full_name='AcFunPack.ZtLiveScMessage', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='messageType', full_name='AcFunPack.ZtLiveScMessage.messageType', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='compressionType', full_name='AcFunPack.ZtLiveScMessage.compressionType', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='AcFunPack.ZtLiveScMessage.payload', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='liveId', full_name='AcFunPack.ZtLiveScMessage.liveId', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ticket', full_name='AcFunPack.ZtLiveScMessage.ticket', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serverTimestampMs', full_name='AcFunPack.ZtLiveScMessage.serverTimestampMs', index=5, number=6, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5107, serialized_end=5246, ) _ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM = _descriptor.Descriptor( name='ZtLiveNotifySignalItem', full_name='AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='signalType', full_name='AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem.signalType', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem.payload', index=1, number=2, type=12, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5343, serialized_end=5404, ) _ZTLIVESCNOTIFYSIGNAL = _descriptor.Descriptor( name='ZtLiveScNotifySignal', full_name='AcFunPack.ZtLiveScNotifySignal', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='item', full_name='AcFunPack.ZtLiveScNotifySignal.item', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5249, serialized_end=5404, ) _ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM = _descriptor.Descriptor( name='ZtLiveActionSignalItem', full_name='AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='signalType', full_name='AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem.signalType', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem.payload', index=1, number=2, type=12, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5501, serialized_end=5562, ) _ZTLIVESCACTIONSIGNAL = _descriptor.Descriptor( name='ZtLiveScActionSignal', full_name='AcFunPack.ZtLiveScActionSignal', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='item', full_name='AcFunPack.ZtLiveScActionSignal.item', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5407, serialized_end=5562, ) _ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM = _descriptor.Descriptor( name='ZtLiveStateSignalItem', full_name='AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='signalType', full_name='AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem.signalType', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem.payload', index=1, number=2, type=12, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5656, serialized_end=5716, ) _ZTLIVESCSTATESIGNAL = _descriptor.Descriptor( name='ZtLiveScStateSignal', full_name='AcFunPack.ZtLiveScStateSignal', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='item', full_name='AcFunPack.ZtLiveScStateSignal.item', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5565, serialized_end=5716, ) _ZTLIVESCSTATUSCHANGED_BANNEDINFO = _descriptor.Descriptor( name='BannedInfo', full_name='AcFunPack.ZtLiveScStatusChanged.BannedInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='banReason', full_name='AcFunPack.ZtLiveScStatusChanged.BannedInfo.banReason', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5849, serialized_end=5880, ) _ZTLIVESCSTATUSCHANGED = _descriptor.Descriptor( name='ZtLiveScStatusChanged', full_name='AcFunPack.ZtLiveScStatusChanged', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='type', full_name='AcFunPack.ZtLiveScStatusChanged.type', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='maxRandomDelayMs', full_name='AcFunPack.ZtLiveScStatusChanged.maxRandomDelayMs', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bannedInfo', full_name='AcFunPack.ZtLiveScStatusChanged.bannedInfo', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_ZTLIVESCSTATUSCHANGED_BANNEDINFO, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5719, serialized_end=5880, ) _COMMONACTIONSIGNALCOMMENT = _descriptor.Descriptor( name='CommonActionSignalComment', full_name='AcFunPack.CommonActionSignalComment', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='content', full_name='AcFunPack.CommonActionSignalComment.content', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendTimeMs', full_name='AcFunPack.CommonActionSignalComment.sendTimeMs', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonActionSignalComment.userInfo', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5882, serialized_end=5991, ) _COMMONACTIONSIGNALLIKE = _descriptor.Descriptor( name='CommonActionSignalLike', full_name='AcFunPack.CommonActionSignalLike', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonActionSignalLike.userInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendTimeMs', full_name='AcFunPack.CommonActionSignalLike.sendTimeMs', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5993, serialized_end=6082, ) _COMMONACTIONSIGNALGIFT = _descriptor.Descriptor( name='CommonActionSignalGift', full_name='AcFunPack.CommonActionSignalGift', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonActionSignalGift.userInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendTimeMs', full_name='AcFunPack.CommonActionSignalGift.sendTimeMs', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftId', full_name='AcFunPack.CommonActionSignalGift.giftId', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='batchSize', full_name='AcFunPack.CommonActionSignalGift.batchSize', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='comboCount', full_name='AcFunPack.CommonActionSignalGift.comboCount', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rank', full_name='AcFunPack.CommonActionSignalGift.rank', index=5, number=6, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='comboKey', full_name='AcFunPack.CommonActionSignalGift.comboKey', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='slotDisplayDurationMs', full_name='AcFunPack.CommonActionSignalGift.slotDisplayDurationMs', index=7, number=8, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='expireDurationMs', full_name='AcFunPack.CommonActionSignalGift.expireDurationMs', index=8, number=9, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6085, serialized_end=6318, ) _COMMONSTATESIGNALDISPLAYINFO = _descriptor.Descriptor( name='CommonStateSignalDisplayInfo', full_name='AcFunPack.CommonStateSignalDisplayInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='watchingCount', full_name='AcFunPack.CommonStateSignalDisplayInfo.watchingCount', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='likeCount', full_name='AcFunPack.CommonStateSignalDisplayInfo.likeCount', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='likeDelta', full_name='AcFunPack.CommonStateSignalDisplayInfo.likeDelta', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6320, serialized_end=6411, ) _COMMONSTATESIGNALTOPUSERS_TOPUSER = _descriptor.Descriptor( name='TopUser', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.userInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='customWatchingListData', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.customWatchingListData', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='displaySendAmount', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.displaySendAmount', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='anonymousUser', full_name='AcFunPack.CommonStateSignalTopUsers.TopUser.anonymousUser', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6507, serialized_end=6643, ) _COMMONSTATESIGNALTOPUSERS = _descriptor.Descriptor( name='CommonStateSignalTopUsers', full_name='AcFunPack.CommonStateSignalTopUsers', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='topUser', full_name='AcFunPack.CommonStateSignalTopUsers.topUser', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_COMMONSTATESIGNALTOPUSERS_TOPUSER, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6414, serialized_end=6643, ) _COMMONACTIONSIGNALUSERENTERROOM = _descriptor.Descriptor( name='CommonActionSignalUserEnterRoom', full_name='AcFunPack.CommonActionSignalUserEnterRoom', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonActionSignalUserEnterRoom.userInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendTimeMs', full_name='AcFunPack.CommonActionSignalUserEnterRoom.sendTimeMs', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6645, serialized_end=6743, ) _COMMONACTIONSIGNALUSERFOLLOWAUTHOR = _descriptor.Descriptor( name='CommonActionSignalUserFollowAuthor', full_name='AcFunPack.CommonActionSignalUserFollowAuthor', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonActionSignalUserFollowAuthor.userInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendTimeMs', full_name='AcFunPack.CommonActionSignalUserFollowAuthor.sendTimeMs', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6745, serialized_end=6846, ) _COMMONACTIONSIGNALRICHTEXT = _descriptor.Descriptor( name='CommonActionSignalRichText', full_name='AcFunPack.CommonActionSignalRichText', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userInfo', full_name='AcFunPack.CommonActionSignalRichText.userInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='plain', full_name='AcFunPack.CommonActionSignalRichText.plain', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='image', full_name='AcFunPack.CommonActionSignalRichText.image', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6849, serialized_end=7003, ) _USERINFOSEGMENT = _descriptor.Descriptor( name='UserInfoSegment', full_name='AcFunPack.UserInfoSegment', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='user', full_name='AcFunPack.UserInfoSegment.user', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='color', full_name='AcFunPack.UserInfoSegment.color', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7005, serialized_end=7078, ) _PLAINSEGMENT = _descriptor.Descriptor( name='PlainSegment', full_name='AcFunPack.PlainSegment', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='text', full_name='AcFunPack.PlainSegment.text', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='color', full_name='AcFunPack.PlainSegment.color', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7080, serialized_end=7123, ) _IMAGESEGMENT = _descriptor.Descriptor( name='ImageSegment', full_name='AcFunPack.ImageSegment', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cdnNode', full_name='AcFunPack.ImageSegment.cdnNode', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='alternativeText', full_name='AcFunPack.ImageSegment.alternativeText', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='alternativeColor', full_name='AcFunPack.ImageSegment.alternativeColor', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7125, serialized_end=7232, ) _COMMONNOTIFYSIGNALKICKEDOUT = _descriptor.Descriptor( name='CommonNotifySignalKickedOut', full_name='AcFunPack.CommonNotifySignalKickedOut', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='reason', full_name='AcFunPack.CommonNotifySignalKickedOut.reason', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7234, serialized_end=7279, ) _COMMONNOTIFYSIGNALVIOLATIONALERT = _descriptor.Descriptor( name='CommonNotifySignalViolationAlert', full_name='AcFunPack.CommonNotifySignalViolationAlert', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='violationContent', full_name='AcFunPack.CommonNotifySignalViolationAlert.violationContent', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7281, serialized_end=7341, ) _COMMONSTATESIGNALCURRENTREDPACKLIST = _descriptor.Descriptor( name='CommonStateSignalCurrentRedpackList', full_name='AcFunPack.CommonStateSignalCurrentRedpackList', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7343, serialized_end=7380, ) _COMMONSTATESIGNALRECENTCOMMENT = _descriptor.Descriptor( name='CommonStateSignalRecentComment', full_name='AcFunPack.CommonStateSignalRecentComment', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='comment', full_name='AcFunPack.CommonStateSignalRecentComment.comment', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7382, serialized_end=7469, ) _COMMONSTATESIGNALCHATREADY = _descriptor.Descriptor( name='CommonStateSignalChatReady', full_name='AcFunPack.CommonStateSignalChatReady', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='chatId', full_name='AcFunPack.CommonStateSignalChatReady.chatId', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='guestUserInfo', full_name='AcFunPack.CommonStateSignalChatReady.guestUserInfo', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='mediaType', full_name='AcFunPack.CommonStateSignalChatReady.mediaType', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7471, serialized_end=7584, ) _COMMONSTATESIGNALCHATEND = _descriptor.Descriptor( name='CommonStateSignalChatEnd', full_name='AcFunPack.CommonStateSignalChatEnd', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='chatId', full_name='AcFunPack.CommonStateSignalChatEnd.chatId', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='endType', full_name='AcFunPack.CommonStateSignalChatEnd.endType', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7586, serialized_end=7645, ) _ACFUNACTIONSIGNALTHROWBANANA = _descriptor.Descriptor( name='AcfunActionSignalThrowBanana', full_name='AcFunPack.AcfunActionSignalThrowBanana', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='visitor', full_name='AcFunPack.AcfunActionSignalThrowBanana.visitor', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='count', full_name='AcFunPack.AcfunActionSignalThrowBanana.count', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendTimeMs', full_name='AcFunPack.AcfunActionSignalThrowBanana.sendTimeMs', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7647, serialized_end=7750, ) _ACFUNSTATESIGNALDISPLAYINFO = _descriptor.Descriptor( name='AcfunStateSignalDisplayInfo', full_name='AcFunPack.AcfunStateSignalDisplayInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='bananaCount', full_name='AcFunPack.AcfunStateSignalDisplayInfo.bananaCount', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7752, serialized_end=7802, ) _ACFUNACTIONSIGNALJOINCLUB = _descriptor.Descriptor( name='AcfunActionSignalJoinClub', full_name='AcFunPack.AcfunActionSignalJoinClub', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='fansInfo', full_name='AcFunPack.AcfunActionSignalJoinClub.fansInfo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uperInfo', full_name='AcFunPack.AcfunActionSignalJoinClub.uperInfo', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='joinTimeMs', full_name='AcFunPack.AcfunActionSignalJoinClub.joinTimeMs', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7804, serialized_end=7929, ) _ZTLIVEUSERINFO = _descriptor.Descriptor( name='ZtLiveUserInfo', full_name='AcFunPack.ZtLiveUserInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userId', full_name='AcFunPack.ZtLiveUserInfo.userId', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='nickname', full_name='AcFunPack.ZtLiveUserInfo.nickname', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='avatar', full_name='AcFunPack.ZtLiveUserInfo.avatar', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7931, serialized_end=8022, ) _IMAGECDNNODE = _descriptor.Descriptor( name='ImageCdnNode', full_name='AcFunPack.ImageCdnNode', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cdn', full_name='AcFunPack.ImageCdnNode.cdn', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='url', full_name='AcFunPack.ImageCdnNode.url', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='urlPattern', full_name='AcFunPack.ImageCdnNode.urlPattern', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8024, serialized_end=8084, ) _USERINFO = _descriptor.Descriptor( name='UserInfo', full_name='AcFunPack.UserInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userId', full_name='AcFunPack.UserInfo.userId', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='name', full_name='AcFunPack.UserInfo.name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8086, serialized_end=8126, ) _REGISTERREQUEST.fields_by_name['appInfo'].message_type = _APPINFO _REGISTERREQUEST.fields_by_name['deviceInfo'].message_type = _DEVICEINFO _REGISTERREQUEST.fields_by_name['envInfo'].message_type = _ENVINFO _REGISTERREQUEST.fields_by_name['presenceStatus'].enum_type = _REGISTERREQUEST_PRESENCESTATUS _REGISTERREQUEST.fields_by_name['appActiveStatus'].enum_type = _REGISTERREQUEST_ACTIVESTATUS _REGISTERREQUEST.fields_by_name['pushServiceToken'].message_type = _PUSHSERVICETOKEN _REGISTERREQUEST.fields_by_name['pushServiceTokenList'].message_type = _PUSHSERVICETOKEN _REGISTERREQUEST.fields_by_name['ztCommonInfo'].message_type = _ZTCOMMONINFO _REGISTERREQUEST_PRESENCESTATUS.containing_type = _REGISTERREQUEST _REGISTERREQUEST_ACTIVESTATUS.containing_type = _REGISTERREQUEST _REGISTERRESPONSE.fields_by_name['accessPointsConfig'].message_type = _ACCESSPOINTSCONFIG _REGISTERRESPONSE.fields_by_name['sdkOption'].message_type = _SDKOPTION _REGISTERRESPONSE.fields_by_name['accessPointsConfigIpv6'].message_type = _ACCESSPOINTSCONFIG _ACCESSPOINTSCONFIG.fields_by_name['optimalAps'].message_type = _ACCESSPOINT _ACCESSPOINTSCONFIG.fields_by_name['backupAps'].message_type = _ACCESSPOINT _ACCESSPOINTSCONFIG.fields_by_name['forceLastConnectedAp'].message_type = _ACCESSPOINT _ACCESSPOINT.fields_by_name['addressType'].enum_type = _ACCESSPOINT_ADDRESSTYPE _ACCESSPOINT_ADDRESSTYPE.containing_type = _ACCESSPOINT _APPINFO_EXTENSIONINFOENTRY.containing_type = _APPINFO _APPINFO.fields_by_name['extensionInfo'].message_type = _APPINFO_EXTENSIONINFOENTRY _DEVICEINFO.fields_by_name['platformType'].enum_type = _DEVICEINFO_PLATFORMTYPE _DEVICEINFO_PLATFORMTYPE.containing_type = _DEVICEINFO _ENVINFO.fields_by_name['networkType'].enum_type = _ENVINFO_NETWORKTYPE _ENVINFO_NETWORKTYPE.containing_type = _ENVINFO _PUSHSERVICETOKEN.fields_by_name['pushType'].enum_type = _PUSHSERVICETOKEN_PUSHTYPE _PUSHSERVICETOKEN_PUSHTYPE.containing_type = _PUSHSERVICETOKEN _PINGREQUEST.fields_by_name['pingType'].enum_type = _PINGREQUEST_PINGTYPE _PINGREQUEST_PINGTYPE.containing_type = _PINGREQUEST _UPSTREAMPAYLOAD.fields_by_name['userInstance'].message_type = _USERINSTANCE _UPSTREAMPAYLOAD.fields_by_name['settingInfo'].message_type = _SETTINGINFO _UPSTREAMPAYLOAD.fields_by_name['requestBasicInfo'].message_type = _REQUSETBASICINFO _UPSTREAMPAYLOAD.fields_by_name['frontendInfo'].message_type = _FRONTENDINFO _USERINSTANCE.fields_by_name['user'].message_type = _USER _REQUSETBASICINFO.fields_by_name['clientType'].enum_type = _DEVICEINFO_PLATFORMTYPE _REQUSETBASICINFO.fields_by_name['appInfo'].message_type = _APPINFO _REQUSETBASICINFO.fields_by_name['deviceInfo'].message_type = _DEVICEINFO _REQUSETBASICINFO.fields_by_name['envInfo'].message_type = _ENVINFO _PACKETHEADER.fields_by_name['encodingType'].enum_type = _PACKETHEADER_ENCODINGTYPE _PACKETHEADER.fields_by_name['encryptionMode'].enum_type = _PACKETHEADER_ENCRYPTIONMODE _PACKETHEADER.fields_by_name['tokenInfo'].message_type = _TOKENINFO _PACKETHEADER.fields_by_name['features'].enum_type = _PACKETHEADER_FEATURE _PACKETHEADER_FLAGS.containing_type = _PACKETHEADER _PACKETHEADER_ENCODINGTYPE.containing_type = _PACKETHEADER _PACKETHEADER_ENCRYPTIONMODE.containing_type = _PACKETHEADER _PACKETHEADER_FEATURE.containing_type = _PACKETHEADER _TOKENINFO.fields_by_name['tokenType'].enum_type = _TOKENINFO_TOKENTYPE _TOKENINFO_TOKENTYPE.containing_type = _TOKENINFO _KEEPALIVEREQUEST.fields_by_name['presenceStatus'].enum_type = _REGISTERREQUEST_PRESENCESTATUS _KEEPALIVEREQUEST.fields_by_name['appActiveStatus'].enum_type = _REGISTERREQUEST_ACTIVESTATUS _KEEPALIVEREQUEST.fields_by_name['pushServiceToken'].message_type = _PUSHSERVICETOKEN _KEEPALIVEREQUEST.fields_by_name['pushServiceTokenList'].message_type = _PUSHSERVICETOKEN _ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM.containing_type = _ZTLIVESCNOTIFYSIGNAL _ZTLIVESCNOTIFYSIGNAL.fields_by_name['item'].message_type = _ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM _ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM.containing_type = _ZTLIVESCACTIONSIGNAL _ZTLIVESCACTIONSIGNAL.fields_by_name['item'].message_type = _ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM _ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM.containing_type = _ZTLIVESCSTATESIGNAL _ZTLIVESCSTATESIGNAL.fields_by_name['item'].message_type = _ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM _ZTLIVESCSTATUSCHANGED_BANNEDINFO.containing_type = _ZTLIVESCSTATUSCHANGED _ZTLIVESCSTATUSCHANGED.fields_by_name['bannedInfo'].message_type = _ZTLIVESCSTATUSCHANGED_BANNEDINFO _COMMONACTIONSIGNALCOMMENT.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO _COMMONACTIONSIGNALLIKE.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO _COMMONACTIONSIGNALGIFT.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO _COMMONSTATESIGNALTOPUSERS_TOPUSER.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO _COMMONSTATESIGNALTOPUSERS_TOPUSER.containing_type = _COMMONSTATESIGNALTOPUSERS _COMMONSTATESIGNALTOPUSERS.fields_by_name['topUser'].message_type = _COMMONSTATESIGNALTOPUSERS_TOPUSER _COMMONACTIONSIGNALUSERENTERROOM.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO _COMMONACTIONSIGNALUSERFOLLOWAUTHOR.fields_by_name['userInfo'].message_type = _ZTLIVEUSERINFO _COMMONACTIONSIGNALRICHTEXT.fields_by_name['userInfo'].message_type = _USERINFOSEGMENT _COMMONACTIONSIGNALRICHTEXT.fields_by_name['plain'].message_type = _PLAINSEGMENT _COMMONACTIONSIGNALRICHTEXT.fields_by_name['image'].message_type = _IMAGESEGMENT _USERINFOSEGMENT.fields_by_name['user'].message_type = _ZTLIVEUSERINFO _IMAGESEGMENT.fields_by_name['cdnNode'].message_type = _IMAGECDNNODE _COMMONSTATESIGNALRECENTCOMMENT.fields_by_name['comment'].message_type = _COMMONACTIONSIGNALCOMMENT _COMMONSTATESIGNALCHATREADY.fields_by_name['guestUserInfo'].message_type = _ZTLIVEUSERINFO _ACFUNACTIONSIGNALTHROWBANANA.fields_by_name['visitor'].message_type = _USERINFO _ACFUNACTIONSIGNALJOINCLUB.fields_by_name['fansInfo'].message_type = _USERINFO _ACFUNACTIONSIGNALJOINCLUB.fields_by_name['uperInfo'].message_type = _USERINFO _ZTLIVEUSERINFO.fields_by_name['avatar'].message_type = _IMAGECDNNODE DESCRIPTOR.message_types_by_name['RegisterRequest'] = _REGISTERREQUEST DESCRIPTOR.message_types_by_name['RegisterResponse'] = _REGISTERRESPONSE DESCRIPTOR.message_types_by_name['AccessPointsConfig'] = _ACCESSPOINTSCONFIG DESCRIPTOR.message_types_by_name['AccessPoint'] = _ACCESSPOINT DESCRIPTOR.message_types_by_name['SdkOption'] = _SDKOPTION DESCRIPTOR.message_types_by_name['ZtLiveCsEnterRoom'] = _ZTLIVECSENTERROOM DESCRIPTOR.message_types_by_name['ZtLiveCsHeartbeat'] = _ZTLIVECSHEARTBEAT DESCRIPTOR.message_types_by_name['CsCmd'] = _CSCMD DESCRIPTOR.message_types_by_name['AppInfo'] = _APPINFO DESCRIPTOR.message_types_by_name['DeviceInfo'] = _DEVICEINFO DESCRIPTOR.message_types_by_name['EnvInfo'] = _ENVINFO DESCRIPTOR.message_types_by_name['PushServiceToken'] = _PUSHSERVICETOKEN DESCRIPTOR.message_types_by_name['ZtCommonInfo'] = _ZTCOMMONINFO DESCRIPTOR.message_types_by_name['PingResponse'] = _PINGRESPONSE DESCRIPTOR.message_types_by_name['PingRequest'] = _PINGREQUEST DESCRIPTOR.message_types_by_name['UpstreamPayload'] = _UPSTREAMPAYLOAD DESCRIPTOR.message_types_by_name['DownstreamPayload'] = _DOWNSTREAMPAYLOAD DESCRIPTOR.message_types_by_name['UserInstance'] = _USERINSTANCE DESCRIPTOR.message_types_by_name['User'] = _USER DESCRIPTOR.message_types_by_name['SettingInfo'] = _SETTINGINFO DESCRIPTOR.message_types_by_name['RequsetBasicInfo'] = _REQUSETBASICINFO DESCRIPTOR.message_types_by_name['FrontendInfo'] = _FRONTENDINFO DESCRIPTOR.message_types_by_name['PacketHeader'] = _PACKETHEADER DESCRIPTOR.message_types_by_name['TokenInfo'] = _TOKENINFO DESCRIPTOR.message_types_by_name['KeepAliveRequest'] = _KEEPALIVEREQUEST DESCRIPTOR.message_types_by_name['ZtLiveScMessage'] = _ZTLIVESCMESSAGE DESCRIPTOR.message_types_by_name['ZtLiveScNotifySignal'] = _ZTLIVESCNOTIFYSIGNAL DESCRIPTOR.message_types_by_name['ZtLiveScActionSignal'] = _ZTLIVESCACTIONSIGNAL DESCRIPTOR.message_types_by_name['ZtLiveScStateSignal'] = _ZTLIVESCSTATESIGNAL DESCRIPTOR.message_types_by_name['ZtLiveScStatusChanged'] = _ZTLIVESCSTATUSCHANGED DESCRIPTOR.message_types_by_name['CommonActionSignalComment'] = _COMMONACTIONSIGNALCOMMENT DESCRIPTOR.message_types_by_name['CommonActionSignalLike'] = _COMMONACTIONSIGNALLIKE DESCRIPTOR.message_types_by_name['CommonActionSignalGift'] = _COMMONACTIONSIGNALGIFT DESCRIPTOR.message_types_by_name['CommonStateSignalDisplayInfo'] = _COMMONSTATESIGNALDISPLAYINFO DESCRIPTOR.message_types_by_name['CommonStateSignalTopUsers'] = _COMMONSTATESIGNALTOPUSERS DESCRIPTOR.message_types_by_name['CommonActionSignalUserEnterRoom'] = _COMMONACTIONSIGNALUSERENTERROOM DESCRIPTOR.message_types_by_name['CommonActionSignalUserFollowAuthor'] = _COMMONACTIONSIGNALUSERFOLLOWAUTHOR DESCRIPTOR.message_types_by_name['CommonActionSignalRichText'] = _COMMONACTIONSIGNALRICHTEXT DESCRIPTOR.message_types_by_name['UserInfoSegment'] = _USERINFOSEGMENT DESCRIPTOR.message_types_by_name['PlainSegment'] = _PLAINSEGMENT DESCRIPTOR.message_types_by_name['ImageSegment'] = _IMAGESEGMENT DESCRIPTOR.message_types_by_name['CommonNotifySignalKickedOut'] = _COMMONNOTIFYSIGNALKICKEDOUT DESCRIPTOR.message_types_by_name['CommonNotifySignalViolationAlert'] = _COMMONNOTIFYSIGNALVIOLATIONALERT DESCRIPTOR.message_types_by_name['CommonStateSignalCurrentRedpackList'] = _COMMONSTATESIGNALCURRENTREDPACKLIST DESCRIPTOR.message_types_by_name['CommonStateSignalRecentComment'] = _COMMONSTATESIGNALRECENTCOMMENT DESCRIPTOR.message_types_by_name['CommonStateSignalChatReady'] = _COMMONSTATESIGNALCHATREADY DESCRIPTOR.message_types_by_name['CommonStateSignalChatEnd'] = _COMMONSTATESIGNALCHATEND DESCRIPTOR.message_types_by_name['AcfunActionSignalThrowBanana'] = _ACFUNACTIONSIGNALTHROWBANANA DESCRIPTOR.message_types_by_name['AcfunStateSignalDisplayInfo'] = _ACFUNSTATESIGNALDISPLAYINFO DESCRIPTOR.message_types_by_name['AcfunActionSignalJoinClub'] = _ACFUNACTIONSIGNALJOINCLUB DESCRIPTOR.message_types_by_name['ZtLiveUserInfo'] = _ZTLIVEUSERINFO DESCRIPTOR.message_types_by_name['ImageCdnNode'] = _IMAGECDNNODE DESCRIPTOR.message_types_by_name['UserInfo'] = _USERINFO _sym_db.RegisterFileDescriptor(DESCRIPTOR) RegisterRequest = _reflection.GeneratedProtocolMessageType('RegisterRequest', (_message.Message,), { 'DESCRIPTOR' : _REGISTERREQUEST, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.RegisterRequest) }) _sym_db.RegisterMessage(RegisterRequest) RegisterResponse = _reflection.GeneratedProtocolMessageType('RegisterResponse', (_message.Message,), { 'DESCRIPTOR' : _REGISTERRESPONSE, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.RegisterResponse) }) _sym_db.RegisterMessage(RegisterResponse) AccessPointsConfig = _reflection.GeneratedProtocolMessageType('AccessPointsConfig', (_message.Message,), { 'DESCRIPTOR' : _ACCESSPOINTSCONFIG, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AccessPointsConfig) }) _sym_db.RegisterMessage(AccessPointsConfig) AccessPoint = _reflection.GeneratedProtocolMessageType('AccessPoint', (_message.Message,), { 'DESCRIPTOR' : _ACCESSPOINT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AccessPoint) }) _sym_db.RegisterMessage(AccessPoint) SdkOption = _reflection.GeneratedProtocolMessageType('SdkOption', (_message.Message,), { 'DESCRIPTOR' : _SDKOPTION, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.SdkOption) }) _sym_db.RegisterMessage(SdkOption) ZtLiveCsEnterRoom = _reflection.GeneratedProtocolMessageType('ZtLiveCsEnterRoom', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVECSENTERROOM, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveCsEnterRoom) }) _sym_db.RegisterMessage(ZtLiveCsEnterRoom) ZtLiveCsHeartbeat = _reflection.GeneratedProtocolMessageType('ZtLiveCsHeartbeat', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVECSHEARTBEAT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveCsHeartbeat) }) _sym_db.RegisterMessage(ZtLiveCsHeartbeat) CsCmd = _reflection.GeneratedProtocolMessageType('CsCmd', (_message.Message,), { 'DESCRIPTOR' : _CSCMD, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CsCmd) }) _sym_db.RegisterMessage(CsCmd) AppInfo = _reflection.GeneratedProtocolMessageType('AppInfo', (_message.Message,), { 'ExtensionInfoEntry' : _reflection.GeneratedProtocolMessageType('ExtensionInfoEntry', (_message.Message,), { 'DESCRIPTOR' : _APPINFO_EXTENSIONINFOENTRY, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AppInfo.ExtensionInfoEntry) }) , 'DESCRIPTOR' : _APPINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AppInfo) }) _sym_db.RegisterMessage(AppInfo) _sym_db.RegisterMessage(AppInfo.ExtensionInfoEntry) DeviceInfo = _reflection.GeneratedProtocolMessageType('DeviceInfo', (_message.Message,), { 'DESCRIPTOR' : _DEVICEINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.DeviceInfo) }) _sym_db.RegisterMessage(DeviceInfo) EnvInfo = _reflection.GeneratedProtocolMessageType('EnvInfo', (_message.Message,), { 'DESCRIPTOR' : _ENVINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.EnvInfo) }) _sym_db.RegisterMessage(EnvInfo) PushServiceToken = _reflection.GeneratedProtocolMessageType('PushServiceToken', (_message.Message,), { 'DESCRIPTOR' : _PUSHSERVICETOKEN, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.PushServiceToken) }) _sym_db.RegisterMessage(PushServiceToken) ZtCommonInfo = _reflection.GeneratedProtocolMessageType('ZtCommonInfo', (_message.Message,), { 'DESCRIPTOR' : _ZTCOMMONINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtCommonInfo) }) _sym_db.RegisterMessage(ZtCommonInfo) PingResponse = _reflection.GeneratedProtocolMessageType('PingResponse', (_message.Message,), { 'DESCRIPTOR' : _PINGRESPONSE, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.PingResponse) }) _sym_db.RegisterMessage(PingResponse) PingRequest = _reflection.GeneratedProtocolMessageType('PingRequest', (_message.Message,), { 'DESCRIPTOR' : _PINGREQUEST, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.PingRequest) }) _sym_db.RegisterMessage(PingRequest) UpstreamPayload = _reflection.GeneratedProtocolMessageType('UpstreamPayload', (_message.Message,), { 'DESCRIPTOR' : _UPSTREAMPAYLOAD, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.UpstreamPayload) }) _sym_db.RegisterMessage(UpstreamPayload) DownstreamPayload = _reflection.GeneratedProtocolMessageType('DownstreamPayload', (_message.Message,), { 'DESCRIPTOR' : _DOWNSTREAMPAYLOAD, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.DownstreamPayload) }) _sym_db.RegisterMessage(DownstreamPayload) UserInstance = _reflection.GeneratedProtocolMessageType('UserInstance', (_message.Message,), { 'DESCRIPTOR' : _USERINSTANCE, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.UserInstance) }) _sym_db.RegisterMessage(UserInstance) User = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), { 'DESCRIPTOR' : _USER, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.User) }) _sym_db.RegisterMessage(User) SettingInfo = _reflection.GeneratedProtocolMessageType('SettingInfo', (_message.Message,), { 'DESCRIPTOR' : _SETTINGINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.SettingInfo) }) _sym_db.RegisterMessage(SettingInfo) RequsetBasicInfo = _reflection.GeneratedProtocolMessageType('RequsetBasicInfo', (_message.Message,), { 'DESCRIPTOR' : _REQUSETBASICINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.RequsetBasicInfo) }) _sym_db.RegisterMessage(RequsetBasicInfo) FrontendInfo = _reflection.GeneratedProtocolMessageType('FrontendInfo', (_message.Message,), { 'DESCRIPTOR' : _FRONTENDINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.FrontendInfo) }) _sym_db.RegisterMessage(FrontendInfo) PacketHeader = _reflection.GeneratedProtocolMessageType('PacketHeader', (_message.Message,), { 'DESCRIPTOR' : _PACKETHEADER, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.PacketHeader) }) _sym_db.RegisterMessage(PacketHeader) TokenInfo = _reflection.GeneratedProtocolMessageType('TokenInfo', (_message.Message,), { 'DESCRIPTOR' : _TOKENINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.TokenInfo) }) _sym_db.RegisterMessage(TokenInfo) KeepAliveRequest = _reflection.GeneratedProtocolMessageType('KeepAliveRequest', (_message.Message,), { 'DESCRIPTOR' : _KEEPALIVEREQUEST, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.KeepAliveRequest) }) _sym_db.RegisterMessage(KeepAliveRequest) ZtLiveScMessage = _reflection.GeneratedProtocolMessageType('ZtLiveScMessage', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVESCMESSAGE, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScMessage) }) _sym_db.RegisterMessage(ZtLiveScMessage) ZtLiveScNotifySignal = _reflection.GeneratedProtocolMessageType('ZtLiveScNotifySignal', (_message.Message,), { 'ZtLiveNotifySignalItem' : _reflection.GeneratedProtocolMessageType('ZtLiveNotifySignalItem', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVESCNOTIFYSIGNAL_ZTLIVENOTIFYSIGNALITEM, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScNotifySignal.ZtLiveNotifySignalItem) }) , 'DESCRIPTOR' : _ZTLIVESCNOTIFYSIGNAL, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScNotifySignal) }) _sym_db.RegisterMessage(ZtLiveScNotifySignal) _sym_db.RegisterMessage(ZtLiveScNotifySignal.ZtLiveNotifySignalItem) ZtLiveScActionSignal = _reflection.GeneratedProtocolMessageType('ZtLiveScActionSignal', (_message.Message,), { 'ZtLiveActionSignalItem' : _reflection.GeneratedProtocolMessageType('ZtLiveActionSignalItem', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVESCACTIONSIGNAL_ZTLIVEACTIONSIGNALITEM, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScActionSignal.ZtLiveActionSignalItem) }) , 'DESCRIPTOR' : _ZTLIVESCACTIONSIGNAL, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScActionSignal) }) _sym_db.RegisterMessage(ZtLiveScActionSignal) _sym_db.RegisterMessage(ZtLiveScActionSignal.ZtLiveActionSignalItem) ZtLiveScStateSignal = _reflection.GeneratedProtocolMessageType('ZtLiveScStateSignal', (_message.Message,), { 'ZtLiveStateSignalItem' : _reflection.GeneratedProtocolMessageType('ZtLiveStateSignalItem', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVESCSTATESIGNAL_ZTLIVESTATESIGNALITEM, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStateSignal.ZtLiveStateSignalItem) }) , 'DESCRIPTOR' : _ZTLIVESCSTATESIGNAL, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStateSignal) }) _sym_db.RegisterMessage(ZtLiveScStateSignal) _sym_db.RegisterMessage(ZtLiveScStateSignal.ZtLiveStateSignalItem) ZtLiveScStatusChanged = _reflection.GeneratedProtocolMessageType('ZtLiveScStatusChanged', (_message.Message,), { 'BannedInfo' : _reflection.GeneratedProtocolMessageType('BannedInfo', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVESCSTATUSCHANGED_BANNEDINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStatusChanged.BannedInfo) }) , 'DESCRIPTOR' : _ZTLIVESCSTATUSCHANGED, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveScStatusChanged) }) _sym_db.RegisterMessage(ZtLiveScStatusChanged) _sym_db.RegisterMessage(ZtLiveScStatusChanged.BannedInfo) CommonActionSignalComment = _reflection.GeneratedProtocolMessageType('CommonActionSignalComment', (_message.Message,), { 'DESCRIPTOR' : _COMMONACTIONSIGNALCOMMENT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalComment) }) _sym_db.RegisterMessage(CommonActionSignalComment) CommonActionSignalLike = _reflection.GeneratedProtocolMessageType('CommonActionSignalLike', (_message.Message,), { 'DESCRIPTOR' : _COMMONACTIONSIGNALLIKE, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalLike) }) _sym_db.RegisterMessage(CommonActionSignalLike) CommonActionSignalGift = _reflection.GeneratedProtocolMessageType('CommonActionSignalGift', (_message.Message,), { 'DESCRIPTOR' : _COMMONACTIONSIGNALGIFT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalGift) }) _sym_db.RegisterMessage(CommonActionSignalGift) CommonStateSignalDisplayInfo = _reflection.GeneratedProtocolMessageType('CommonStateSignalDisplayInfo', (_message.Message,), { 'DESCRIPTOR' : _COMMONSTATESIGNALDISPLAYINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalDisplayInfo) }) _sym_db.RegisterMessage(CommonStateSignalDisplayInfo) CommonStateSignalTopUsers = _reflection.GeneratedProtocolMessageType('CommonStateSignalTopUsers', (_message.Message,), { 'TopUser' : _reflection.GeneratedProtocolMessageType('TopUser', (_message.Message,), { 'DESCRIPTOR' : _COMMONSTATESIGNALTOPUSERS_TOPUSER, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalTopUsers.TopUser) }) , 'DESCRIPTOR' : _COMMONSTATESIGNALTOPUSERS, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalTopUsers) }) _sym_db.RegisterMessage(CommonStateSignalTopUsers) _sym_db.RegisterMessage(CommonStateSignalTopUsers.TopUser) CommonActionSignalUserEnterRoom = _reflection.GeneratedProtocolMessageType('CommonActionSignalUserEnterRoom', (_message.Message,), { 'DESCRIPTOR' : _COMMONACTIONSIGNALUSERENTERROOM, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalUserEnterRoom) }) _sym_db.RegisterMessage(CommonActionSignalUserEnterRoom) CommonActionSignalUserFollowAuthor = _reflection.GeneratedProtocolMessageType('CommonActionSignalUserFollowAuthor', (_message.Message,), { 'DESCRIPTOR' : _COMMONACTIONSIGNALUSERFOLLOWAUTHOR, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalUserFollowAuthor) }) _sym_db.RegisterMessage(CommonActionSignalUserFollowAuthor) CommonActionSignalRichText = _reflection.GeneratedProtocolMessageType('CommonActionSignalRichText', (_message.Message,), { 'DESCRIPTOR' : _COMMONACTIONSIGNALRICHTEXT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonActionSignalRichText) }) _sym_db.RegisterMessage(CommonActionSignalRichText) UserInfoSegment = _reflection.GeneratedProtocolMessageType('UserInfoSegment', (_message.Message,), { 'DESCRIPTOR' : _USERINFOSEGMENT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.UserInfoSegment) }) _sym_db.RegisterMessage(UserInfoSegment) PlainSegment = _reflection.GeneratedProtocolMessageType('PlainSegment', (_message.Message,), { 'DESCRIPTOR' : _PLAINSEGMENT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.PlainSegment) }) _sym_db.RegisterMessage(PlainSegment) ImageSegment = _reflection.GeneratedProtocolMessageType('ImageSegment', (_message.Message,), { 'DESCRIPTOR' : _IMAGESEGMENT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ImageSegment) }) _sym_db.RegisterMessage(ImageSegment) CommonNotifySignalKickedOut = _reflection.GeneratedProtocolMessageType('CommonNotifySignalKickedOut', (_message.Message,), { 'DESCRIPTOR' : _COMMONNOTIFYSIGNALKICKEDOUT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonNotifySignalKickedOut) }) _sym_db.RegisterMessage(CommonNotifySignalKickedOut) CommonNotifySignalViolationAlert = _reflection.GeneratedProtocolMessageType('CommonNotifySignalViolationAlert', (_message.Message,), { 'DESCRIPTOR' : _COMMONNOTIFYSIGNALVIOLATIONALERT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonNotifySignalViolationAlert) }) _sym_db.RegisterMessage(CommonNotifySignalViolationAlert) CommonStateSignalCurrentRedpackList = _reflection.GeneratedProtocolMessageType('CommonStateSignalCurrentRedpackList', (_message.Message,), { 'DESCRIPTOR' : _COMMONSTATESIGNALCURRENTREDPACKLIST, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalCurrentRedpackList) }) _sym_db.RegisterMessage(CommonStateSignalCurrentRedpackList) CommonStateSignalRecentComment = _reflection.GeneratedProtocolMessageType('CommonStateSignalRecentComment', (_message.Message,), { 'DESCRIPTOR' : _COMMONSTATESIGNALRECENTCOMMENT, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalRecentComment) }) _sym_db.RegisterMessage(CommonStateSignalRecentComment) CommonStateSignalChatReady = _reflection.GeneratedProtocolMessageType('CommonStateSignalChatReady', (_message.Message,), { 'DESCRIPTOR' : _COMMONSTATESIGNALCHATREADY, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalChatReady) }) _sym_db.RegisterMessage(CommonStateSignalChatReady) CommonStateSignalChatEnd = _reflection.GeneratedProtocolMessageType('CommonStateSignalChatEnd', (_message.Message,), { 'DESCRIPTOR' : _COMMONSTATESIGNALCHATEND, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.CommonStateSignalChatEnd) }) _sym_db.RegisterMessage(CommonStateSignalChatEnd) AcfunActionSignalThrowBanana = _reflection.GeneratedProtocolMessageType('AcfunActionSignalThrowBanana', (_message.Message,), { 'DESCRIPTOR' : _ACFUNACTIONSIGNALTHROWBANANA, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AcfunActionSignalThrowBanana) }) _sym_db.RegisterMessage(AcfunActionSignalThrowBanana) AcfunStateSignalDisplayInfo = _reflection.GeneratedProtocolMessageType('AcfunStateSignalDisplayInfo', (_message.Message,), { 'DESCRIPTOR' : _ACFUNSTATESIGNALDISPLAYINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AcfunStateSignalDisplayInfo) }) _sym_db.RegisterMessage(AcfunStateSignalDisplayInfo) AcfunActionSignalJoinClub = _reflection.GeneratedProtocolMessageType('AcfunActionSignalJoinClub', (_message.Message,), { 'DESCRIPTOR' : _ACFUNACTIONSIGNALJOINCLUB, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.AcfunActionSignalJoinClub) }) _sym_db.RegisterMessage(AcfunActionSignalJoinClub) ZtLiveUserInfo = _reflection.GeneratedProtocolMessageType('ZtLiveUserInfo', (_message.Message,), { 'DESCRIPTOR' : _ZTLIVEUSERINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ZtLiveUserInfo) }) _sym_db.RegisterMessage(ZtLiveUserInfo) ImageCdnNode = _reflection.GeneratedProtocolMessageType('ImageCdnNode', (_message.Message,), { 'DESCRIPTOR' : _IMAGECDNNODE, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.ImageCdnNode) }) _sym_db.RegisterMessage(ImageCdnNode) UserInfo = _reflection.GeneratedProtocolMessageType('UserInfo', (_message.Message,), { 'DESCRIPTOR' : _USERINFO, '__module__' : 'acfun_pb2' # @@protoc_insertion_point(class_scope:AcFunPack.UserInfo) }) _sym_db.RegisterMessage(UserInfo) _APPINFO_EXTENSIONINFOENTRY._options = None _PACKETHEADER_FLAGS._options = None # @@protoc_insertion_point(module_scope) ================================================ FILE: danmu/danmaku/bilibili.py ================================================ import json import random from struct import pack, unpack import aiohttp import zlib class Bilibili: wss_url = 'wss://broadcastlv.chat.bilibili.com/sub' 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' \ b'\x4f\x62\x6a\x65\x63\x74\x5d ' heartbeatInterval = 60 @staticmethod async def get_ws_info(url): url = 'https://api.live.bilibili.com/room/v1/Room/room_init?id=' + url.split('/')[-1] reg_datas = [] async with aiohttp.ClientSession() as session: async with session.get(url) as resp: room_json = json.loads(await resp.text()) room_id = room_json['data']['room_id'] data = json.dumps({ 'roomid': room_id, 'uid': int(1e14 + 2e14 * random.random()), 'protover': 1 }, separators=(',', ':')).encode('ascii') data = (pack('>i', len(data) + 16) + b'\x00\x10\x00\x01' + pack('>i', 7) + pack('>i', 1) + data) reg_datas.append(data) return Bilibili.wss_url, reg_datas @staticmethod def decode_msg(data): dm_list_compressed = [] dm_list = [] ops = [] msgs = [] while True: try: packetLen, headerLen, ver, op, seq = unpack('!IHHII', data[0:16]) except Exception as e: break if len(data) < packetLen: break if ver == 1 or ver == 0: ops.append(op) dm_list.append(data[16:packetLen]) elif ver == 2: dm_list_compressed.append(data[16:packetLen]) if len(data) == packetLen: data = b'' break else: data = data[packetLen:] for dm in dm_list_compressed: d = zlib.decompress(dm) while True: try: packetLen, headerLen, ver, op, seq = unpack('!IHHII', d[0:16]) except Exception as e: break if len(d) < packetLen: break ops.append(op) dm_list.append(d[16:packetLen]) if len(d) == packetLen: d = b'' break else: d = d[packetLen:] for i, d in enumerate(dm_list): try: msg = {} if ops[i] == 5: j = json.loads(d) msg['msg_type'] = { 'SEND_GIFT': 'gift', 'DANMU_MSG': 'danmaku', 'WELCOME': 'enter', 'NOTICE_MSG': 'broadcast', 'LIVE_INTERACTIVE_GAME': 'interactive_danmaku' # 新增互动弹幕,经测试与弹幕内容一致 }.get(j.get('cmd'), 'other') # 2021-06-03 bilibili 字段更新, 形如 DANMU_MSG:4:0:2:2:2:0 if msg.get('msg_type', 'UNKNOWN').startswith('DANMU_MSG'): msg['msg_type'] = 'danmaku' if msg['msg_type'] == 'danmaku': msg['name'] = (j.get('info', ['', '', ['', '']])[2][1] or j.get('data', {}).get('uname', '')) msg['content'] = j.get('info', ['', ''])[1] elif msg['msg_type'] == 'interactive_danmaku': msg['name'] = j.get('data', {}).get('uname', '') msg['content'] = j.get('data', {}).get('msg', '') elif msg['msg_type'] == 'broadcast': msg['type'] = j.get('msg_type', 0) msg['roomid'] = j.get('real_roomid', 0) msg['content'] = j.get('msg_common', 'none') msg['raw'] = j else: msg['content'] = j else: msg = {'name': '', 'content': d, 'msg_type': 'other'} msgs.append(msg) except Exception as e: pass return msgs ================================================ FILE: danmu/danmaku/cc.py ================================================ import aiohttp import time import uuid import struct import math import zlib import json import re class CC_Init: def __init__(self): self.offset = 0 def get_reg(self): sid = 6144 cid = 2 update_req_info = { '22': 640, '23': 360, '24': "web", '25': "Linux", '29': "163_cc", '30': "", '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" } macAdd = device_token = str(uuid.uuid1()) + '@web.cc.163.com' data = { 'web-cc': int(time.time() * 1e3), 'macAdd': macAdd, 'device_token': device_token, 'page_uuid': str(uuid.uuid1()), 'update_req_info': update_req_info, 'system': 'win', 'memory': 1, 'version': 1, 'webccType': 4253 } reg_data = struct.pack('> 1 l = pow(2, -24) - pow(2, -77) if i == 23 else 0 d = 0 if n else o - 1 p = 1 if n else -1 y = 1 if (e < 0 or e == 0 and 1 / e) else 0 while i >= 8: e = abs(e) f = math.floor(math.log(e) / math.log(2)) u = pow(2, -1 * f) if e * u < 1: f -= 1 u *= 2 if f + h >= 1: e += l / u else: e += l * pow(2, 1 - h) if e * u >= 2: f += 1 u /= 2 if f + h >= c: a = 0 f = c elif f + h >= 1: a = (e * u - 1) * pow(2, i) f += h else: a = e * pow(2, h - 1) * pow(2, i) f = 0 t.append(255 & int(a)) d += p a /= 256 i -= 8 f = f << i | int(a) s += i while s > 0: t.append(255 & int(f)) d += p f /= 256 s -= 8 t[-1] |= 128 * y t.reverse() return b'\xcb' + bytes(t) def encode_dict(self, d): n = len(d) r = 128 + n if n < 16 else 222 if n <= 65535 else 223 t = bytes([r]) for k, v in d.items(): t += self.encode_str(k) if isinstance(v, int): t += self.encode_num(v) elif isinstance(v, str): t += self.encode_str(v) elif isinstance(v, dict): t += self.encode_dict(v) return t def p(self, fmt): def r(t): s, = struct.unpack_from(fmt, t, self.offset) self.offset += struct.calcsize(fmt) return s return r def i(self, t): return lambda t: int(t[self.offset - 1]) def o(self, t, e): return lambda r: e(r, t(r)) def f(self, t, e): return lambda r: e(r, t) def n(self, e): if 0 <= e <= 127: r = self.i(e) elif 128 <= e <= 143: r = self.f(e - 128, self.de_dict) elif 144 <= e <= 159: r = self.f(e - 144, self.de_list) elif 160 <= e <= 191: r = self.f(e - 160, self.de_str) elif e == 192: r = self.i(None) elif e == 193: r = None elif e == 194: r = self.i(False) elif e == 195: r = self.i(True) elif e == 202: r = self.p('>f') elif e == 203: r = self.p('>d') elif e == 204: r = self.p('>B') elif e == 205: r = self.p('>H') elif e == 206: r = self.p('>I') elif e == 207: r = self.p('>Q') elif e == 208: r = self.p('>b') elif e == 209: r = self.p('>h') elif e == 210: r = self.p('>i') elif e == 211: r = self.p('>q') elif e == 217: r = self.o(self.p('>B'), self.de_str) elif e == 218: r = self.o(self.p('>H'), self.de_str) elif e == 219: r = self.o(self.p('>I'), self.de_str) elif e == 220: r = self.o(self.p('>H'), self.de_list) elif e == 221: r = self.o(self.p('>I'), self.de_list) elif e == 222: r = self.o(self.p('>H'), self.de_dict) elif e == 223: r = self.o(self.p('>I'), self.de_dict) elif 224 <= e <= 256: r = self.i(e - 256) return r def de_init(self, t): r = int(t[self.offset]) self.offset += 1 n = self.n(r) return n(t) def de_str(self, t, e): s = t[self.offset: self.offset + e].decode('utf-8') self.offset += e return s def de_list(self, t, e): l = [''] * e n = self.de_init for i in range(e): l[i] = n(t) return l def de_dict(self, t, e): k = [''] * e v = [''] * e f = self.de_init for r in range(e): k[r] = f(t) v[r] = f(t) d = dict(zip(k, v)) return d class CC: s = CC_Init() heartbeatInterval = 30 heartbeat = s.get_beat() @staticmethod async def get_ws_info(url): cid = re.search(r'com/(\d+)/', url).group(1) url = 'https://api.cc.163.com/v1/activitylives/anchor/lives?anchor_ccid=' + str(cid) async with aiohttp.ClientSession() as session: async with session.get(url) as resp: res = await resp.text() data = json.loads(res).get('data').get(cid) channel_id = data['channel_id'] roomId = data['room_id'] gametype = data['gametype'] reg_data = CC.s.get_reg() beat_data = CC.s.get_beat() join_data = CC.s.get_join(channel_id, gametype, roomId) reg_datas = (reg_data, beat_data, join_data) return 'wss://weblink.cc.163.com/', reg_datas @staticmethod def decode_msg(e): n, r, p = struct.unpack('= (4 + i): o = n[4:(4 + i)] a = self.S(o) y = self.ye(a) return y else: return None def ye(self, e): return self.T({ 'resultObj': e, 'template': self.ie, 'afterChange': 1, }) def afterChange(self, e, t, i, n, o): if t == 'bin_data': v = [] ve = {} for m in n: a = self.S(e, m['ext']) b = o['msg_type'] if b == 1: ve = self.T({ 'resultObj': a, 'template': self.ne }) elif b == 2: ve = self.T({ 'resultObj': a, 'template': self.oe }) v.append(ve.copy()) return v else: return n def T(self, e): i = e['resultObj'] n = e['template'] o = e.get('beforeChange', '') r = e.get('afterChange', '') a = {} for s in n.keys(): for t in i[0]: if t['tag'] == n[s]: q = t p = q['value'] c = q['ext'] if r: a[s] = self.afterChange(i[1], s, c, p, a) else: a[s] = p break return a def S(self, e, t=0): if t == '': t = 0 i = [] n = len(e) while t < n: o = self.m(e, t) dict_ = { 'value': o['value'], 'lastPosition': o['position'], 'ext': o['ext'], 'tag': o['tag'] } i.append(dict_.copy()) t = o['position'] return i, e def m(self, e, t): value = position = ext = '' i = e a, = struct.unpack_from('!B', i, t) tag = (240 & a) >> 4 type = 15 & a s_position = t + 1 if type == 0: value, position = self.f0(i, s_position) elif type == 1: value, position = self.f1(i, s_position) elif type == 2: value, position = self.f2(i, s_position) elif type == 3: value, position = self.f3(i, s_position) elif type == 6: value, position, ext = self.f6(i, s_position) elif type == 7: value, position, ext = self.f7(i, s_position) elif type == 8: value, position = self.f8(i, s_position) elif type == 9: value, position = self.f9(i, s_position) elif type == 12: value, position = self.f12(i, s_position) elif type == 13: value, position = self.f13(i, s_position) i = '' return { 'i': i, 'tag': tag, 'type': type, 'value': value, 'position': position, 'ext': ext } def f0(self, e, t): o = 1 try: n, = struct.unpack_from('!B', e, t) except: n = '' return n, t + o def f1(self, e, t): o = 2 try: n, = struct.unpack_from('!H', e, t) except: n = '' return n, t + o def f2(self, e, t): o = 4 try: n, = struct.unpack_from('!I', e, t) except: n = '' return n, t + o def f3(self, e, t): e = struct.unpack('!8B', e[t:t + 8]) i = (e[0] << 24) + (e[1] << 16) + (e[2] << 8) + e[3] o = (e[4] << 24) + (e[5] << 16) + (e[6] << 8) + e[7] value = (i << 32) + o position = t + 8 return value, position def f4(self, e, t): o = 4 try: n, = struct.unpack_from('!f', e, t) except: n = '' return n, t + o def f5(self, e, t): o = 8 try: n, = struct.unpack_from('!d', e, t) except: n = '' return n, t + o def f6(self, e, t): n, = struct.unpack_from('!B', e, t) r = t + 1 s = r + n value = (e[r:s]).decode('utf8', errors='ignore') return value, s, r def f7(self, e, t): n, = struct.unpack_from('!I', e, t) r = t + 4 s = r + n value = (e[r:s]).decode('utf8', errors='ignore') return value, s, r def f8(self, e, t): i = {} b = self.m(e, t) o = b['value'] r = b['position'] while o > 0: a = self.m(e, r) s = self.m(e, a['position']) if a['tag'] == 0 and s['tag'] == 1: i[a['value']] = s['value'] r = s['position'] o -= 1 return i, r def f9(self, e, t): i = self.m(e, t) n = i['value'] o = i['position'] r = [] while n > 0: a = self.m(e, o) r.append(a.copy()) o = a['position'] n -= 1 return r, o def f10(self, e, t): i = [] while True: n = self.m(e, t) t = n['position'] if n['type'] == 11: return i, t i.append(n['value'].copy()) def f11(self, e, t): return '', t def f12(self, e, t): return 0, t def f13(self, e, t): i = self.m(e, t) return e[(t + i['position']):i['value']], t + i['position'] + i['value'] ================================================ FILE: danmu/danmaku/huajiao.proto ================================================ syntax = "proto2"; package HuaJiaoPack; message Message { required uint32 msgid = 1; required uint64 sn = 2; optional string sender = 3; optional string receiver = 4; optional string receiver_type = 5; optional Request req = 6; optional Response resp = 7; optional Notify notify = 8; optional string sender_type = 12; message Request { optional LoginReq login = 2; optional InitLoginReq init_login_req = 9; optional Service_Req service_req = 11; message LoginReq { required string mobile_type = 1; required uint32 net_type = 2; required string server_ram = 3; optional bytes secret_ram = 4; optional uint32 app_id = 5[default = 2000]; optional string platform = 8; optional string verf_code = 9; optional bool not_encrypt = 10; } message InitLoginReq { required string client_ram = 1; optional string sig = 2; } message Service_Req { required uint32 service_id = 1; required bytes request = 2; } } message Response { optional LoginResp login = 3; optional ChatResp chat = 4; optional InitLoginResp init_login_resp = 10; optional Service_Resp service_resp = 12; message LoginResp { required uint32 timestamp = 1; required string session_id = 2; required string session_key = 3; optional string client_login_ip = 4; optional string serverip = 5; } message InitLoginResp { required string client_ram = 1; required string server_ram = 2; } message Service_Resp { required uint32 service_id = 1; required bytes response = 2; } message ChatResp { required uint32 result = 1; optional uint32 body_id = 2; } } message Notify { optional NewMessageNotify newinfo_ntf = 1; message NewMessageNotify { required string info_type = 1; optional bytes info_content = 2; optional int64 info_id = 3; optional uint32 query_after_seconds = 4; } } } message ChatRoomPacket { required bytes roomid = 1; optional ChatRoomUpToServer to_server_data = 2; optional ChatRoomDownToUser to_user_data = 3; optional string uuid = 4; optional uint64 client_sn = 5; optional uint32 appid = 6; message ChatRoomUpToServer { required uint32 payloadtype = 1; optional ApplyJoinChatRoomRequest applyjoinchatroomreq = 4; message ApplyJoinChatRoomRequest { required bytes roomid = 1; optional ChatRoom room = 2; optional int32 userid_type = 3; } } message ChatRoomDownToUser { required int32 result = 1; required uint32 payloadtype = 2; optional CreateChatRoomResponse createchatroomresp = 3; optional ApplyJoinChatRoomResponse applyjoinchatroomresp = 5; optional QuitChatRoomResponse quitchatroomresp = 6; optional ChatRoomNewMsg newmsgnotify = 13; optional MemberJoinChatRoomNotify memberjoinnotify = 16; optional MemberQuitChatRoomNotify memberquitnotify = 17; repeated ChatRoomMNotify multinotify = 200; message CreateChatRoomResponse { optional ChatRoom room = 1; } message ApplyJoinChatRoomResponse { optional ChatRoom room = 1; } message QuitChatRoomResponse { optional ChatRoom room = 1; } message ChatRoomNewMsg { required bytes roomid = 1; optional CRUser sender = 2; optional int32 msgtype = 3; optional bytes msgcontent = 4; optional int32 regmemcount = 5; optional int32 memcount = 6; optional uint32 msgid = 7; optional uint32 maxid = 8; optional uint64 timestamp = 9; } message MemberJoinChatRoomNotify { required ChatRoom room = 1; } message MemberQuitChatRoomNotify { required ChatRoom room = 1; } message ChatRoomMNotify { required int32 type = 1; required bytes data = 2; optional int32 regmemcount = 3; optional int32 memcount = 4; } } } message ChatRoom { required bytes roomid = 1; repeated CRPair properties = 8; repeated CRUser members = 9; optional bytes partnerdata = 13; } message CRUser { optional bytes userid = 1; optional string name = 2; optional bytes userdata = 6; } message CRPair { required string key = 1; optional bytes value = 2; } ================================================ FILE: danmu/danmaku/huajiao.py ================================================ from . import huajiao_pb2 as pb import struct import hashlib import random import string import json import time class HuaJiao: heartbeat = b'\x00\x00\x00\x00' ws_url = 'wss://bridge.huajiao.com' def __init__(self, rid=None): self.sn = '' self.tt = str(int(time.time() * 1000)) self.roomId = rid self.flag = 'qh' self.protocolVersion = 1 self.clientVersion = 101 self.appId = 2080 self.sender = self.password = '999' + self.tt + self.random_(6, 'n') self.defaultKey = '3f190210cb1cf32a2378ee57900acf78' def init_p(self): p = pb.Message() p.sn = int(self.random_(10, 'n')) p.sender = self.sender p.sender_type = 'jid' return p @staticmethod def random_(num, var): seq = '' if var == 's': seq = string.ascii_letters + string.digits if var == 'n': seq = string.digits result = ''.join([random.choice(seq) for i in range(num)]) return result @staticmethod def md5(data): return hashlib.md5(data.encode('utf-8')).hexdigest() @staticmethod def rc4(data, key): a = [i for i in range(256)] l = i = 0 while i < 256: l = (l + a[i] + ord(key[i % len(key)])) % 256 a[i], a[l] = a[l], a[i] i += 1 i = l = n = 0 s = len(data) f = [] while n < s: i = (i + 1) % 256 l = (l + a[i]) % 256 a[i], a[l] = a[l], a[i] f.append(data[n] ^ a[(a[i] + a[l]) % 256]) n += 1 return bytes(f) def sendHandshakePack(self): HandshakePack = struct.pack('!2sbbhih', self.flag.encode(), self.protocolVersion << 4, self.clientVersion, self.appId, 0, 0) p = self.init_p() self.sn = p.sn p.msgid = 100009 p.req.init_login_req.client_ram = self.random_(10, 's') p.req.init_login_req.sig = '' data = p.SerializeToString() a = self.rc4(data, self.defaultKey) HandshakePack += struct.pack('!i', len(HandshakePack + a) + 4) + a return HandshakePack def processHandShakePack(self, message): o, = struct.unpack('!2s', message[:2]) if o.decode() != self.flag: raise Exception('processHandShakePack 服务器响应标识(flag)有误') s = self.rc4(message[6:], self.defaultKey) p = self.init_p() try: p.ParseFromString(s) except: raise Exception('processHandShakePack 解析消息体异常') if p.msgid != 200009: raise Exception('processHandShakePack 响应msgid异常') if p.sn != self.sn: raise Exception('processHandShakePack sn验证失败') return p.resp def sendLoginPack(self, message): e = self.processHandShakePack(message) u = e.init_login_resp.server_ram secret_ram = self.rc4((u + self.random_(8, 's')).encode(), self.password) verf_code = self.md5(self.sender + '360tantan@1408$')[24:] p = self.init_p() self.sn = p.sn p.msgid = 100001 p.req.login.app_id = 2080 p.req.login.mobile_type = 'ios' p.req.login.net_type = 4 p.req.login.not_encrypt = True p.req.login.platform = 'h5' p.req.login.server_ram = u p.req.login.secret_ram = secret_ram p.req.login.verf_code = verf_code a = p.SerializeToString() l = self.rc4(a, self.defaultKey) LoginPack = struct.pack('!i', 4 + len(l)) + l return LoginPack def processLoginPack(self, message): p = self.init_p() try: p.ParseFromString(self.rc4(message[4:], self.password)) except: try: p.ParseFromString(self.rc4(message[4:], self.defaultKey)) except: raise Exception('processLoginPack 解析消息体异常') if p.msgid != 200001: raise Exception('processLoginPack 响应msgid异常') if p.sn != self.sn: raise Exception('processLoginPack sn验证失败') return p def sendJoinChatroomPack(self, message): p = self.processLoginPack(message) o = self.roomId.encode() # crm : ChatroomRequestMessage crm = pb.ChatRoomPacket() crm.client_sn = p.sn crm.roomid = o crm.appid = self.appId crm.uuid = self.md5(self.random_(10, 's') + '0000000001' + str(int(time.time() * 1000))) crm.to_server_data.payloadtype = 102 crm.to_server_data.applyjoinchatroomreq.roomid = o crm.to_server_data.applyjoinchatroomreq.room.roomid = o crm.to_server_data.applyjoinchatroomreq.userid_type = 0 p = self.init_p() self.sn = p.sn p.msgid = 100011 p.req.service_req.service_id = 10000006 p.req.service_req.request = crm.SerializeToString() u = p.SerializeToString() JoinChatroomPack = struct.pack('!i', 4 + len(u)) + u return JoinChatroomPack def processMessagePack(self, message): i, = struct.unpack_from('!i', message, 0) if len(message) == 4 and i == 0: # HeartbeatPack return None p = self.init_p() p.ParseFromString(message[4:]) o = p.msgid if o == 200011: return self.processService_RespMessage(p) elif o == 300000: return self.processNewMessageNotifyMessage(p) else: return None def processService_RespMessage(self, p): if p.sn != self.sn: raise Exception('processService_RespMessage sn验证失败') crp = pb.ChatRoomPacket() crp.ParseFromString(p.resp.service_resp.response) n = crp.to_user_data r = i = '' if n.payloadtype == 102 or n.applyjoinchatroomresp: if n.result == 0: r = n.applyjoinchatroomresp.room.properties[1].value i = n.applyjoinchatroomresp.room.partnerdata r = r.decode('utf-8') i = i.decode('utf-8') return r, i def processNewMessageNotifyMessage(self, p): crp = pb.ChatRoomPacket() crp.ParseFromString(p.notify.newinfo_ntf.info_content) r = crp.to_user_data s = i = '' if r.result == 0: if r.payloadtype == 1000 and r.newmsgnotify: s = r.newmsgnotify.memcount i = r.newmsgnotify.msgcontent elif r.payloadtype == 1001 and r.memberjoinnotify: s = r.memberjoinnotify.room.properties[1].value i = r.memberjoinnotify.room.members[0].userdata elif r.payloadtype == 1002 and r.memberquitnotify: s = r.memberquitnotify.room.properties[0].value i = r.memberquitnotify.room.members[0].userdata i = i.decode('utf-8') i = json.loads(i) return s, i def decode_msg(self, message): msgs = [] memcountmsg, msgcontent = self.processMessagePack(message) if msgcontent.get('type') == 9: name = msgcontent['extends']['nickname'] content = msgcontent['text'] msg = {'name': name, 'content': content, 'msg_type': 'danmaku'} msgs.append(msg) return msgs ================================================ FILE: danmu/danmaku/huajiao_pb2.py ================================================ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: huajiao.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='huajiao.proto', package='HuaJiaoPack', syntax='proto2', serialized_options=None, create_key=_descriptor._internal_create_key, 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' ) _MESSAGE_REQUEST_LOGINREQ = _descriptor.Descriptor( name='LoginReq', full_name='HuaJiaoPack.Message.Request.LoginReq', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='mobile_type', full_name='HuaJiaoPack.Message.Request.LoginReq.mobile_type', index=0, number=1, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='net_type', full_name='HuaJiaoPack.Message.Request.LoginReq.net_type', index=1, number=2, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='server_ram', full_name='HuaJiaoPack.Message.Request.LoginReq.server_ram', index=2, number=3, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='secret_ram', full_name='HuaJiaoPack.Message.Request.LoginReq.secret_ram', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='app_id', full_name='HuaJiaoPack.Message.Request.LoginReq.app_id', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2000, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='platform', full_name='HuaJiaoPack.Message.Request.LoginReq.platform', index=5, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='verf_code', full_name='HuaJiaoPack.Message.Request.LoginReq.verf_code', index=6, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='not_encrypt', full_name='HuaJiaoPack.Message.Request.LoginReq.not_encrypt', index=7, number=10, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=477, serialized_end=646, ) _MESSAGE_REQUEST_INITLOGINREQ = _descriptor.Descriptor( name='InitLoginReq', full_name='HuaJiaoPack.Message.Request.InitLoginReq', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='client_ram', full_name='HuaJiaoPack.Message.Request.InitLoginReq.client_ram', index=0, number=1, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sig', full_name='HuaJiaoPack.Message.Request.InitLoginReq.sig', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=648, serialized_end=695, ) _MESSAGE_REQUEST_SERVICE_REQ = _descriptor.Descriptor( name='Service_Req', full_name='HuaJiaoPack.Message.Request.Service_Req', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='service_id', full_name='HuaJiaoPack.Message.Request.Service_Req.service_id', index=0, number=1, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='request', full_name='HuaJiaoPack.Message.Request.Service_Req.request', index=1, number=2, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=697, serialized_end=747, ) _MESSAGE_REQUEST = _descriptor.Descriptor( name='Request', full_name='HuaJiaoPack.Message.Request', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='login', full_name='HuaJiaoPack.Message.Request.login', index=0, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='init_login_req', full_name='HuaJiaoPack.Message.Request.init_login_req', index=1, number=9, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='service_req', full_name='HuaJiaoPack.Message.Request.service_req', index=2, number=11, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_MESSAGE_REQUEST_LOGINREQ, _MESSAGE_REQUEST_INITLOGINREQ, _MESSAGE_REQUEST_SERVICE_REQ, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=281, serialized_end=747, ) _MESSAGE_RESPONSE_LOGINRESP = _descriptor.Descriptor( name='LoginResp', full_name='HuaJiaoPack.Message.Response.LoginResp', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='timestamp', full_name='HuaJiaoPack.Message.Response.LoginResp.timestamp', index=0, number=1, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='session_id', full_name='HuaJiaoPack.Message.Response.LoginResp.session_id', index=1, number=2, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='session_key', full_name='HuaJiaoPack.Message.Response.LoginResp.session_key', index=2, number=3, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='client_login_ip', full_name='HuaJiaoPack.Message.Response.LoginResp.client_login_ip', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='serverip', full_name='HuaJiaoPack.Message.Response.LoginResp.serverip', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1008, serialized_end=1122, ) _MESSAGE_RESPONSE_INITLOGINRESP = _descriptor.Descriptor( name='InitLoginResp', full_name='HuaJiaoPack.Message.Response.InitLoginResp', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='client_ram', full_name='HuaJiaoPack.Message.Response.InitLoginResp.client_ram', index=0, number=1, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='server_ram', full_name='HuaJiaoPack.Message.Response.InitLoginResp.server_ram', index=1, number=2, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1124, serialized_end=1179, ) _MESSAGE_RESPONSE_SERVICE_RESP = _descriptor.Descriptor( name='Service_Resp', full_name='HuaJiaoPack.Message.Response.Service_Resp', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='service_id', full_name='HuaJiaoPack.Message.Response.Service_Resp.service_id', index=0, number=1, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='response', full_name='HuaJiaoPack.Message.Response.Service_Resp.response', index=1, number=2, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1181, serialized_end=1233, ) _MESSAGE_RESPONSE_CHATRESP = _descriptor.Descriptor( name='ChatResp', full_name='HuaJiaoPack.Message.Response.ChatResp', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='result', full_name='HuaJiaoPack.Message.Response.ChatResp.result', index=0, number=1, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='body_id', full_name='HuaJiaoPack.Message.Response.ChatResp.body_id', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1235, serialized_end=1278, ) _MESSAGE_RESPONSE = _descriptor.Descriptor( name='Response', full_name='HuaJiaoPack.Message.Response', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='login', full_name='HuaJiaoPack.Message.Response.login', index=0, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='chat', full_name='HuaJiaoPack.Message.Response.chat', index=1, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='init_login_resp', full_name='HuaJiaoPack.Message.Response.init_login_resp', index=2, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='service_resp', full_name='HuaJiaoPack.Message.Response.service_resp', index=3, number=12, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_MESSAGE_RESPONSE_LOGINRESP, _MESSAGE_RESPONSE_INITLOGINRESP, _MESSAGE_RESPONSE_SERVICE_RESP, _MESSAGE_RESPONSE_CHATRESP, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=750, serialized_end=1278, ) _MESSAGE_NOTIFY_NEWMESSAGENOTIFY = _descriptor.Descriptor( name='NewMessageNotify', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='info_type', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.info_type', index=0, number=1, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='info_content', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.info_content', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='info_id', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.info_id', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='query_after_seconds', full_name='HuaJiaoPack.Message.Notify.NewMessageNotify.query_after_seconds', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1358, serialized_end=1463, ) _MESSAGE_NOTIFY = _descriptor.Descriptor( name='Notify', full_name='HuaJiaoPack.Message.Notify', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='newinfo_ntf', full_name='HuaJiaoPack.Message.Notify.newinfo_ntf', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_MESSAGE_NOTIFY_NEWMESSAGENOTIFY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1281, serialized_end=1463, ) _MESSAGE = _descriptor.Descriptor( name='Message', full_name='HuaJiaoPack.Message', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='msgid', full_name='HuaJiaoPack.Message.msgid', index=0, number=1, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sn', full_name='HuaJiaoPack.Message.sn', index=1, number=2, type=4, cpp_type=4, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sender', full_name='HuaJiaoPack.Message.sender', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiver', full_name='HuaJiaoPack.Message.receiver', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiver_type', full_name='HuaJiaoPack.Message.receiver_type', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='req', full_name='HuaJiaoPack.Message.req', index=5, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='resp', full_name='HuaJiaoPack.Message.resp', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='notify', full_name='HuaJiaoPack.Message.notify', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sender_type', full_name='HuaJiaoPack.Message.sender_type', index=8, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_MESSAGE_REQUEST, _MESSAGE_RESPONSE, _MESSAGE_NOTIFY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=31, serialized_end=1463, ) _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST = _descriptor.Descriptor( name='ApplyJoinChatRoomRequest', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='roomid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest.roomid', index=0, number=1, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest.room', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userid_type', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest.userid_type', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1837, serialized_end=1937, ) _CHATROOMPACKET_CHATROOMUPTOSERVER = _descriptor.Descriptor( name='ChatRoomUpToServer', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='payloadtype', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.payloadtype', index=0, number=1, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='applyjoinchatroomreq', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.applyjoinchatroomreq', index=1, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1691, serialized_end=1937, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE = _descriptor.Descriptor( name='CreateChatRoomResponse', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse.room', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2667, serialized_end=2728, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE = _descriptor.Descriptor( name='ApplyJoinChatRoomResponse', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse.room', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2730, serialized_end=2794, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE = _descriptor.Descriptor( name='QuitChatRoomResponse', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse.room', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2796, serialized_end=2855, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG = _descriptor.Descriptor( name='ChatRoomNewMsg', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='roomid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.roomid', index=0, number=1, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sender', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.sender', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msgtype', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.msgtype', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msgcontent', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.msgcontent', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='regmemcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.regmemcount', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='memcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.memcount', index=5, number=6, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msgid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.msgid', index=6, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='maxid', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.maxid', index=7, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='timestamp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg.timestamp', index=8, number=9, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2858, serialized_end=3052, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY = _descriptor.Descriptor( name='MemberJoinChatRoomNotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify.room', index=0, number=1, type=11, cpp_type=10, label=2, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3054, serialized_end=3117, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY = _descriptor.Descriptor( name='MemberQuitChatRoomNotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='room', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify.room', index=0, number=1, type=11, cpp_type=10, label=2, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3119, serialized_end=3182, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY = _descriptor.Descriptor( name='ChatRoomMNotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='type', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.type', index=0, number=1, type=5, cpp_type=1, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='data', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.data', index=1, number=2, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='regmemcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.regmemcount', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='memcount', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify.memcount', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3184, serialized_end=3268, ) _CHATROOMPACKET_CHATROOMDOWNTOUSER = _descriptor.Descriptor( name='ChatRoomDownToUser', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='result', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.result', index=0, number=1, type=5, cpp_type=1, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payloadtype', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.payloadtype', index=1, number=2, type=13, cpp_type=3, label=2, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='createchatroomresp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.createchatroomresp', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='applyjoinchatroomresp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.applyjoinchatroomresp', index=3, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='quitchatroomresp', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.quitchatroomresp', index=4, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='newmsgnotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.newmsgnotify', index=5, number=13, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='memberjoinnotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.memberjoinnotify', index=6, number=16, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='memberquitnotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.memberquitnotify', index=7, number=17, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='multinotify', full_name='HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.multinotify', index=8, number=200, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE, _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE, _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE, _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG, _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY, _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY, _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1940, serialized_end=3268, ) _CHATROOMPACKET = _descriptor.Descriptor( name='ChatRoomPacket', full_name='HuaJiaoPack.ChatRoomPacket', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='roomid', full_name='HuaJiaoPack.ChatRoomPacket.roomid', index=0, number=1, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='to_server_data', full_name='HuaJiaoPack.ChatRoomPacket.to_server_data', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='to_user_data', full_name='HuaJiaoPack.ChatRoomPacket.to_user_data', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uuid', full_name='HuaJiaoPack.ChatRoomPacket.uuid', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='client_sn', full_name='HuaJiaoPack.ChatRoomPacket.client_sn', index=4, number=5, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appid', full_name='HuaJiaoPack.ChatRoomPacket.appid', index=5, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_CHATROOMPACKET_CHATROOMUPTOSERVER, _CHATROOMPACKET_CHATROOMDOWNTOUSER, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1466, serialized_end=3268, ) _CHATROOM = _descriptor.Descriptor( name='ChatRoom', full_name='HuaJiaoPack.ChatRoom', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='roomid', full_name='HuaJiaoPack.ChatRoom.roomid', index=0, number=1, type=12, cpp_type=9, label=2, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='properties', full_name='HuaJiaoPack.ChatRoom.properties', index=1, number=8, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='members', full_name='HuaJiaoPack.ChatRoom.members', index=2, number=9, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='partnerdata', full_name='HuaJiaoPack.ChatRoom.partnerdata', index=3, number=13, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3270, serialized_end=3396, ) _CRUSER = _descriptor.Descriptor( name='CRUser', full_name='HuaJiaoPack.CRUser', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='userid', full_name='HuaJiaoPack.CRUser.userid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='name', full_name='HuaJiaoPack.CRUser.name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userdata', full_name='HuaJiaoPack.CRUser.userdata', index=2, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3398, serialized_end=3454, ) _CRPAIR = _descriptor.Descriptor( name='CRPair', full_name='HuaJiaoPack.CRPair', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='key', full_name='HuaJiaoPack.CRPair.key', index=0, number=1, type=9, cpp_type=9, label=2, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='value', full_name='HuaJiaoPack.CRPair.value', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3456, serialized_end=3492, ) _MESSAGE_REQUEST_LOGINREQ.containing_type = _MESSAGE_REQUEST _MESSAGE_REQUEST_INITLOGINREQ.containing_type = _MESSAGE_REQUEST _MESSAGE_REQUEST_SERVICE_REQ.containing_type = _MESSAGE_REQUEST _MESSAGE_REQUEST.fields_by_name['login'].message_type = _MESSAGE_REQUEST_LOGINREQ _MESSAGE_REQUEST.fields_by_name['init_login_req'].message_type = _MESSAGE_REQUEST_INITLOGINREQ _MESSAGE_REQUEST.fields_by_name['service_req'].message_type = _MESSAGE_REQUEST_SERVICE_REQ _MESSAGE_REQUEST.containing_type = _MESSAGE _MESSAGE_RESPONSE_LOGINRESP.containing_type = _MESSAGE_RESPONSE _MESSAGE_RESPONSE_INITLOGINRESP.containing_type = _MESSAGE_RESPONSE _MESSAGE_RESPONSE_SERVICE_RESP.containing_type = _MESSAGE_RESPONSE _MESSAGE_RESPONSE_CHATRESP.containing_type = _MESSAGE_RESPONSE _MESSAGE_RESPONSE.fields_by_name['login'].message_type = _MESSAGE_RESPONSE_LOGINRESP _MESSAGE_RESPONSE.fields_by_name['chat'].message_type = _MESSAGE_RESPONSE_CHATRESP _MESSAGE_RESPONSE.fields_by_name['init_login_resp'].message_type = _MESSAGE_RESPONSE_INITLOGINRESP _MESSAGE_RESPONSE.fields_by_name['service_resp'].message_type = _MESSAGE_RESPONSE_SERVICE_RESP _MESSAGE_RESPONSE.containing_type = _MESSAGE _MESSAGE_NOTIFY_NEWMESSAGENOTIFY.containing_type = _MESSAGE_NOTIFY _MESSAGE_NOTIFY.fields_by_name['newinfo_ntf'].message_type = _MESSAGE_NOTIFY_NEWMESSAGENOTIFY _MESSAGE_NOTIFY.containing_type = _MESSAGE _MESSAGE.fields_by_name['req'].message_type = _MESSAGE_REQUEST _MESSAGE.fields_by_name['resp'].message_type = _MESSAGE_RESPONSE _MESSAGE.fields_by_name['notify'].message_type = _MESSAGE_NOTIFY _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST.fields_by_name['room'].message_type = _CHATROOM _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST.containing_type = _CHATROOMPACKET_CHATROOMUPTOSERVER _CHATROOMPACKET_CHATROOMUPTOSERVER.fields_by_name['applyjoinchatroomreq'].message_type = _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST _CHATROOMPACKET_CHATROOMUPTOSERVER.containing_type = _CHATROOMPACKET _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE.fields_by_name['room'].message_type = _CHATROOM _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE.fields_by_name['room'].message_type = _CHATROOM _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE.fields_by_name['room'].message_type = _CHATROOM _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG.fields_by_name['sender'].message_type = _CRUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY.fields_by_name['room'].message_type = _CHATROOM _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY.fields_by_name['room'].message_type = _CHATROOM _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY.containing_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['createchatroomresp'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['applyjoinchatroomresp'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['quitchatroomresp'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['newmsgnotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['memberjoinnotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['memberquitnotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY _CHATROOMPACKET_CHATROOMDOWNTOUSER.fields_by_name['multinotify'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY _CHATROOMPACKET_CHATROOMDOWNTOUSER.containing_type = _CHATROOMPACKET _CHATROOMPACKET.fields_by_name['to_server_data'].message_type = _CHATROOMPACKET_CHATROOMUPTOSERVER _CHATROOMPACKET.fields_by_name['to_user_data'].message_type = _CHATROOMPACKET_CHATROOMDOWNTOUSER _CHATROOM.fields_by_name['properties'].message_type = _CRPAIR _CHATROOM.fields_by_name['members'].message_type = _CRUSER DESCRIPTOR.message_types_by_name['Message'] = _MESSAGE DESCRIPTOR.message_types_by_name['ChatRoomPacket'] = _CHATROOMPACKET DESCRIPTOR.message_types_by_name['ChatRoom'] = _CHATROOM DESCRIPTOR.message_types_by_name['CRUser'] = _CRUSER DESCRIPTOR.message_types_by_name['CRPair'] = _CRPAIR _sym_db.RegisterFileDescriptor(DESCRIPTOR) Message = _reflection.GeneratedProtocolMessageType('Message', (_message.Message,), { 'Request' : _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), { 'LoginReq' : _reflection.GeneratedProtocolMessageType('LoginReq', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_REQUEST_LOGINREQ, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request.LoginReq) }) , 'InitLoginReq' : _reflection.GeneratedProtocolMessageType('InitLoginReq', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_REQUEST_INITLOGINREQ, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request.InitLoginReq) }) , 'Service_Req' : _reflection.GeneratedProtocolMessageType('Service_Req', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_REQUEST_SERVICE_REQ, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request.Service_Req) }) , 'DESCRIPTOR' : _MESSAGE_REQUEST, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Request) }) , 'Response' : _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), { 'LoginResp' : _reflection.GeneratedProtocolMessageType('LoginResp', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_RESPONSE_LOGINRESP, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.LoginResp) }) , 'InitLoginResp' : _reflection.GeneratedProtocolMessageType('InitLoginResp', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_RESPONSE_INITLOGINRESP, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.InitLoginResp) }) , 'Service_Resp' : _reflection.GeneratedProtocolMessageType('Service_Resp', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_RESPONSE_SERVICE_RESP, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.Service_Resp) }) , 'ChatResp' : _reflection.GeneratedProtocolMessageType('ChatResp', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_RESPONSE_CHATRESP, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response.ChatResp) }) , 'DESCRIPTOR' : _MESSAGE_RESPONSE, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Response) }) , 'Notify' : _reflection.GeneratedProtocolMessageType('Notify', (_message.Message,), { 'NewMessageNotify' : _reflection.GeneratedProtocolMessageType('NewMessageNotify', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE_NOTIFY_NEWMESSAGENOTIFY, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Notify.NewMessageNotify) }) , 'DESCRIPTOR' : _MESSAGE_NOTIFY, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message.Notify) }) , 'DESCRIPTOR' : _MESSAGE, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.Message) }) _sym_db.RegisterMessage(Message) _sym_db.RegisterMessage(Message.Request) _sym_db.RegisterMessage(Message.Request.LoginReq) _sym_db.RegisterMessage(Message.Request.InitLoginReq) _sym_db.RegisterMessage(Message.Request.Service_Req) _sym_db.RegisterMessage(Message.Response) _sym_db.RegisterMessage(Message.Response.LoginResp) _sym_db.RegisterMessage(Message.Response.InitLoginResp) _sym_db.RegisterMessage(Message.Response.Service_Resp) _sym_db.RegisterMessage(Message.Response.ChatResp) _sym_db.RegisterMessage(Message.Notify) _sym_db.RegisterMessage(Message.Notify.NewMessageNotify) ChatRoomPacket = _reflection.GeneratedProtocolMessageType('ChatRoomPacket', (_message.Message,), { 'ChatRoomUpToServer' : _reflection.GeneratedProtocolMessageType('ChatRoomUpToServer', (_message.Message,), { 'ApplyJoinChatRoomRequest' : _reflection.GeneratedProtocolMessageType('ApplyJoinChatRoomRequest', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMUPTOSERVER_APPLYJOINCHATROOMREQUEST, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest) }) , 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMUPTOSERVER, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomUpToServer) }) , 'ChatRoomDownToUser' : _reflection.GeneratedProtocolMessageType('ChatRoomDownToUser', (_message.Message,), { 'CreateChatRoomResponse' : _reflection.GeneratedProtocolMessageType('CreateChatRoomResponse', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_CREATECHATROOMRESPONSE, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse) }) , 'ApplyJoinChatRoomResponse' : _reflection.GeneratedProtocolMessageType('ApplyJoinChatRoomResponse', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_APPLYJOINCHATROOMRESPONSE, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse) }) , 'QuitChatRoomResponse' : _reflection.GeneratedProtocolMessageType('QuitChatRoomResponse', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_QUITCHATROOMRESPONSE, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse) }) , 'ChatRoomNewMsg' : _reflection.GeneratedProtocolMessageType('ChatRoomNewMsg', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMNEWMSG, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg) }) , 'MemberJoinChatRoomNotify' : _reflection.GeneratedProtocolMessageType('MemberJoinChatRoomNotify', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERJOINCHATROOMNOTIFY, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify) }) , 'MemberQuitChatRoomNotify' : _reflection.GeneratedProtocolMessageType('MemberQuitChatRoomNotify', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_MEMBERQUITCHATROOMNOTIFY, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify) }) , 'ChatRoomMNotify' : _reflection.GeneratedProtocolMessageType('ChatRoomMNotify', (_message.Message,), { 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER_CHATROOMMNOTIFY, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify) }) , 'DESCRIPTOR' : _CHATROOMPACKET_CHATROOMDOWNTOUSER, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket.ChatRoomDownToUser) }) , 'DESCRIPTOR' : _CHATROOMPACKET, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoomPacket) }) _sym_db.RegisterMessage(ChatRoomPacket) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomUpToServer) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomUpToServer.ApplyJoinChatRoomRequest) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.CreateChatRoomResponse) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.ApplyJoinChatRoomResponse) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.QuitChatRoomResponse) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.ChatRoomNewMsg) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.MemberJoinChatRoomNotify) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.MemberQuitChatRoomNotify) _sym_db.RegisterMessage(ChatRoomPacket.ChatRoomDownToUser.ChatRoomMNotify) ChatRoom = _reflection.GeneratedProtocolMessageType('ChatRoom', (_message.Message,), { 'DESCRIPTOR' : _CHATROOM, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.ChatRoom) }) _sym_db.RegisterMessage(ChatRoom) CRUser = _reflection.GeneratedProtocolMessageType('CRUser', (_message.Message,), { 'DESCRIPTOR' : _CRUSER, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.CRUser) }) _sym_db.RegisterMessage(CRUser) CRPair = _reflection.GeneratedProtocolMessageType('CRPair', (_message.Message,), { 'DESCRIPTOR' : _CRPAIR, '__module__' : 'huajiao_pb2' # @@protoc_insertion_point(class_scope:HuaJiaoPack.CRPair) }) _sym_db.RegisterMessage(CRPair) # @@protoc_insertion_point(module_scope) ================================================ FILE: danmu/danmaku/huomao.py ================================================ import struct import aiohttp import json class HuoMao: heartbeat = b'\x00\x00\x00\x10\x00\x10\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01' # heartbeat = struct.pack('!ihhii', 16,16,1,2,1) heartbeatInterval = 30 @staticmethod async def get_ws_info(url): goim = 'http://www.huomao.com/ajax/goimConf?type=h5' headers = { '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'} async with aiohttp.ClientSession() as session: async with session.get(goim, headers=headers) as resp: info = json.loads(await resp.text()) webSocketUrls = info.get('host_wss', 0) rid = int(url.split('/')[-1]) reg_datas = [] tokenBody = json.dumps({"Uid": 0, "Rid": rid}, separators=(',', ':')) bodyBuf = tokenBody.encode('ascii') headerBuf = struct.pack('!ihhii', (16 + len(bodyBuf)), 16, 1, 7, 1) data = headerBuf + bodyBuf reg_datas.append(data) return webSocketUrls, reg_datas @staticmethod def decode_msg(data): packetLen, headerLen, ver, op, seq = struct.unpack('!ihhii', data[0:16]) msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} if op == 5: offset = 0 while offset < len(data): packetLen, headerLen, ver = struct.unpack('!ihh', data[offset:(offset + 8)]) msgBody = data[offset + headerLen:offset + packetLen] offset += packetLen body = json.loads(msgBody.decode('utf8')) if body.get('code', 0) == '100001': msg['name'] = body['speak']['user']['name'] msg['content'] = body['speak']['barrage']['msg'] msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs msgs.append(msg) return msgs ================================================ FILE: danmu/danmaku/huya.py ================================================ import re import aiohttp from .tars import tarscore class Huya: wss_url = 'wss://cdnws.api.huya.com/' 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' \ 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' \ 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' \ 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' \ b'\x01\x7c\x82\x00\x0b\xb0\x1f\x9c\xac\x0b\x8c\x98\x0c\xa8\x0c ' heartbeatInterval = 60 @staticmethod async def get_ws_info(url): reg_datas = [] url = 'https://m.huya.com/' + url.split('/')[-1] headers = { 'user-agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, ' 'like Gecko) Chrome/79.0.3945.88 Mobile Safari/537.36'} async with aiohttp.ClientSession() as session: async with session.get(url, headers=headers) as resp: room_page = await resp.text() m = re.search(r"lYyid\":([0-9]+)", room_page, re.MULTILINE) ayyuid = m.group(1) m = re.search(r"lChannelId\":([0-9]+)", room_page, re.MULTILINE) tid = m.group(1) m = re.search(r"lSubChannelId\":([0-9]+)", room_page, re.MULTILINE) sid = m.group(1) oos = tarscore.TarsOutputStream() oos.write(tarscore.int64, 0, int(ayyuid)) oos.write(tarscore.boolean, 1, True) # Anonymous oos.write(tarscore.string, 2, "") # sGuid oos.write(tarscore.string, 3, "") oos.write(tarscore.int64, 4, int(tid)) oos.write(tarscore.int64, 5, int(sid)) oos.write(tarscore.int64, 6, 0) oos.write(tarscore.int64, 7, 0) wscmd = tarscore.TarsOutputStream() wscmd.write(tarscore.int32, 0, 1) wscmd.write(tarscore.bytes, 1, oos.getBuffer()) reg_datas.append(wscmd.getBuffer()) return Huya.wss_url, reg_datas @staticmethod def decode_msg(data): class user(tarscore.struct): def readFrom(ios): return ios.read(tarscore.string, 2, False).decode('utf8') name = '' content = '' msgs = [] ios = tarscore.TarsInputStream(data) if ios.read(tarscore.int32, 0, False) == 7: ios = tarscore.TarsInputStream(ios.read(tarscore.bytes, 1, False)) if ios.read(tarscore.int64, 1, False) == 1400: ios = tarscore.TarsInputStream(ios.read(tarscore.bytes, 2, False)) name = ios.read(user, 0, False) # username content = ios.read(tarscore.string, 3, False).decode('utf8') # content if name != '': msg = {'name': name, 'content': content, 'msg_type': 'danmaku'} else: msg = {'name': '', 'content': '', 'msg_type': 'other'} msgs.append(msg) return msgs ================================================ FILE: danmu/danmaku/inke.py ================================================ import aiohttp import re import time import json class Inke: heartbeat = None @staticmethod async def get_ws_info(url): uid = re.search(r'uid=(\d+)', url).group(1) roomid = id = re.search(r'&id=(\d+)', url).group(1) t = int(time.time() * 1e3) cr = 'https://chatroom.inke.cn/url?roomid={}&uid={}&id={}&access_from=pc_web&_t={}'.format(roomid, uid, id, t) async with aiohttp.ClientSession() as session: async with session.get(cr) as resp: res = await resp.text() wss_url = json.loads(res).get('url') return wss_url, None @staticmethod def decode_msg(data): msgs = [] name = content = '' msg_type = 'other' message = json.loads(data) ms = message['ms'] c = ms[-1].get('c', 0) if c: tp = ms[-1].get('tp', 0) if tp == 'pub' or tp == 'color': name = ms[0].get('from').get('nic', '') elif tp == 'user_join_tip': name = ms[0].get('u').get('nic', '') else: name = 'sys' content = c msg_type = 'danmaku' msg = {'name': name, 'content': content, 'msg_type': msg_type} msgs.append(msg) return msgs ================================================ FILE: danmu/danmaku/kuaishou.proto ================================================ syntax = "proto2"; package KuaiShouPack; message CSWebHeartbeat { optional uint64 timestamp = 1; } message SocketMessage { optional PayloadType payloadType = 1; optional CompressionType compressionType = 2; optional bytes payload = 3; enum CompressionType { UNKNOWN = 0; NONE = 1; GZIP = 2; AES = 3; } } enum PayloadType { UNKNOWN = 0; CS_HEARTBEAT = 1; CS_ERROR = 3; CS_PING = 4; PS_HOST_INFO = 51; SC_HEARTBEAT_ACK = 101; SC_ECHO = 102; SC_ERROR = 103; SC_PING_ACK = 104; SC_INFO = 105; CS_ENTER_ROOM = 200; CS_USER_PAUSE = 201; CS_USER_EXIT = 202; CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203; CS_HORSE_RACING = 204; CS_RACE_LOSE = 205; CS_VOIP_SIGNAL = 206; SC_ENTER_ROOM_ACK = 300; SC_AUTHOR_PAUSE = 301; SC_AUTHOR_RESUME = 302; SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303; SC_AUTHOR_HEARTBEAT_MISS = 304; SC_PIP_STARTED = 305; SC_PIP_ENDED = 306; SC_HORSE_RACING_ACK = 307; SC_VOIP_SIGNAL = 308; SC_FEED_PUSH = 310; SC_ASSISTANT_STATUS = 311; SC_REFRESH_WALLET = 312; SC_LIVE_CHAT_CALL = 320; SC_LIVE_CHAT_CALL_ACCEPTED = 321; SC_LIVE_CHAT_CALL_REJECTED = 322; SC_LIVE_CHAT_READY = 323; SC_LIVE_CHAT_GUEST_END = 324; SC_LIVE_CHAT_ENDED = 325; SC_RENDERING_MAGIC_FACE_DISABLE = 326; SC_RENDERING_MAGIC_FACE_ENABLE = 327; SC_RED_PACK_FEED = 330; SC_LIVE_WATCHING_LIST = 340; SC_LIVE_QUIZ_QUESTION_ASKED = 350; SC_LIVE_QUIZ_QUESTION_REVIEWED = 351; SC_LIVE_QUIZ_SYNC = 352; SC_LIVE_QUIZ_ENDED = 353; SC_LIVE_QUIZ_WINNERS = 354; SC_SUSPECTED_VIOLATION = 355; SC_SHOP_OPENED = 360; SC_SHOP_CLOSED = 361; SC_GUESS_OPENED = 370; SC_GUESS_CLOSED = 371; SC_PK_INVITATION = 380; SC_PK_STATISTIC = 381; SC_RIDDLE_OPENED = 390; SC_RIDDLE_CLOESED = 391; SC_RIDE_CHANGED = 412; SC_BET_CHANGED = 441; SC_BET_CLOSED = 442; SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645; } message CSWebEnterRoom { optional string token = 1; optional string liveStreamId = 2; optional uint32 reconnectCount = 3; optional uint32 lastErrorCode = 4; optional string expTag = 5; optional string attach = 6; optional string pageId = 7; } message SCWebFeedPush { optional string displayWatchingCount = 1; optional string displayLikeCount = 2; optional uint64 pendingLikeCount = 3; optional uint64 pushInterval = 4; repeated WebCommentFeed commentFeeds = 5; optional string commentCursor = 6; repeated WebComboCommentFeed comboCommentFeed = 7; repeated WebLikeFeed likeFeeds = 8; repeated WebGiftFeed giftFeeds = 9; optional string giftCursor = 10; repeated WebSystemNoticeFeed systemNoticeFeeds = 11; repeated WebShareFeed shareFeeds = 12; } message WebCommentFeed { optional string id = 1; optional SimpleUserInfo user = 2; optional string content = 3; optional string deviceHash = 4; optional uint64 sortRank = 5; optional string color = 6; optional WebCommentFeedShowType showType = 7; } message SimpleUserInfo { optional string principalId = 1; optional string userName = 2; optional string headUrl = 3; } enum WebCommentFeedShowType { FEED_SHOW_UNKNOWN = 0; FEED_SHOW_NORMAL = 1; FEED_HIDDEN = 2; } message WebComboCommentFeed { optional string id = 1; optional string content = 2; optional uint32 comboCount = 3; } message WebLikeFeed { optional string id = 1; optional SimpleUserInfo user = 2; optional uint64 sortRank = 3; optional string deviceHash = 4; } message WebGiftFeed { optional string id = 1; optional SimpleUserInfo user = 2; optional uint64 time = 3; optional uint32 giftId = 4; optional uint64 sortRank = 5; optional string mergeKey = 6; optional uint32 batchSize = 7; optional uint32 comboCount = 8; optional uint32 rank = 9; optional uint64 expireDuration = 10; optional uint64 clientTimestamp = 11; optional uint64 slotDisplayDuration = 12; optional uint32 starLevel = 13; optional StyleType styleType = 14; optional WebLiveAssistantType liveAssistantType = 15; optional string deviceHash = 16; optional bool danmakuDisplay = 17; enum StyleType { UNKNOWN_STYLE = 0; BATCH_STAR_0 = 1; BATCH_STAR_1 = 2; BATCH_STAR_2 = 3; BATCH_STAR_3 = 4; BATCH_STAR_4 = 5; BATCH_STAR_5 = 6; BATCH_STAR_6 = 7; } } enum WebLiveAssistantType { UNKNOWN_ASSISTANT_TYPE = 0; SUPER = 1; JUNIOR = 2; } message WebSystemNoticeFeed { optional string id = 1; optional SimpleUserInfo user = 2; optional uint64 time = 3; optional string content = 4; optional uint64 displayDuration = 5; optional uint64 sortRank = 6; optional DisplayType displayType = 7; enum DisplayType { UNKNOWN_DISPLAY_TYPE = 0; COMMENT = 1; ALERT = 2; TOAST = 3; } } message WebShareFeed { optional string id = 1; optional SimpleUserInfo user = 2; optional uint64 time = 3; optional uint32 thirdPartyPlatform = 4; optional uint64 sortRank = 5; optional WebLiveAssistantType liveAssistantType = 6; optional string deviceHash = 7; } ================================================ FILE: danmu/danmaku/kuaishou.py ================================================ from . import kuaishou_pb2 as pb import aiohttp import re import json import time import random class KuaiShou: heartbeatInterval = 20 @staticmethod async def get_ws_info(url): """获取wss连接信息 Args: 直播间完整地址 Returns: webSocketUrls:wss地址 data:第一次send数据 liveStreamId: token: page_id: :param url: """ rid = url.split('/')[-1] url = 'https://m.gifshow.com/fw/live/' + str(rid) # 移动版直播间地址 headers = { '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', 'Cookie': 'did=web_d563dca728d28b00336877723e0359ed'} # 请求失败则更换cookie中的did字段 async with aiohttp.ClientSession() as session: async with session.get(url, headers=headers) as resp: res = await resp.text() wsfeedinfo = re.search(r'wsFeedInfo":(.*),"liveExist', res) if wsfeedinfo: wsfeedinfo = json.loads(wsfeedinfo.group(1)) else: raise Exception('找不到 wsFeedInfo,可能链接错误或 Cookie 过期') livestreamid, [websocketurls], token = wsfeedinfo.values() page_id = KuaiShou.get_page_id() p, s = pb.SocketMessage(), pb.CSWebEnterRoom() s.liveStreamId, s.pageId, s.token = livestreamid, page_id, token p.payload = s.SerializeToString() p.payloadType = 200 reg_data = p.SerializeToString() t = pb.CSWebHeartbeat() t.timestamp = int(time.time() * 1000) p.payload = t.SerializeToString() p.payloadType = 1 KuaiShou.heartbeat = p.SerializeToString() # 心跳可固定 return websocketurls, [reg_data] @staticmethod def get_page_id(): charset = "bjectSymhasOwnProp-0123456789ABCDEFGHIJKLMNQRTUVWXYZ_dfgiklquvxz" page_id = '' for _ in range(0, 16): page_id += random.choice(charset) page_id += "_" page_id += str(int(time.time() * 1000)) return page_id @staticmethod def decode_msg(message): msgs = [{'name': '', 'content': '', 'msg_type': 'other'}] p, s = pb.SocketMessage(), pb.SCWebFeedPush() p.ParseFromString(message) if p.payloadType == 310: s.ParseFromString(p.payload) def f(*feeds): gift = { 1: '荧光棒', 2: '棒棒糖', 3: '荧光棒', 4: 'PCL加油', 7: '么么哒', 9: '啤酒', 10: '甜甜圈', 14: '钻戒', 16: '皇冠', 25: '凤冠', 33: '烟花', 41: '跑车', 56: '稳', 113: '火箭', 114: '玫瑰', 132: '绷带', 133: '平底锅', 135: '红爸爸', 136: '蓝爸爸', 137: '铭文碎片', 143: '太阳女神', 147: '赞', 149: '血瓶', 150: 'carry全场', 152: '大红灯笼', 156: '穿云箭', 159: '膨胀了', 160: '秀你一脸', 161: 'MVP', 163: '加油', 164: '猫粮', 165: '小可爱', 169: '男神', 172: '联盟金猪', 173: '有钱花', 193: '蛋糕', 197: '棒棒糖', 198: '瓜', 199: '小可爱', 201: '赞', 207: '快手卡', 208: '灵狐姐', 216: 'LPL加油', 218: '烟花', 219: '告白气球', 220: '大红灯笼', 221: '怦然心动', 222: '凤冠', 223: '火箭', 224: '跑车', 225: '穿云箭', 226: '金话筒', 227: 'IG冲鸭', 228: 'GRF冲鸭', 229: 'FPX冲鸭', 230: 'FNC冲鸭', 231: 'SKT冲鸭', 232: 'SPY冲鸭', 233: 'DWG冲鸭', 234: 'G2冲鸭', 235: '爆单', 236: '入团券', 237: '陪着你540', 238: '支持牌', 239: '陪着你', 242: '金龙', 243: '豪车幻影', 244: '超级6', 245: '水晶', 246: '金莲', 247: '福袋', 248: '铃铛', 249: '巧克力', 250: '感恩的心', 254: '武汉加油', 256: '金龙', 257: '财神', 258: '金龙', 259: '天鹅湖', 260: '珍珠', 261: '金莲', 262: '招财猫', 263: '铃铛', 264: '巧克力', 266: '幸运魔盒', 267: '吻你', 268: '梦幻城堡', 269: '游乐园', 271: '萌宠', 272: '小雪豹', 275: '喜欢你', 276: '三级头', 277: '喜欢你', 278: '财神', 279: '锦鲤', 281: '廉颇', 282: '开黑卡', 283: '付费直播门票(不下线)', 285: '喜欢你呀', 286: '629', 287: '真爱大炮', 289: '玫瑰花园', 290: '珠峰', 292: '鹿角', 296: '666', 297: '超跑车队', 298: '奥利给', 302: '互粉', 303: '冰棒', 304: '龙之谷', 306: '浪漫游轮', 307: '壁咚', 308: '壁咚', 309: '鹿角', 310: '么么哒', 311: '私人飞机', 312: '巅峰票', 313: '巅峰王者', 315: '莫吉托', 316: '地表最强', 318: '阳光海滩', 319: '12号唱片' } infos = [{'name': '', 'content': '', 'msg_type': 'other'}] for feed in feeds: if feed: for i in feed: name = i.user.userName content = i.content if hasattr(i, 'content') else '送 ' + gift.get(i.giftId, '') \ if hasattr(i, 'giftId') else '点亮了 ❤' info = {'name': name, 'content': content, 'msg_type': 'danmaku'} infos.append(info.copy()) return infos msgs = f(s.commentFeeds, s.giftFeeds, s.likeFeeds) return msgs ================================================ FILE: danmu/danmaku/kuaishou_pb2.py ================================================ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: kuaishou.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='kuaishou.proto', package='KuaiShouPack', syntax='proto2', serialized_options=None, create_key=_descriptor._internal_create_key, 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' ) _PAYLOADTYPE = _descriptor.EnumDescriptor( name='PayloadType', full_name='KuaiShouPack.PayloadType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_HEARTBEAT', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_ERROR', index=2, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_PING', index=3, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='PS_HOST_INFO', index=4, number=51, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_HEARTBEAT_ACK', index=5, number=101, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_ECHO', index=6, number=102, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_ERROR', index=7, number=103, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_PING_ACK', index=8, number=104, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_INFO', index=9, number=105, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_ENTER_ROOM', index=10, number=200, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_USER_PAUSE', index=11, number=201, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_USER_EXIT', index=12, number=202, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_AUTHOR_PUSH_TRAFFIC_ZERO', index=13, number=203, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_HORSE_RACING', index=14, number=204, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_RACE_LOSE', index=15, number=205, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='CS_VOIP_SIGNAL', index=16, number=206, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_ENTER_ROOM_ACK', index=17, number=300, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_AUTHOR_PAUSE', index=18, number=301, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_AUTHOR_RESUME', index=19, number=302, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_AUTHOR_PUSH_TRAFFIC_ZERO', index=20, number=303, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_AUTHOR_HEARTBEAT_MISS', index=21, number=304, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_PIP_STARTED', index=22, number=305, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_PIP_ENDED', index=23, number=306, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_HORSE_RACING_ACK', index=24, number=307, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_VOIP_SIGNAL', index=25, number=308, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_FEED_PUSH', index=26, number=310, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_ASSISTANT_STATUS', index=27, number=311, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_REFRESH_WALLET', index=28, number=312, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_CHAT_CALL', index=29, number=320, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_CHAT_CALL_ACCEPTED', index=30, number=321, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_CHAT_CALL_REJECTED', index=31, number=322, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_CHAT_READY', index=32, number=323, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_CHAT_GUEST_END', index=33, number=324, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_CHAT_ENDED', index=34, number=325, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_RENDERING_MAGIC_FACE_DISABLE', index=35, number=326, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_RENDERING_MAGIC_FACE_ENABLE', index=36, number=327, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_RED_PACK_FEED', index=37, number=330, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_WATCHING_LIST', index=38, number=340, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_QUIZ_QUESTION_ASKED', index=39, number=350, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_QUIZ_QUESTION_REVIEWED', index=40, number=351, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_QUIZ_SYNC', index=41, number=352, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_QUIZ_ENDED', index=42, number=353, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_QUIZ_WINNERS', index=43, number=354, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_SUSPECTED_VIOLATION', index=44, number=355, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_SHOP_OPENED', index=45, number=360, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_SHOP_CLOSED', index=46, number=361, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_GUESS_OPENED', index=47, number=370, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_GUESS_CLOSED', index=48, number=371, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_PK_INVITATION', index=49, number=380, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_PK_STATISTIC', index=50, number=381, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_RIDDLE_OPENED', index=51, number=390, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_RIDDLE_CLOESED', index=52, number=391, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_RIDE_CHANGED', index=53, number=412, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_BET_CHANGED', index=54, number=441, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_BET_CLOSED', index=55, number=442, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE', index=56, number=645, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=2495, serialized_end=3863, ) _sym_db.RegisterEnumDescriptor(_PAYLOADTYPE) PayloadType = enum_type_wrapper.EnumTypeWrapper(_PAYLOADTYPE) _WEBCOMMENTFEEDSHOWTYPE = _descriptor.EnumDescriptor( name='WebCommentFeedShowType', full_name='KuaiShouPack.WebCommentFeedShowType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='FEED_SHOW_UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FEED_SHOW_NORMAL', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FEED_HIDDEN', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=3865, serialized_end=3951, ) _sym_db.RegisterEnumDescriptor(_WEBCOMMENTFEEDSHOWTYPE) WebCommentFeedShowType = enum_type_wrapper.EnumTypeWrapper(_WEBCOMMENTFEEDSHOWTYPE) _WEBLIVEASSISTANTTYPE = _descriptor.EnumDescriptor( name='WebLiveAssistantType', full_name='KuaiShouPack.WebLiveAssistantType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_ASSISTANT_TYPE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='SUPER', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='JUNIOR', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=3953, serialized_end=4026, ) _sym_db.RegisterEnumDescriptor(_WEBLIVEASSISTANTTYPE) WebLiveAssistantType = enum_type_wrapper.EnumTypeWrapper(_WEBLIVEASSISTANTTYPE) UNKNOWN = 0 CS_HEARTBEAT = 1 CS_ERROR = 3 CS_PING = 4 PS_HOST_INFO = 51 SC_HEARTBEAT_ACK = 101 SC_ECHO = 102 SC_ERROR = 103 SC_PING_ACK = 104 SC_INFO = 105 CS_ENTER_ROOM = 200 CS_USER_PAUSE = 201 CS_USER_EXIT = 202 CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203 CS_HORSE_RACING = 204 CS_RACE_LOSE = 205 CS_VOIP_SIGNAL = 206 SC_ENTER_ROOM_ACK = 300 SC_AUTHOR_PAUSE = 301 SC_AUTHOR_RESUME = 302 SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303 SC_AUTHOR_HEARTBEAT_MISS = 304 SC_PIP_STARTED = 305 SC_PIP_ENDED = 306 SC_HORSE_RACING_ACK = 307 SC_VOIP_SIGNAL = 308 SC_FEED_PUSH = 310 SC_ASSISTANT_STATUS = 311 SC_REFRESH_WALLET = 312 SC_LIVE_CHAT_CALL = 320 SC_LIVE_CHAT_CALL_ACCEPTED = 321 SC_LIVE_CHAT_CALL_REJECTED = 322 SC_LIVE_CHAT_READY = 323 SC_LIVE_CHAT_GUEST_END = 324 SC_LIVE_CHAT_ENDED = 325 SC_RENDERING_MAGIC_FACE_DISABLE = 326 SC_RENDERING_MAGIC_FACE_ENABLE = 327 SC_RED_PACK_FEED = 330 SC_LIVE_WATCHING_LIST = 340 SC_LIVE_QUIZ_QUESTION_ASKED = 350 SC_LIVE_QUIZ_QUESTION_REVIEWED = 351 SC_LIVE_QUIZ_SYNC = 352 SC_LIVE_QUIZ_ENDED = 353 SC_LIVE_QUIZ_WINNERS = 354 SC_SUSPECTED_VIOLATION = 355 SC_SHOP_OPENED = 360 SC_SHOP_CLOSED = 361 SC_GUESS_OPENED = 370 SC_GUESS_CLOSED = 371 SC_PK_INVITATION = 380 SC_PK_STATISTIC = 381 SC_RIDDLE_OPENED = 390 SC_RIDDLE_CLOESED = 391 SC_RIDE_CHANGED = 412 SC_BET_CHANGED = 441 SC_BET_CLOSED = 442 SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645 FEED_SHOW_UNKNOWN = 0 FEED_SHOW_NORMAL = 1 FEED_HIDDEN = 2 UNKNOWN_ASSISTANT_TYPE = 0 SUPER = 1 JUNIOR = 2 _SOCKETMESSAGE_COMPRESSIONTYPE = _descriptor.EnumDescriptor( name='CompressionType', full_name='KuaiShouPack.SocketMessage.CompressionType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='NONE', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='GZIP', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='AES', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=222, serialized_end=281, ) _sym_db.RegisterEnumDescriptor(_SOCKETMESSAGE_COMPRESSIONTYPE) _WEBGIFTFEED_STYLETYPE = _descriptor.EnumDescriptor( name='StyleType', full_name='KuaiShouPack.WebGiftFeed.StyleType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_STYLE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_0', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_1', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_2', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_3', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_4', index=5, number=5, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_5', index=6, number=6, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='BATCH_STAR_6', index=7, number=7, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=1822, serialized_end=1978, ) _sym_db.RegisterEnumDescriptor(_WEBGIFTFEED_STYLETYPE) _WEBSYSTEMNOTICEFEED_DISPLAYTYPE = _descriptor.EnumDescriptor( name='DisplayType', full_name='KuaiShouPack.WebSystemNoticeFeed.DisplayType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='UNKNOWN_DISPLAY_TYPE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='COMMENT', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='ALERT', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='TOAST', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=2202, serialized_end=2276, ) _sym_db.RegisterEnumDescriptor(_WEBSYSTEMNOTICEFEED_DISPLAYTYPE) _CSWEBHEARTBEAT = _descriptor.Descriptor( name='CSWebHeartbeat', full_name='KuaiShouPack.CSWebHeartbeat', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='timestamp', full_name='KuaiShouPack.CSWebHeartbeat.timestamp', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=32, serialized_end=67, ) _SOCKETMESSAGE = _descriptor.Descriptor( name='SocketMessage', full_name='KuaiShouPack.SocketMessage', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='payloadType', full_name='KuaiShouPack.SocketMessage.payloadType', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='compressionType', full_name='KuaiShouPack.SocketMessage.compressionType', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='payload', full_name='KuaiShouPack.SocketMessage.payload', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _SOCKETMESSAGE_COMPRESSIONTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=70, serialized_end=281, ) _CSWEBENTERROOM = _descriptor.Descriptor( name='CSWebEnterRoom', full_name='KuaiShouPack.CSWebEnterRoom', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='token', full_name='KuaiShouPack.CSWebEnterRoom.token', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='liveStreamId', full_name='KuaiShouPack.CSWebEnterRoom.liveStreamId', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='reconnectCount', full_name='KuaiShouPack.CSWebEnterRoom.reconnectCount', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='lastErrorCode', full_name='KuaiShouPack.CSWebEnterRoom.lastErrorCode', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='expTag', full_name='KuaiShouPack.CSWebEnterRoom.expTag', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='attach', full_name='KuaiShouPack.CSWebEnterRoom.attach', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pageId', full_name='KuaiShouPack.CSWebEnterRoom.pageId', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=284, serialized_end=432, ) _SCWEBFEEDPUSH = _descriptor.Descriptor( name='SCWebFeedPush', full_name='KuaiShouPack.SCWebFeedPush', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='displayWatchingCount', full_name='KuaiShouPack.SCWebFeedPush.displayWatchingCount', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='displayLikeCount', full_name='KuaiShouPack.SCWebFeedPush.displayLikeCount', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pendingLikeCount', full_name='KuaiShouPack.SCWebFeedPush.pendingLikeCount', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pushInterval', full_name='KuaiShouPack.SCWebFeedPush.pushInterval', index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='commentFeeds', full_name='KuaiShouPack.SCWebFeedPush.commentFeeds', index=4, number=5, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='commentCursor', full_name='KuaiShouPack.SCWebFeedPush.commentCursor', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='comboCommentFeed', full_name='KuaiShouPack.SCWebFeedPush.comboCommentFeed', index=6, number=7, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='likeFeeds', full_name='KuaiShouPack.SCWebFeedPush.likeFeeds', index=7, number=8, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftFeeds', full_name='KuaiShouPack.SCWebFeedPush.giftFeeds', index=8, number=9, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftCursor', full_name='KuaiShouPack.SCWebFeedPush.giftCursor', index=9, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='systemNoticeFeeds', full_name='KuaiShouPack.SCWebFeedPush.systemNoticeFeeds', index=10, number=11, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='shareFeeds', full_name='KuaiShouPack.SCWebFeedPush.shareFeeds', index=11, number=12, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=435, serialized_end=912, ) _WEBCOMMENTFEED = _descriptor.Descriptor( name='WebCommentFeed', full_name='KuaiShouPack.WebCommentFeed', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuaiShouPack.WebCommentFeed.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='KuaiShouPack.WebCommentFeed.user', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='content', full_name='KuaiShouPack.WebCommentFeed.content', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceHash', full_name='KuaiShouPack.WebCommentFeed.deviceHash', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sortRank', full_name='KuaiShouPack.WebCommentFeed.sortRank', index=4, number=5, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='color', full_name='KuaiShouPack.WebCommentFeed.color', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='showType', full_name='KuaiShouPack.WebCommentFeed.showType', index=6, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=915, serialized_end=1113, ) _SIMPLEUSERINFO = _descriptor.Descriptor( name='SimpleUserInfo', full_name='KuaiShouPack.SimpleUserInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='principalId', full_name='KuaiShouPack.SimpleUserInfo.principalId', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userName', full_name='KuaiShouPack.SimpleUserInfo.userName', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='headUrl', full_name='KuaiShouPack.SimpleUserInfo.headUrl', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1115, serialized_end=1187, ) _WEBCOMBOCOMMENTFEED = _descriptor.Descriptor( name='WebComboCommentFeed', full_name='KuaiShouPack.WebComboCommentFeed', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuaiShouPack.WebComboCommentFeed.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='content', full_name='KuaiShouPack.WebComboCommentFeed.content', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='comboCount', full_name='KuaiShouPack.WebComboCommentFeed.comboCount', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1189, serialized_end=1259, ) _WEBLIKEFEED = _descriptor.Descriptor( name='WebLikeFeed', full_name='KuaiShouPack.WebLikeFeed', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuaiShouPack.WebLikeFeed.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='KuaiShouPack.WebLikeFeed.user', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sortRank', full_name='KuaiShouPack.WebLikeFeed.sortRank', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceHash', full_name='KuaiShouPack.WebLikeFeed.deviceHash', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1261, serialized_end=1368, ) _WEBGIFTFEED = _descriptor.Descriptor( name='WebGiftFeed', full_name='KuaiShouPack.WebGiftFeed', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuaiShouPack.WebGiftFeed.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='KuaiShouPack.WebGiftFeed.user', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='time', full_name='KuaiShouPack.WebGiftFeed.time', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftId', full_name='KuaiShouPack.WebGiftFeed.giftId', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sortRank', full_name='KuaiShouPack.WebGiftFeed.sortRank', index=4, number=5, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='mergeKey', full_name='KuaiShouPack.WebGiftFeed.mergeKey', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='batchSize', full_name='KuaiShouPack.WebGiftFeed.batchSize', index=6, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='comboCount', full_name='KuaiShouPack.WebGiftFeed.comboCount', index=7, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rank', full_name='KuaiShouPack.WebGiftFeed.rank', index=8, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='expireDuration', full_name='KuaiShouPack.WebGiftFeed.expireDuration', index=9, number=10, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientTimestamp', full_name='KuaiShouPack.WebGiftFeed.clientTimestamp', index=10, number=11, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='slotDisplayDuration', full_name='KuaiShouPack.WebGiftFeed.slotDisplayDuration', index=11, number=12, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='starLevel', full_name='KuaiShouPack.WebGiftFeed.starLevel', index=12, number=13, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='styleType', full_name='KuaiShouPack.WebGiftFeed.styleType', index=13, number=14, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='liveAssistantType', full_name='KuaiShouPack.WebGiftFeed.liveAssistantType', index=14, number=15, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceHash', full_name='KuaiShouPack.WebGiftFeed.deviceHash', index=15, number=16, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='danmakuDisplay', full_name='KuaiShouPack.WebGiftFeed.danmakuDisplay', index=16, number=17, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _WEBGIFTFEED_STYLETYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1371, serialized_end=1978, ) _WEBSYSTEMNOTICEFEED = _descriptor.Descriptor( name='WebSystemNoticeFeed', full_name='KuaiShouPack.WebSystemNoticeFeed', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuaiShouPack.WebSystemNoticeFeed.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='KuaiShouPack.WebSystemNoticeFeed.user', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='time', full_name='KuaiShouPack.WebSystemNoticeFeed.time', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='content', full_name='KuaiShouPack.WebSystemNoticeFeed.content', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='displayDuration', full_name='KuaiShouPack.WebSystemNoticeFeed.displayDuration', index=4, number=5, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sortRank', full_name='KuaiShouPack.WebSystemNoticeFeed.sortRank', index=5, number=6, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='displayType', full_name='KuaiShouPack.WebSystemNoticeFeed.displayType', index=6, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ _WEBSYSTEMNOTICEFEED_DISPLAYTYPE, ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1981, serialized_end=2276, ) _WEBSHAREFEED = _descriptor.Descriptor( name='WebShareFeed', full_name='KuaiShouPack.WebShareFeed', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuaiShouPack.WebShareFeed.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='user', full_name='KuaiShouPack.WebShareFeed.user', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='time', full_name='KuaiShouPack.WebShareFeed.time', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='thirdPartyPlatform', full_name='KuaiShouPack.WebShareFeed.thirdPartyPlatform', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sortRank', full_name='KuaiShouPack.WebShareFeed.sortRank', index=4, number=5, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='liveAssistantType', full_name='KuaiShouPack.WebShareFeed.liveAssistantType', index=5, number=6, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceHash', full_name='KuaiShouPack.WebShareFeed.deviceHash', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2279, serialized_end=2492, ) _SOCKETMESSAGE.fields_by_name['payloadType'].enum_type = _PAYLOADTYPE _SOCKETMESSAGE.fields_by_name['compressionType'].enum_type = _SOCKETMESSAGE_COMPRESSIONTYPE _SOCKETMESSAGE_COMPRESSIONTYPE.containing_type = _SOCKETMESSAGE _SCWEBFEEDPUSH.fields_by_name['commentFeeds'].message_type = _WEBCOMMENTFEED _SCWEBFEEDPUSH.fields_by_name['comboCommentFeed'].message_type = _WEBCOMBOCOMMENTFEED _SCWEBFEEDPUSH.fields_by_name['likeFeeds'].message_type = _WEBLIKEFEED _SCWEBFEEDPUSH.fields_by_name['giftFeeds'].message_type = _WEBGIFTFEED _SCWEBFEEDPUSH.fields_by_name['systemNoticeFeeds'].message_type = _WEBSYSTEMNOTICEFEED _SCWEBFEEDPUSH.fields_by_name['shareFeeds'].message_type = _WEBSHAREFEED _WEBCOMMENTFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO _WEBCOMMENTFEED.fields_by_name['showType'].enum_type = _WEBCOMMENTFEEDSHOWTYPE _WEBLIKEFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO _WEBGIFTFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO _WEBGIFTFEED.fields_by_name['styleType'].enum_type = _WEBGIFTFEED_STYLETYPE _WEBGIFTFEED.fields_by_name['liveAssistantType'].enum_type = _WEBLIVEASSISTANTTYPE _WEBGIFTFEED_STYLETYPE.containing_type = _WEBGIFTFEED _WEBSYSTEMNOTICEFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO _WEBSYSTEMNOTICEFEED.fields_by_name['displayType'].enum_type = _WEBSYSTEMNOTICEFEED_DISPLAYTYPE _WEBSYSTEMNOTICEFEED_DISPLAYTYPE.containing_type = _WEBSYSTEMNOTICEFEED _WEBSHAREFEED.fields_by_name['user'].message_type = _SIMPLEUSERINFO _WEBSHAREFEED.fields_by_name['liveAssistantType'].enum_type = _WEBLIVEASSISTANTTYPE DESCRIPTOR.message_types_by_name['CSWebHeartbeat'] = _CSWEBHEARTBEAT DESCRIPTOR.message_types_by_name['SocketMessage'] = _SOCKETMESSAGE DESCRIPTOR.message_types_by_name['CSWebEnterRoom'] = _CSWEBENTERROOM DESCRIPTOR.message_types_by_name['SCWebFeedPush'] = _SCWEBFEEDPUSH DESCRIPTOR.message_types_by_name['WebCommentFeed'] = _WEBCOMMENTFEED DESCRIPTOR.message_types_by_name['SimpleUserInfo'] = _SIMPLEUSERINFO DESCRIPTOR.message_types_by_name['WebComboCommentFeed'] = _WEBCOMBOCOMMENTFEED DESCRIPTOR.message_types_by_name['WebLikeFeed'] = _WEBLIKEFEED DESCRIPTOR.message_types_by_name['WebGiftFeed'] = _WEBGIFTFEED DESCRIPTOR.message_types_by_name['WebSystemNoticeFeed'] = _WEBSYSTEMNOTICEFEED DESCRIPTOR.message_types_by_name['WebShareFeed'] = _WEBSHAREFEED DESCRIPTOR.enum_types_by_name['PayloadType'] = _PAYLOADTYPE DESCRIPTOR.enum_types_by_name['WebCommentFeedShowType'] = _WEBCOMMENTFEEDSHOWTYPE DESCRIPTOR.enum_types_by_name['WebLiveAssistantType'] = _WEBLIVEASSISTANTTYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) CSWebHeartbeat = _reflection.GeneratedProtocolMessageType('CSWebHeartbeat', (_message.Message,), { 'DESCRIPTOR' : _CSWEBHEARTBEAT, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.CSWebHeartbeat) }) _sym_db.RegisterMessage(CSWebHeartbeat) SocketMessage = _reflection.GeneratedProtocolMessageType('SocketMessage', (_message.Message,), { 'DESCRIPTOR' : _SOCKETMESSAGE, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.SocketMessage) }) _sym_db.RegisterMessage(SocketMessage) CSWebEnterRoom = _reflection.GeneratedProtocolMessageType('CSWebEnterRoom', (_message.Message,), { 'DESCRIPTOR' : _CSWEBENTERROOM, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.CSWebEnterRoom) }) _sym_db.RegisterMessage(CSWebEnterRoom) SCWebFeedPush = _reflection.GeneratedProtocolMessageType('SCWebFeedPush', (_message.Message,), { 'DESCRIPTOR' : _SCWEBFEEDPUSH, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.SCWebFeedPush) }) _sym_db.RegisterMessage(SCWebFeedPush) WebCommentFeed = _reflection.GeneratedProtocolMessageType('WebCommentFeed', (_message.Message,), { 'DESCRIPTOR' : _WEBCOMMENTFEED, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.WebCommentFeed) }) _sym_db.RegisterMessage(WebCommentFeed) SimpleUserInfo = _reflection.GeneratedProtocolMessageType('SimpleUserInfo', (_message.Message,), { 'DESCRIPTOR' : _SIMPLEUSERINFO, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.SimpleUserInfo) }) _sym_db.RegisterMessage(SimpleUserInfo) WebComboCommentFeed = _reflection.GeneratedProtocolMessageType('WebComboCommentFeed', (_message.Message,), { 'DESCRIPTOR' : _WEBCOMBOCOMMENTFEED, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.WebComboCommentFeed) }) _sym_db.RegisterMessage(WebComboCommentFeed) WebLikeFeed = _reflection.GeneratedProtocolMessageType('WebLikeFeed', (_message.Message,), { 'DESCRIPTOR' : _WEBLIKEFEED, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.WebLikeFeed) }) _sym_db.RegisterMessage(WebLikeFeed) WebGiftFeed = _reflection.GeneratedProtocolMessageType('WebGiftFeed', (_message.Message,), { 'DESCRIPTOR' : _WEBGIFTFEED, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.WebGiftFeed) }) _sym_db.RegisterMessage(WebGiftFeed) WebSystemNoticeFeed = _reflection.GeneratedProtocolMessageType('WebSystemNoticeFeed', (_message.Message,), { 'DESCRIPTOR' : _WEBSYSTEMNOTICEFEED, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.WebSystemNoticeFeed) }) _sym_db.RegisterMessage(WebSystemNoticeFeed) WebShareFeed = _reflection.GeneratedProtocolMessageType('WebShareFeed', (_message.Message,), { 'DESCRIPTOR' : _WEBSHAREFEED, '__module__' : 'kuaishou_pb2' # @@protoc_insertion_point(class_scope:KuaiShouPack.WebShareFeed) }) _sym_db.RegisterMessage(WebShareFeed) # @@protoc_insertion_point(module_scope) ================================================ FILE: danmu/danmaku/kugou.proto ================================================ syntax = "proto2"; package KuGouPack; message LoginRequest { optional int32 cmd = 1; optional int32 roomid = 2; optional int64 kugouid = 3; optional string token = 4; optional string key = 5; optional int32 appid = 6; optional int32 platid = 7; optional int32 subplatid = 8; optional string version = 9; optional string deviceNo = 10; optional string imei = 11; optional int32 v = 12; optional int32 referer = 13; optional int32 clientid = 14; optional string soctoken = 15; optional string offset = 16; optional int32 appChannel = 17; optional string sid = 18; optional int32 source = 19; optional string uuid = 20; optional string systemVersion = 21; optional string entryid = 22; optional string socsid = 23; optional string deviceid = 24; } message LoginResponse { optional string nickname = 1; optional int32 richlevel = 2; optional int64 userid = 3; optional int64 kugouid = 4; optional int32 fanstags = 5; optional int32 v = 6; optional int32 referer = 7; optional string wellcomes = 8; optional string img = 9; } message ErrorResponse { optional int32 cmd = 1; optional int32 type = 2; optional int64 seq = 3; optional int32 status = 4; optional int32 errorno = 5; optional string msg = 6; optional string socsid = 7; } message ChatResponse { optional string chatmsg = 1; optional int64 senderid = 2; optional int64 senderkugouid = 3; optional string sendername = 4; optional int32 senderrichlevel = 5; optional int64 receiverid = 6; optional int64 receiverkugouid = 7; optional string receivername = 8; optional int32 receiverrichlevel = 9; optional int32 issecrect = 10; optional AdditionalInfo additionalInfo = 11; optional int32 v = 12; optional int64 seq = 13; optional int32 isa = 14; optional int32 rlight = 15; optional int32 rdiffExp = 16; optional int32 rsvip = 17; optional int32 rsvipl = 18; optional string mac = 19; optional Complain complain = 20; } message AdditionalInfo { optional int32 fanstags = 1; } message Complain { optional string msg = 1; optional string url = 2; } message Message { optional string offset = 1; optional int32 ack = 2; optional int32 rpt = 3; optional string msgId = 4; optional MCompression compression = 5; optional MCodec codec = 6; optional bytes content = 7; } message ContentMessage { optional int32 cmd = 1; optional bytes content = 2; optional int32 roomid = 3; optional int64 receiverid = 4; optional int64 receiverkugouid = 5; optional int64 senderid = 6; optional int64 sendkugouid = 7; optional int32 appId = 8; optional int64 gid = 9; optional int32 rpt = 10; optional int64 time = 11; optional int64 plev = 12; optional int64 pvalue = 13; optional bytes ext = 14; optional Sinfo sinfo = 15; optional MCodec codec = 16; optional Risk risk = 17; } message Risk { optional string m = 1; optional string l = 2; optional int32 t = 3; } message Sinfo { optional int32 light = 1; optional int32 de = 2; optional int32 svip = 3; optional int32 svipl = 4; optional int32 ck = 5; optional string ckname = 6; optional string skname = 7; optional string ckid = 8; optional string ckimg = 9; optional string logo = 10; optional int32 sex = 11; optional int32 bt = 12; } enum MCompression { M_NONE = 0; M_GZIP = 1; M_LZ4 = 2; M_SNAPPY = 3; M_ZSTD = 4; } enum MCodec { M_JSON = 0; M_PROTOBUF = 1; } message Extension { optional int32 ui = 1; optional int32 isSpRoom = 2; optional StliVo stli = 3; optional VipDataVo vipData = 4; optional UsingMountVo usingMount = 5; optional UsingMedalVo usingMedal = 6; optional HonorMedalVo honorMedal = 7; optional UserGuardVo userGuard = 8; optional LittleGuardVo littleGuard = 9; optional WoreUserPlateVo defaultPlate = 10; optional string plateName = 11; optional int32 starCard = 12; optional int32 external = 13; optional string exMemo = 14; optional bool p = 15; optional int32 worship = 16; optional BubbleVo bubble = 17; optional int32 z = 18; optional int32 isGoldFans = 19; optional string token = 20; optional int64 kugouId = 21; optional StarFollowerVo starFollower = 22; optional int32 v_tme = 23; optional int32 v_kg = 24; optional string ar = 25; optional int32 isAndroid = 26; optional int32 clientPlat = 27; optional int32 blackCard = 28; optional int32 v_l = 29; optional BossGroupVo bossGroup = 30; optional CeremonyVo ceremony = 31; optional int32 referer = 32; optional int32 isNew = 33; } message StliVo { optional int32 st = 1; optional int32 sl = 2; optional int32 isAdmin = 3; } message VipDataVo { optional int32 v = 1; optional string c = 2; optional int32 vl = 3; } message UsingMountVo { optional string id = 1; optional string n = 2; optional string swf = 3; optional string bi = 4; optional string si = 5; optional string p = 6; optional int32 s = 7; } message UsingMedalVo { optional string medalList = 1; } message HonorMedalVo { optional string honorList = 1; } message UserGuardVo { optional string g = 1; optional string i = 2; } message LittleGuardVo { optional int32 l = 1; optional int32 g = 2; } message WoreUserPlateVo { optional int64 kid = 1; optional string plateName = 2; optional int32 type = 3; optional int32 l = 4; optional int32 i = 5; } message BubbleVo { optional int32 id = 1; optional string bg = 2; } message StarFollowerVo { optional int32 l = 1; } message BossGroupVo { optional int64 gid = 1; optional string gn = 2; optional int32 gr = 3; } message CeremonyVo { optional int32 pl = 1; } ================================================ FILE: danmu/danmaku/kugou.py ================================================ from . import kugou_pb2 as pb import struct import requests class InitKugou: def __init__(self): self.MAGIC = { 'index': 0, 'length': 1, 'value': 100 } self.VERSION = { 'index': 1, 'length': 2, 'value': 1 } self.TYPE = { 'index': 2, 'length': 1, 'value': 1 } self.HEADER = { 'index': 3, 'length': 2, 'value': 12 } self.CMD = { 'index': 4, 'length': 4, 'value': 0 } self.PAYLOAD = { 'index': 5, 'length': 4, 'value': 0 } self.ATTR = { 'index': 6, 'length': 1, 'value': 0 } self.CRC = { 'index': 7, 'length': 2, 'value': 0 } self.SKIP = { 'index': 8, 'length': 1, 'value': 0 } self.f = [self.MAGIC, self.VERSION, self.TYPE, self.HEADER, self.CMD, self.PAYLOAD, self.ATTR, self.CRC, self.SKIP] def reg(self, rid): url = 'https://fx2.service.kugou.com/socket_scheduler/pc/v2/address.jsonp' payload = { 'rid': rid, '_v': '7.0.0', '_p': 0, 'pv': 20191231, 'at': 102, 'cid': 105 } with requests.Session() as s: r = s.get(url, params=payload).json() soctoken = r['data']['soctoken'] reg_data = { 'appid': 1010, 'clientid': 105, 'cmd': 201, 'deviceNo': '4edc0e89-ccaf-452c-bce4-00f4cb6bb5bb', 'kugouid': 0, 'platid': 18, 'referer': 0, 'roomid': rid, 'sid': '8b9b79a7-a742-4397-fcc0-94efa3a1c920', 'soctoken': soctoken, 'v': 20191231 } a = pb.LoginRequest() for k, v in reg_data.items(): setattr(a, k, v) b = pb.Message() b.content = a.SerializeToString() e = b.SerializeToString() reg = self.encode_(e, reg_data['cmd']) return reg def g(self, *e): if len(e) > 1 and e[1]: t = e[1] else: t = 12 n = 0 i = 0 e = e[0] while i < e and i < len(self.f): n += self.f[i]['length'] i += 1 if e == len(self.f): return n + t - 12 else: return n def encode_(self, e, t): n = len(self.f) i = len(e) # r = self.g(n) + i self.PAYLOAD['value'] = i self.CMD['value'] = t buf = b'' for s in self.f: # offset = self.g(s['index']) value = s['value'] if s['length'] == 1: fmt = '!b' elif s['length'] == 2: fmt = '!h' else: fmt = '!i' buf += struct.pack(fmt, value) buf += struct.pack('!i', i) buf = buf[:self.g(n)] + e return buf def v(self, e, t): if t['length'] == 1: fmt = '!b' elif t['length'] == 2: fmt = '!h' else: fmt = '!i' r, = struct.unpack_from(fmt, e, self.g(t['index'])) return r # def k(self, e, i, o=False): # if i == 1: # a = zlib.decompress(e) # elif i == 2: # a = zlib.decompress(e) # else: # a = e # if o: # return self.r(a) # else: # return a # # def r(self, e): # pass def decode_(self, message): t = len(message) n = len(self.f) if t <= 0: return {} if self.v(message, self.TYPE) == 0: return {} r = self.v(message, self.HEADER) cmd = self.v(message, self.CMD) # cmd a = self.g(n, r) if t < a: return {} o = message[a:] # payloadBuffer if not o or not cmd: return msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} if cmd == 201 or cmd == 501: # CMD # 201:LoginResponse,欢迎信息; # 501:ChatResponse,聊天信息; # 602:ContentMessage,礼物信息; # 901:ErrorResponse; s = pb.Message() s.ParseFromString(o) if s.codec == 1: # if s.compression: # s.content = self.k(s.content, s.compression) s1 = pb.ContentMessage() s1.ParseFromString(s.content) if s1.codec == 1: # if hasattr(s1, 'compression'): # s1.content = self.k(s1.content, s1.compression) s2 = pb.ChatResponse() s2.ParseFromString(s1.content) if cmd == 201: msg['name'] = 'SYS' msg['content'] = s2.receivername.replace('%nick', s2.chatmsg) msg['msg_type'] = 'danmaku' elif cmd == 501: msg['name'] = s2.sendername msg['content'] = s2.chatmsg msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs class KuGou: heartbeat = b'\x64\x00\x01\x00' wss_url = 'wss://chat1wss.kugou.com/acksocket' heartbeatInterval = 10 s = InitKugou() @staticmethod async def get_ws_info(url): rid = url.split('/')[-1] reg_data = KuGou.s.reg(int(rid)) return KuGou.wss_url, [reg_data] @staticmethod def decode_msg(data): msgs = KuGou.s.decode_(data) return msgs ================================================ FILE: danmu/danmaku/kugou_pb2.py ================================================ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: kugou.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='kugou.proto', package='KuGouPack', syntax='proto2', serialized_options=None, create_key=_descriptor._internal_create_key, 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' ) _MCOMPRESSION = _descriptor.EnumDescriptor( name='MCompression', full_name='KuGouPack.MCompression', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='M_NONE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='M_GZIP', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='M_LZ4', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='M_SNAPPY', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='M_ZSTD', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=3399, serialized_end=3474, ) _sym_db.RegisterEnumDescriptor(_MCOMPRESSION) MCompression = enum_type_wrapper.EnumTypeWrapper(_MCOMPRESSION) _MCODEC = _descriptor.EnumDescriptor( name='MCodec', full_name='KuGouPack.MCodec', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='M_JSON', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='M_PROTOBUF', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=3476, serialized_end=3512, ) _sym_db.RegisterEnumDescriptor(_MCODEC) MCodec = enum_type_wrapper.EnumTypeWrapper(_MCODEC) M_NONE = 0 M_GZIP = 1 M_LZ4 = 2 M_SNAPPY = 3 M_ZSTD = 4 M_JSON = 0 M_PROTOBUF = 1 _LOGINREQUEST = _descriptor.Descriptor( name='LoginRequest', full_name='KuGouPack.LoginRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cmd', full_name='KuGouPack.LoginRequest.cmd', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='roomid', full_name='KuGouPack.LoginRequest.roomid', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kugouid', full_name='KuGouPack.LoginRequest.kugouid', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='token', full_name='KuGouPack.LoginRequest.token', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='key', full_name='KuGouPack.LoginRequest.key', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appid', full_name='KuGouPack.LoginRequest.appid', index=5, number=6, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='platid', full_name='KuGouPack.LoginRequest.platid', index=6, number=7, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='subplatid', full_name='KuGouPack.LoginRequest.subplatid', index=7, number=8, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='version', full_name='KuGouPack.LoginRequest.version', index=8, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceNo', full_name='KuGouPack.LoginRequest.deviceNo', index=9, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='imei', full_name='KuGouPack.LoginRequest.imei', index=10, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='v', full_name='KuGouPack.LoginRequest.v', index=11, number=12, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='referer', full_name='KuGouPack.LoginRequest.referer', index=12, number=13, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientid', full_name='KuGouPack.LoginRequest.clientid', index=13, number=14, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='soctoken', full_name='KuGouPack.LoginRequest.soctoken', index=14, number=15, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='offset', full_name='KuGouPack.LoginRequest.offset', index=15, number=16, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appChannel', full_name='KuGouPack.LoginRequest.appChannel', index=16, number=17, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sid', full_name='KuGouPack.LoginRequest.sid', index=17, number=18, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='source', full_name='KuGouPack.LoginRequest.source', index=18, number=19, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uuid', full_name='KuGouPack.LoginRequest.uuid', index=19, number=20, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='systemVersion', full_name='KuGouPack.LoginRequest.systemVersion', index=20, number=21, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='entryid', full_name='KuGouPack.LoginRequest.entryid', index=21, number=22, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='socsid', full_name='KuGouPack.LoginRequest.socsid', index=22, number=23, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='deviceid', full_name='KuGouPack.LoginRequest.deviceid', index=23, number=24, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=27, serialized_end=431, ) _LOGINRESPONSE = _descriptor.Descriptor( name='LoginResponse', full_name='KuGouPack.LoginResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='nickname', full_name='KuGouPack.LoginResponse.nickname', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='richlevel', full_name='KuGouPack.LoginResponse.richlevel', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userid', full_name='KuGouPack.LoginResponse.userid', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kugouid', full_name='KuGouPack.LoginResponse.kugouid', index=3, number=4, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fanstags', full_name='KuGouPack.LoginResponse.fanstags', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='v', full_name='KuGouPack.LoginResponse.v', index=5, number=6, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='referer', full_name='KuGouPack.LoginResponse.referer', index=6, number=7, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='wellcomes', full_name='KuGouPack.LoginResponse.wellcomes', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='img', full_name='KuGouPack.LoginResponse.img', index=8, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=434, serialized_end=597, ) _ERRORRESPONSE = _descriptor.Descriptor( name='ErrorResponse', full_name='KuGouPack.ErrorResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cmd', full_name='KuGouPack.ErrorResponse.cmd', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='type', full_name='KuGouPack.ErrorResponse.type', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='seq', full_name='KuGouPack.ErrorResponse.seq', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='status', full_name='KuGouPack.ErrorResponse.status', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='errorno', full_name='KuGouPack.ErrorResponse.errorno', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msg', full_name='KuGouPack.ErrorResponse.msg', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='socsid', full_name='KuGouPack.ErrorResponse.socsid', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=599, serialized_end=716, ) _CHATRESPONSE = _descriptor.Descriptor( name='ChatResponse', full_name='KuGouPack.ChatResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='chatmsg', full_name='KuGouPack.ChatResponse.chatmsg', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='senderid', full_name='KuGouPack.ChatResponse.senderid', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='senderkugouid', full_name='KuGouPack.ChatResponse.senderkugouid', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendername', full_name='KuGouPack.ChatResponse.sendername', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='senderrichlevel', full_name='KuGouPack.ChatResponse.senderrichlevel', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiverid', full_name='KuGouPack.ChatResponse.receiverid', index=5, number=6, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiverkugouid', full_name='KuGouPack.ChatResponse.receiverkugouid', index=6, number=7, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receivername', full_name='KuGouPack.ChatResponse.receivername', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiverrichlevel', full_name='KuGouPack.ChatResponse.receiverrichlevel', index=8, number=9, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='issecrect', full_name='KuGouPack.ChatResponse.issecrect', index=9, number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='additionalInfo', full_name='KuGouPack.ChatResponse.additionalInfo', index=10, number=11, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='v', full_name='KuGouPack.ChatResponse.v', index=11, number=12, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='seq', full_name='KuGouPack.ChatResponse.seq', index=12, number=13, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isa', full_name='KuGouPack.ChatResponse.isa', index=13, number=14, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rlight', full_name='KuGouPack.ChatResponse.rlight', index=14, number=15, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rdiffExp', full_name='KuGouPack.ChatResponse.rdiffExp', index=15, number=16, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rsvip', full_name='KuGouPack.ChatResponse.rsvip', index=16, number=17, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rsvipl', full_name='KuGouPack.ChatResponse.rsvipl', index=17, number=18, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='mac', full_name='KuGouPack.ChatResponse.mac', index=18, number=19, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='complain', full_name='KuGouPack.ChatResponse.complain', index=19, number=20, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=719, serialized_end=1154, ) _ADDITIONALINFO = _descriptor.Descriptor( name='AdditionalInfo', full_name='KuGouPack.AdditionalInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='fanstags', full_name='KuGouPack.AdditionalInfo.fanstags', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1156, serialized_end=1190, ) _COMPLAIN = _descriptor.Descriptor( name='Complain', full_name='KuGouPack.Complain', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='msg', full_name='KuGouPack.Complain.msg', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='url', full_name='KuGouPack.Complain.url', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1192, serialized_end=1228, ) _MESSAGE = _descriptor.Descriptor( name='Message', full_name='KuGouPack.Message', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='offset', full_name='KuGouPack.Message.offset', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ack', full_name='KuGouPack.Message.ack', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rpt', full_name='KuGouPack.Message.rpt', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msgId', full_name='KuGouPack.Message.msgId', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='compression', full_name='KuGouPack.Message.compression', index=4, number=5, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='codec', full_name='KuGouPack.Message.codec', index=5, number=6, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='content', full_name='KuGouPack.Message.content', index=6, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1231, serialized_end=1394, ) _CONTENTMESSAGE = _descriptor.Descriptor( name='ContentMessage', full_name='KuGouPack.ContentMessage', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='cmd', full_name='KuGouPack.ContentMessage.cmd', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='content', full_name='KuGouPack.ContentMessage.content', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='roomid', full_name='KuGouPack.ContentMessage.roomid', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiverid', full_name='KuGouPack.ContentMessage.receiverid', index=3, number=4, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='receiverkugouid', full_name='KuGouPack.ContentMessage.receiverkugouid', index=4, number=5, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='senderid', full_name='KuGouPack.ContentMessage.senderid', index=5, number=6, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sendkugouid', full_name='KuGouPack.ContentMessage.sendkugouid', index=6, number=7, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='appId', full_name='KuGouPack.ContentMessage.appId', index=7, number=8, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gid', full_name='KuGouPack.ContentMessage.gid', index=8, number=9, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rpt', full_name='KuGouPack.ContentMessage.rpt', index=9, number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='time', full_name='KuGouPack.ContentMessage.time', index=10, number=11, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='plev', full_name='KuGouPack.ContentMessage.plev', index=11, number=12, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='pvalue', full_name='KuGouPack.ContentMessage.pvalue', index=12, number=13, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ext', full_name='KuGouPack.ContentMessage.ext', index=13, number=14, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sinfo', full_name='KuGouPack.ContentMessage.sinfo', index=14, number=15, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='codec', full_name='KuGouPack.ContentMessage.codec', index=15, number=16, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='risk', full_name='KuGouPack.ContentMessage.risk', index=16, number=17, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1397, serialized_end=1739, ) _RISK = _descriptor.Descriptor( name='Risk', full_name='KuGouPack.Risk', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='m', full_name='KuGouPack.Risk.m', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='l', full_name='KuGouPack.Risk.l', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='t', full_name='KuGouPack.Risk.t', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1741, serialized_end=1780, ) _SINFO = _descriptor.Descriptor( name='Sinfo', full_name='KuGouPack.Sinfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='light', full_name='KuGouPack.Sinfo.light', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='de', full_name='KuGouPack.Sinfo.de', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='svip', full_name='KuGouPack.Sinfo.svip', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='svipl', full_name='KuGouPack.Sinfo.svipl', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ck', full_name='KuGouPack.Sinfo.ck', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ckname', full_name='KuGouPack.Sinfo.ckname', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='skname', full_name='KuGouPack.Sinfo.skname', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ckid', full_name='KuGouPack.Sinfo.ckid', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ckimg', full_name='KuGouPack.Sinfo.ckimg', index=8, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='logo', full_name='KuGouPack.Sinfo.logo', index=9, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sex', full_name='KuGouPack.Sinfo.sex', index=10, number=11, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bt', full_name='KuGouPack.Sinfo.bt', index=11, number=12, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1783, serialized_end=1958, ) _EXTENSION = _descriptor.Descriptor( name='Extension', full_name='KuGouPack.Extension', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='ui', full_name='KuGouPack.Extension.ui', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isSpRoom', full_name='KuGouPack.Extension.isSpRoom', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='stli', full_name='KuGouPack.Extension.stli', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='vipData', full_name='KuGouPack.Extension.vipData', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='usingMount', full_name='KuGouPack.Extension.usingMount', index=4, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='usingMedal', full_name='KuGouPack.Extension.usingMedal', index=5, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='honorMedal', full_name='KuGouPack.Extension.honorMedal', index=6, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userGuard', full_name='KuGouPack.Extension.userGuard', index=7, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='littleGuard', full_name='KuGouPack.Extension.littleGuard', index=8, number=9, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='defaultPlate', full_name='KuGouPack.Extension.defaultPlate', index=9, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='plateName', full_name='KuGouPack.Extension.plateName', index=10, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='starCard', full_name='KuGouPack.Extension.starCard', index=11, number=12, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='external', full_name='KuGouPack.Extension.external', index=12, number=13, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='exMemo', full_name='KuGouPack.Extension.exMemo', index=13, number=14, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='p', full_name='KuGouPack.Extension.p', index=14, number=15, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='worship', full_name='KuGouPack.Extension.worship', index=15, number=16, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bubble', full_name='KuGouPack.Extension.bubble', index=16, number=17, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='z', full_name='KuGouPack.Extension.z', index=17, number=18, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isGoldFans', full_name='KuGouPack.Extension.isGoldFans', index=18, number=19, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='token', full_name='KuGouPack.Extension.token', index=19, number=20, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='kugouId', full_name='KuGouPack.Extension.kugouId', index=20, number=21, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='starFollower', full_name='KuGouPack.Extension.starFollower', index=21, number=22, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='v_tme', full_name='KuGouPack.Extension.v_tme', index=22, number=23, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='v_kg', full_name='KuGouPack.Extension.v_kg', index=23, number=24, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ar', full_name='KuGouPack.Extension.ar', index=24, number=25, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isAndroid', full_name='KuGouPack.Extension.isAndroid', index=25, number=26, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientPlat', full_name='KuGouPack.Extension.clientPlat', index=26, number=27, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='blackCard', full_name='KuGouPack.Extension.blackCard', index=27, number=28, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='v_l', full_name='KuGouPack.Extension.v_l', index=28, number=29, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bossGroup', full_name='KuGouPack.Extension.bossGroup', index=29, number=30, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ceremony', full_name='KuGouPack.Extension.ceremony', index=30, number=31, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='referer', full_name='KuGouPack.Extension.referer', index=31, number=32, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isNew', full_name='KuGouPack.Extension.isNew', index=32, number=33, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1961, serialized_end=2825, ) _STLIVO = _descriptor.Descriptor( name='StliVo', full_name='KuGouPack.StliVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='st', full_name='KuGouPack.StliVo.st', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sl', full_name='KuGouPack.StliVo.sl', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isAdmin', full_name='KuGouPack.StliVo.isAdmin', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2827, serialized_end=2876, ) _VIPDATAVO = _descriptor.Descriptor( name='VipDataVo', full_name='KuGouPack.VipDataVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='v', full_name='KuGouPack.VipDataVo.v', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='c', full_name='KuGouPack.VipDataVo.c', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='vl', full_name='KuGouPack.VipDataVo.vl', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2878, serialized_end=2923, ) _USINGMOUNTVO = _descriptor.Descriptor( name='UsingMountVo', full_name='KuGouPack.UsingMountVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuGouPack.UsingMountVo.id', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='n', full_name='KuGouPack.UsingMountVo.n', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='swf', full_name='KuGouPack.UsingMountVo.swf', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bi', full_name='KuGouPack.UsingMountVo.bi', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='si', full_name='KuGouPack.UsingMountVo.si', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='p', full_name='KuGouPack.UsingMountVo.p', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='s', full_name='KuGouPack.UsingMountVo.s', index=6, number=7, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2925, serialized_end=3021, ) _USINGMEDALVO = _descriptor.Descriptor( name='UsingMedalVo', full_name='KuGouPack.UsingMedalVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='medalList', full_name='KuGouPack.UsingMedalVo.medalList', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3023, serialized_end=3056, ) _HONORMEDALVO = _descriptor.Descriptor( name='HonorMedalVo', full_name='KuGouPack.HonorMedalVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='honorList', full_name='KuGouPack.HonorMedalVo.honorList', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3058, serialized_end=3091, ) _USERGUARDVO = _descriptor.Descriptor( name='UserGuardVo', full_name='KuGouPack.UserGuardVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='g', full_name='KuGouPack.UserGuardVo.g', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='i', full_name='KuGouPack.UserGuardVo.i', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3093, serialized_end=3128, ) _LITTLEGUARDVO = _descriptor.Descriptor( name='LittleGuardVo', full_name='KuGouPack.LittleGuardVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='l', full_name='KuGouPack.LittleGuardVo.l', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='g', full_name='KuGouPack.LittleGuardVo.g', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3130, serialized_end=3167, ) _WOREUSERPLATEVO = _descriptor.Descriptor( name='WoreUserPlateVo', full_name='KuGouPack.WoreUserPlateVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='kid', full_name='KuGouPack.WoreUserPlateVo.kid', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='plateName', full_name='KuGouPack.WoreUserPlateVo.plateName', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='type', full_name='KuGouPack.WoreUserPlateVo.type', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='l', full_name='KuGouPack.WoreUserPlateVo.l', index=3, number=4, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='i', full_name='KuGouPack.WoreUserPlateVo.i', index=4, number=5, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3169, serialized_end=3254, ) _BUBBLEVO = _descriptor.Descriptor( name='BubbleVo', full_name='KuGouPack.BubbleVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='id', full_name='KuGouPack.BubbleVo.id', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='bg', full_name='KuGouPack.BubbleVo.bg', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3256, serialized_end=3290, ) _STARFOLLOWERVO = _descriptor.Descriptor( name='StarFollowerVo', full_name='KuGouPack.StarFollowerVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='l', full_name='KuGouPack.StarFollowerVo.l', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3292, serialized_end=3319, ) _BOSSGROUPVO = _descriptor.Descriptor( name='BossGroupVo', full_name='KuGouPack.BossGroupVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='gid', full_name='KuGouPack.BossGroupVo.gid', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gn', full_name='KuGouPack.BossGroupVo.gn', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gr', full_name='KuGouPack.BossGroupVo.gr', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3321, serialized_end=3371, ) _CEREMONYVO = _descriptor.Descriptor( name='CeremonyVo', full_name='KuGouPack.CeremonyVo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='pl', full_name='KuGouPack.CeremonyVo.pl', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3373, serialized_end=3397, ) _CHATRESPONSE.fields_by_name['additionalInfo'].message_type = _ADDITIONALINFO _CHATRESPONSE.fields_by_name['complain'].message_type = _COMPLAIN _MESSAGE.fields_by_name['compression'].enum_type = _MCOMPRESSION _MESSAGE.fields_by_name['codec'].enum_type = _MCODEC _CONTENTMESSAGE.fields_by_name['sinfo'].message_type = _SINFO _CONTENTMESSAGE.fields_by_name['codec'].enum_type = _MCODEC _CONTENTMESSAGE.fields_by_name['risk'].message_type = _RISK _EXTENSION.fields_by_name['stli'].message_type = _STLIVO _EXTENSION.fields_by_name['vipData'].message_type = _VIPDATAVO _EXTENSION.fields_by_name['usingMount'].message_type = _USINGMOUNTVO _EXTENSION.fields_by_name['usingMedal'].message_type = _USINGMEDALVO _EXTENSION.fields_by_name['honorMedal'].message_type = _HONORMEDALVO _EXTENSION.fields_by_name['userGuard'].message_type = _USERGUARDVO _EXTENSION.fields_by_name['littleGuard'].message_type = _LITTLEGUARDVO _EXTENSION.fields_by_name['defaultPlate'].message_type = _WOREUSERPLATEVO _EXTENSION.fields_by_name['bubble'].message_type = _BUBBLEVO _EXTENSION.fields_by_name['starFollower'].message_type = _STARFOLLOWERVO _EXTENSION.fields_by_name['bossGroup'].message_type = _BOSSGROUPVO _EXTENSION.fields_by_name['ceremony'].message_type = _CEREMONYVO DESCRIPTOR.message_types_by_name['LoginRequest'] = _LOGINREQUEST DESCRIPTOR.message_types_by_name['LoginResponse'] = _LOGINRESPONSE DESCRIPTOR.message_types_by_name['ErrorResponse'] = _ERRORRESPONSE DESCRIPTOR.message_types_by_name['ChatResponse'] = _CHATRESPONSE DESCRIPTOR.message_types_by_name['AdditionalInfo'] = _ADDITIONALINFO DESCRIPTOR.message_types_by_name['Complain'] = _COMPLAIN DESCRIPTOR.message_types_by_name['Message'] = _MESSAGE DESCRIPTOR.message_types_by_name['ContentMessage'] = _CONTENTMESSAGE DESCRIPTOR.message_types_by_name['Risk'] = _RISK DESCRIPTOR.message_types_by_name['Sinfo'] = _SINFO DESCRIPTOR.message_types_by_name['Extension'] = _EXTENSION DESCRIPTOR.message_types_by_name['StliVo'] = _STLIVO DESCRIPTOR.message_types_by_name['VipDataVo'] = _VIPDATAVO DESCRIPTOR.message_types_by_name['UsingMountVo'] = _USINGMOUNTVO DESCRIPTOR.message_types_by_name['UsingMedalVo'] = _USINGMEDALVO DESCRIPTOR.message_types_by_name['HonorMedalVo'] = _HONORMEDALVO DESCRIPTOR.message_types_by_name['UserGuardVo'] = _USERGUARDVO DESCRIPTOR.message_types_by_name['LittleGuardVo'] = _LITTLEGUARDVO DESCRIPTOR.message_types_by_name['WoreUserPlateVo'] = _WOREUSERPLATEVO DESCRIPTOR.message_types_by_name['BubbleVo'] = _BUBBLEVO DESCRIPTOR.message_types_by_name['StarFollowerVo'] = _STARFOLLOWERVO DESCRIPTOR.message_types_by_name['BossGroupVo'] = _BOSSGROUPVO DESCRIPTOR.message_types_by_name['CeremonyVo'] = _CEREMONYVO DESCRIPTOR.enum_types_by_name['MCompression'] = _MCOMPRESSION DESCRIPTOR.enum_types_by_name['MCodec'] = _MCODEC _sym_db.RegisterFileDescriptor(DESCRIPTOR) LoginRequest = _reflection.GeneratedProtocolMessageType('LoginRequest', (_message.Message,), { 'DESCRIPTOR' : _LOGINREQUEST, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.LoginRequest) }) _sym_db.RegisterMessage(LoginRequest) LoginResponse = _reflection.GeneratedProtocolMessageType('LoginResponse', (_message.Message,), { 'DESCRIPTOR' : _LOGINRESPONSE, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.LoginResponse) }) _sym_db.RegisterMessage(LoginResponse) ErrorResponse = _reflection.GeneratedProtocolMessageType('ErrorResponse', (_message.Message,), { 'DESCRIPTOR' : _ERRORRESPONSE, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.ErrorResponse) }) _sym_db.RegisterMessage(ErrorResponse) ChatResponse = _reflection.GeneratedProtocolMessageType('ChatResponse', (_message.Message,), { 'DESCRIPTOR' : _CHATRESPONSE, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.ChatResponse) }) _sym_db.RegisterMessage(ChatResponse) AdditionalInfo = _reflection.GeneratedProtocolMessageType('AdditionalInfo', (_message.Message,), { 'DESCRIPTOR' : _ADDITIONALINFO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.AdditionalInfo) }) _sym_db.RegisterMessage(AdditionalInfo) Complain = _reflection.GeneratedProtocolMessageType('Complain', (_message.Message,), { 'DESCRIPTOR' : _COMPLAIN, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.Complain) }) _sym_db.RegisterMessage(Complain) Message = _reflection.GeneratedProtocolMessageType('Message', (_message.Message,), { 'DESCRIPTOR' : _MESSAGE, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.Message) }) _sym_db.RegisterMessage(Message) ContentMessage = _reflection.GeneratedProtocolMessageType('ContentMessage', (_message.Message,), { 'DESCRIPTOR' : _CONTENTMESSAGE, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.ContentMessage) }) _sym_db.RegisterMessage(ContentMessage) Risk = _reflection.GeneratedProtocolMessageType('Risk', (_message.Message,), { 'DESCRIPTOR' : _RISK, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.Risk) }) _sym_db.RegisterMessage(Risk) Sinfo = _reflection.GeneratedProtocolMessageType('Sinfo', (_message.Message,), { 'DESCRIPTOR' : _SINFO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.Sinfo) }) _sym_db.RegisterMessage(Sinfo) Extension = _reflection.GeneratedProtocolMessageType('Extension', (_message.Message,), { 'DESCRIPTOR' : _EXTENSION, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.Extension) }) _sym_db.RegisterMessage(Extension) StliVo = _reflection.GeneratedProtocolMessageType('StliVo', (_message.Message,), { 'DESCRIPTOR' : _STLIVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.StliVo) }) _sym_db.RegisterMessage(StliVo) VipDataVo = _reflection.GeneratedProtocolMessageType('VipDataVo', (_message.Message,), { 'DESCRIPTOR' : _VIPDATAVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.VipDataVo) }) _sym_db.RegisterMessage(VipDataVo) UsingMountVo = _reflection.GeneratedProtocolMessageType('UsingMountVo', (_message.Message,), { 'DESCRIPTOR' : _USINGMOUNTVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.UsingMountVo) }) _sym_db.RegisterMessage(UsingMountVo) UsingMedalVo = _reflection.GeneratedProtocolMessageType('UsingMedalVo', (_message.Message,), { 'DESCRIPTOR' : _USINGMEDALVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.UsingMedalVo) }) _sym_db.RegisterMessage(UsingMedalVo) HonorMedalVo = _reflection.GeneratedProtocolMessageType('HonorMedalVo', (_message.Message,), { 'DESCRIPTOR' : _HONORMEDALVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.HonorMedalVo) }) _sym_db.RegisterMessage(HonorMedalVo) UserGuardVo = _reflection.GeneratedProtocolMessageType('UserGuardVo', (_message.Message,), { 'DESCRIPTOR' : _USERGUARDVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.UserGuardVo) }) _sym_db.RegisterMessage(UserGuardVo) LittleGuardVo = _reflection.GeneratedProtocolMessageType('LittleGuardVo', (_message.Message,), { 'DESCRIPTOR' : _LITTLEGUARDVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.LittleGuardVo) }) _sym_db.RegisterMessage(LittleGuardVo) WoreUserPlateVo = _reflection.GeneratedProtocolMessageType('WoreUserPlateVo', (_message.Message,), { 'DESCRIPTOR' : _WOREUSERPLATEVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.WoreUserPlateVo) }) _sym_db.RegisterMessage(WoreUserPlateVo) BubbleVo = _reflection.GeneratedProtocolMessageType('BubbleVo', (_message.Message,), { 'DESCRIPTOR' : _BUBBLEVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.BubbleVo) }) _sym_db.RegisterMessage(BubbleVo) StarFollowerVo = _reflection.GeneratedProtocolMessageType('StarFollowerVo', (_message.Message,), { 'DESCRIPTOR' : _STARFOLLOWERVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.StarFollowerVo) }) _sym_db.RegisterMessage(StarFollowerVo) BossGroupVo = _reflection.GeneratedProtocolMessageType('BossGroupVo', (_message.Message,), { 'DESCRIPTOR' : _BOSSGROUPVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.BossGroupVo) }) _sym_db.RegisterMessage(BossGroupVo) CeremonyVo = _reflection.GeneratedProtocolMessageType('CeremonyVo', (_message.Message,), { 'DESCRIPTOR' : _CEREMONYVO, '__module__' : 'kugou_pb2' # @@protoc_insertion_point(class_scope:KuGouPack.CeremonyVo) }) _sym_db.RegisterMessage(CeremonyVo) # @@protoc_insertion_point(module_scope) ================================================ FILE: danmu/danmaku/laifeng.py ================================================ import aiohttp import json import time class LaiFeng: heartbeat = '2::' heartbeatInterval = 30 @staticmethod async def get_ws_info(url): rid = url.split('/')[-1] async with aiohttp.ClientSession() as session: async with session.get('http://v.laifeng.com/') as resp: imk = dict(resp.cookies)['imk'].value args = { 'name': 'enter', 'args': [{ 'token': imk.replace('%3D', '='), 'yktk': '', 'uid': '2082628924', 'isPushHis': '1', 'roomid': rid, 'endpointtype': 'ct_,dt_1_1003|0|_{}|CTaXF+oKpB4CAatxtZHBQchJ'.format(time.time() * 1e3) }] } reg_data = '5:::' + json.dumps(args) return 'ws://normal01.chatroom.laifeng.com/socket.io/1/websocket/', [reg_data] @staticmethod def decode_msg(message): type_ = message[0] msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} if type_ == '5': data = json.loads(message[4:]) name = data.get('name', 0) args = data['args'] for arg in args: if name == 'enterMessage': # 入场信息 msg['name'] = 'SYS' msg['content'] = arg['body']['n'] + ' 进入频道' msg['msg_type'] = 'danmaku' elif name == 'globalHornMessage': # 系统消息 msg['name'] = 'SYS' msg['content'] = arg['body']['m'] msg['msg_type'] = 'danmaku' elif name == 'chatMessage': # 弹幕 msg['name'] = arg['body']['n'] msg['content'] = arg['body']['m'] msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/longzhu.py ================================================ import json import aiohttp import re class LongZhu: heartbeat = None @staticmethod async def get_ws_info(url): rid = url.split('/')[-1] async with aiohttp.ClientSession() as session: async with session.get('http://m.longzhu.com/' + rid) as resp: res1 = await resp.text() roomid = re.search(r'var roomId = (\d+);', res1).group(1) async with session.get('http://idc-gw.longzhu.com/mbidc?roomId=' + roomid) as resp2: res2 = json.loads(await resp2.text()) ws_url = res2['data']['redirect_to'] + '?room_id=' + roomid return ws_url, None @staticmethod def decode_msg(message): msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} message = json.loads(message) type_ = message['type'] # type_ == 'gift' 礼物 if type_ == 'chat': msg['name'] = message['msg']['user']['username'] msg['content'] = (message['msg']['content']).strip() msg['msg_type'] = 'danmaku' elif type_ == 'commonjoin': msg['name'] = message['msg']['user']['username'] msg['content'] = message['msg']['userMessage'] msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/look.py ================================================ from Crypto.Cipher import AES from Crypto.Util.Padding import pad import aiohttp import json import base64 class Look: heartbeat = '2::' heartbeatInterval = 30 @staticmethod def aes_(t, key): t = t.encode('utf-8') t = pad(t, AES.block_size) key = key.encode() iv = b'0102030405060708' mode = AES.MODE_CBC c = AES.new(key, mode, iv) res = c.encrypt(t) return base64.b64encode(res).decode('utf-8') @staticmethod async def get_ws_info(url): rid = url.split('=')[-1] async with aiohttp.ClientSession() as session: async with session.get('https://weblink10.netease.im/socket.io/1/') as resp: res = await resp.text() sessid = res.split(':')[0] ws_url = 'wss://weblink10.netease.im/socket.io/1/websocket/' + sessid room = { 'liveRoomNo': rid } c = json.dumps(room, separators=(',', ':')) data = { 'params': Look.aes_(Look.aes_(c, '0CoJUm6Qyw8W8jud'), 'dV00kZnm4Au69cp2'), 'encSecKey': 'e08bda29630b9a9bbf9552a1e5f889972aedfe6bc4e695b60d566294043431c60e42487153c6e0df42df0aa9d40c739552d8d8ee58d9acbcab8f4ae0df997a787eefcc56bdcd12fd2f1e41bdb5f9db240b3e10b6bd762fd207853af4c78dddf8254cf6ff83599120bd041c3e7dfb3faea1cd2886bd2c40de0981a11ae2af2a33 ' } async with session.post('https://api.look.163.com/weapi/livestream/room/get/v3', data=data) as resp: res = await resp.json() roomid = res['data']['roomInfo']['roomId'] args = { 'SID': 13, 'CID': 2, 'SER': 1, 'Q': [{ 't': 'byte', 'v': 1 }, { 't': 'Property', 'v': { '1': '3a6a3e48f6854dfa4e4464f3bdaec3b4', '2': '', '3': '1713a7e3e1e4d7b99fe5bcff2fe7e178', '5': roomid, '8': 0, '20': '', '21': ' ', '26': '', '38': 1 } }, { 't': 'Property', 'v': { '4': '', '6': '47', '8': 1, '9': 1, '13': '1713a7e3e1e4d7b99fe5bcff2fe7e178', '18': '3a6a3e48f6854dfa4e4464f3bdaec3b4', '19': '', '24': '', '26': '', '1000': '' } } ] } reg_data = '3:::' + json.dumps(args, separators=(',', ':')) return ws_url, [reg_data] @staticmethod def decode_msg(message): type_ = message[0] msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} if type_ == '3': data = json.loads(message[4:]) if data['cid'] == 10: body = data['r'][1]['body'] body = body[0] if body['2'] == '100': info = json.loads(body['4']) if info['type'] == 114: # 入场信息 msg['name'] = info['content']['user']['nickName'] msg['content'] = ' 进入了直播间' msg['msg_type'] = 'danmaku' elif info['type'] == 102: # 礼物 msg['name'] = info['content']['user']['nickName'] number = info['content']['number'] giftname = info['content']['giftName'] msg['content'] = ' 送了{}{}个'.format(giftname, number) msg['msg_type'] = 'danmaku' elif body['2'] == '0': # 发言 info = json.loads(body['4']) msg['name'] = info['content']['user']['nickname'] msg['content'] = body['3'] msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/pps.py ================================================ import hashlib import urllib.parse import json class QiXiu: heartbeat = None @staticmethod async def get_ws_info(url): rid = url.split('/')[-1] s = bytes([57, 77, 83, 73, 53, 86, 85, 71, 50, 81, 74, 80, 66, 52, 78, 54, 68, 48, 81, 83, 89, 87, 69, 72, 67, 90, 83, 75, 84, 49, 77, 50, 84, 65, 75, 88]).decode('utf-8') # ua = 'User-Agent' # ak = deviceid = md5(str(int(time.time() * 1e3)) + ua + '0000') ak = deviceid = '118d2ae703e62992263e6741afbb5627' e = { 'ag': 1, 'ak': ak, 'at': 3, 'd': deviceid, 'n': 1, 'p': 1, 'r': rid, 'v': '1.01.0801' } i = '' for k, v in e.items(): i += '{}={}|'.format(k, str(v)) e['sg'] = hashlib.md5((i + s).encode('utf-8')).hexdigest() ws_url = 'ws://qx-ws.iqiyi.com/ws?' + urllib.parse.urlencode(e) return ws_url, None @staticmethod def decode_msg(data): message = json.loads(data) msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} for ms in message: m = ms['ct'] type_ = ms['t'] # 200001:进场消息 # 300001:聊天信息 # 102001:礼物 # 1100002:礼物 # 400001:人气值 # 5000010:升级 # 700095:live_score # 700091:排名 # 其他:系统消息 if type_ == 300001: msg['name'] = m['op_userInfo']['nick_name'] msg['content'] = m['msg'] msg['msg_type'] = 'danmaku' elif type_ == 102001: msg['name'] = m['op_userInfo']['nick_name'] num = m['op_info']['num'] gift = m['op_info']['name'] msg['content'] = '送出{}个{}'.format(num, gift) msg['msg_type'] = 'danmaku' elif type_ in [200001, 1100002, 110001, 3019, 3022, 3002, 3024]: msg['name'] = 'SYS' info = m['op_info'].get('public_chat_msg', 0) if not info: info = m['op_info']['roll_chat_msg'] content = '' items = info['items'] for item in items: content += item.get('content', '') msg['content'] = content msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/qf.py ================================================ import aiohttp import json import time class QF: heartbeat = '2::' heartbeatInterval = 30 @staticmethod async def get_ws_info(url): rid = url.split('/')[-1] async with aiohttp.ClientSession() as session: async with session.get('https://conn-chat.qf.56.com/socket.io/1/') as resp: res = await resp.text() sessid = res.split(':')[0] ws_url = 'wss://conn-chat.qf.56.com/socket.io/1/websocket/' + sessid # e = 2 t = 'connector-sio.entryHandler.enter' s = { 'userId': '', 'aq': 0, 'roomId': rid, 'token': '', 'ip': '', 'recet': 0, 'params': { 'referFrom': '0' }, 'apType': 0, 'timestamp': int(time.time() * 1e3) } r = json.dumps(s, separators=(',', ':')) if len(t) > 255: raise Exception('route maxlength is overflow') reg_data = '3:::' + '\x00\x00\x00\x02 ' + t + r return ws_url, [reg_data] @staticmethod def decode_msg(message): msgs = [] msg = {'name': '', 'content': '', 'msg_type': 'other'} type_ = message[0] if type_ == '3': data = json.loads(message[4:]) route = data.get('route', 0) body = data['body'] if route == 'onUserLog': # 入场信息 msg['name'] = 'SYS' msg['content'] = body['userName'] + ' 来了' msg['msg_type'] = 'danmaku' elif route == 'onChat': # 弹幕 msg['name'] = body['userName'] msg['content'] = body['content'] msg['msg_type'] = 'danmaku' elif route == 'onGift': # 弹幕 msg['name'] = 'SYS' msg['content'] = body['userName'] + ' 送礼物 ' + body['giftName'] msg['msg_type'] = 'danmaku' elif route == 'onBc': # 弹幕 msg['name'] = 'SYS' msg['content'] = body['userName'] + ':' + body['msg'] msg['msg_type'] = 'danmaku' msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/tars/EndpointF.py ================================================ # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # from core import tarscore class EndpointF(tarscore.struct): __tars_class__ = "register.EndpointF" def __init__(self): self.host = "" self.port = 0 self.timeout = 0 self.istcp = 0 self.grid = 0 self.groupworkid = 0 self.grouprealid = 0 self.setId = "" self.qos = 0 self.bakFlag = 0 self.weight = 0 self.weightType = 0 @staticmethod def writeTo(oos, value): oos.write(tarscore.string, 0, value.host) oos.write(tarscore.int32, 1, value.port) oos.write(tarscore.int32, 2, value.timeout) oos.write(tarscore.int32, 3, value.istcp) oos.write(tarscore.int32, 4, value.grid) oos.write(tarscore.int32, 5, value.groupworkid) oos.write(tarscore.int32, 6, value.grouprealid) oos.write(tarscore.string, 7, value.setId) oos.write(tarscore.int32, 8, value.qos) oos.write(tarscore.int32, 9, value.bakFlag) oos.write(tarscore.int32, 11, value.weight) oos.write(tarscore.int32, 12, value.weightType) @staticmethod def readFrom(ios): value = EndpointF() value.host = ios.read(tarscore.string, 0, True, value.host) value.port = ios.read(tarscore.int32, 1, True, value.port) value.timeout = ios.read(tarscore.int32, 2, True, value.timeout) value.istcp = ios.read(tarscore.int32, 3, True, value.istcp) value.grid = ios.read(tarscore.int32, 4, True, value.grid) value.groupworkid = ios.read( tarscore.int32, 5, False, value.groupworkid) value.grouprealid = ios.read( tarscore.int32, 6, False, value.grouprealid) value.setId = ios.read(tarscore.string, 7, False, value.setId) value.qos = ios.read(tarscore.int32, 8, False, value.qos) value.bakFlag = ios.read(tarscore.int32, 9, False, value.bakFlag) value.weight = ios.read(tarscore.int32, 11, False, value.weight) value.weightType = ios.read( tarscore.int32, 12, False, value.weightType) return value ================================================ FILE: danmu/danmaku/tars/QueryF.py ================================================ # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # # from tars.core import tarscore; # from tars.core import ServantProxy; # from tars.core import ServantProxyCallback; # from com.qq.register.EndpointF import *; from .__init__ import tarscore from .__servantproxy import ServantProxy from .__async import ServantProxyCallback from .EndpointF import EndpointF import time # proxy for client class QueryFProxy(ServantProxy): def findObjectById(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectById", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.vctclass(EndpointF), 0, True) return (ret) def async_findObjectById(self, callback, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) self.tars_invoke_async( ServantProxy.TARSNORMAL, "findObjectById", oos.getBuffer(), context, None, callback) def findObjectById4Any(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke( ServantProxy.TARSNORMAL, "findObjectById4Any", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) return (ret, activeEp, inactiveEp) def async_findObjectById4Any(self, callback, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) self.tars_invoke_async( ServantProxy.TARSNORMAL, "findObjectById4Any", oos.getBuffer(), context, None, callback) def findObjectById4All(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke( ServantProxy.TARSNORMAL, "findObjectById4All", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) return (ret, activeEp, inactiveEp) def async_findObjectById4All(self, callback, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) self.tars_invoke_async( ServantProxy.TARSNORMAL, "findObjectById4All", oos.getBuffer(), context, None, callback) def findObjectByIdInSameGroup(self, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) rsp = self.tars_invoke( ServantProxy.TARSNORMAL, "findObjectByIdInSameGroup", oos.getBuffer(), context, None) startDecodeTime = time.time() ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) endDecodeTime = time.time() return (ret, activeEp, inactiveEp, (endDecodeTime - startDecodeTime)) def async_findObjectByIdInSameGroup(self, callback, id, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) self.tars_invoke_async( ServantProxy.TARSNORMAL, "findObjectByIdInSameGroup", oos.getBuffer(), context, None, callback) def findObjectByIdInSameStation(self, id, sStation, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) oos.write(tarscore.string, 2, sStation) rsp = self.tars_invoke( ServantProxy.TARSNORMAL, "findObjectByIdInSameStation", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True) return (ret, activeEp, inactiveEp) def async_findObjectByIdInSameStation(self, callback, id, sStation, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) oos.write(tarscore.string, 2, sStation) self.tars_invoke_async( ServantProxy.TARSNORMAL, "findObjectByIdInSameStation", oos.getBuffer(), context, None, callback) def findObjectByIdInSameSet(self, id, setId, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) oos.write(tarscore.string, 2, setId) rsp = self.tars_invoke( ServantProxy.TARSNORMAL, "findObjectByIdInSameSet", oos.getBuffer(), context, None) ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True) return (ret, activeEp, inactiveEp) def async_findObjectByIdInSameSet(self, callback, id, setId, context=ServantProxy.mapcls_context()): oos = tarscore.TarsOutputStream() oos.write(tarscore.string, 1, id) oos.write(tarscore.string, 2, setId) self.tars_invoke_async( ServantProxy.TARSNORMAL, "findObjectByIdInSameSet", oos.getBuffer(), context, None, callback) # ======================================================== # callback of async proxy for client # ======================================================== class QueryFPrxCallback(ServantProxyCallback): def __init__(self): ServantProxyCallback.__init__(self) self.callback_map = { 'findObjectById': self.__invoke_findObjectById, 'findObjectById4Any': self.__invoke_findObjectById4Any, 'findObjectById4All': self.__invoke_findObjectById4All, 'findObjectByIdInSameGroup': self.__invoke_findObjectByIdInSameGroup, 'findObjectByIdInSameStation': self.__invoke_findObjectByIdInSameStation, 'findObjectByIdInSameSet': self.__invoke_findObjectByIdInSameSet } def callback_findObjectById(self, ret): raise NotImplementedError() def callback_findObjectById_exception(self, ret): raise NotImplementedError() def callback_findObjectById4Any(self, ret, activeEp, inactiveEp): raise NotImplementedError() def callback_findObjectById4Any_exception(self, ret): raise NotImplementedError() def callback_findObjectById4All(self, ret, activeEp, inactiveEp): raise NotImplementedError() def callback_findObjectById4All_exception(self, ret): raise NotImplementedError() def callback_findObjectByIdInSameGroup(self, ret, activeEp, inactiveEp): raise NotImplementedError() def callback_findObjectByIdInSameGroup_exception(self, ret): raise NotImplementedError() def callback_findObjectByIdInSameStation(self, ret, activeEp, inactiveEp): raise NotImplementedError() def callback_findObjectByIdInSameStation_exception(self, ret): raise NotImplementedError() def callback_findObjectByIdInSameSet(self, ret, activeEp, inactiveEp): raise NotImplementedError() def callback_findObjectByIdInSameSet_exception(self, ret): raise NotImplementedError() def __invoke_findObjectById(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectById_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.vctclass(EndpointF), 0, True) self.callback_findObjectById(ret) def __invoke_findObjectById4Any(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectById4Any_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) self.callback_findObjectById4Any(ret, activeEp, inactiveEp) def __invoke_findObjectById4All(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectById4All_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) self.callback_findObjectById4All(ret, activeEp, inactiveEp) def __invoke_findObjectByIdInSameGroup(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectByIdInSameGroup_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 2, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 3, True) self.callback_findObjectByIdInSameGroup(ret, activeEp, inactiveEp) def __invoke_findObjectByIdInSameStation(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectByIdInSameStation_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True) self.callback_findObjectByIdInSameStation(ret, activeEp, inactiveEp) def __invoke_findObjectByIdInSameSet(self, reqmsg): rsp = reqmsg.response if rsp.iRet != ServantProxy.TARSSERVERSUCCESS: self.callback_findObjectByIdInSameSet_exception(rsp.iRet) return rsp.iRet ios = tarscore.TarsInputStream(rsp.sBuffer) ret = ios.read(tarscore.int32, 0, True) activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True) inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True) self.callback_findObjectByIdInSameSet(ret, activeEp, inactiveEp) def onDispatch(self, reqmsg): self.callback_map[reqmsg.request.sFuncName](reqmsg) ================================================ FILE: danmu/danmaku/tars/__TimeoutQueue.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __timeQueue.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: 请求响应报文和超时队列 ''' import threading import time import struct from .__logger import tarsLogger from .__tars import TarsInputStream from .__tars import TarsOutputStream from .__packet import RequestPacket from .__packet import ResponsePacket from .__util import (NewLock, LockGuard) class ReqMessage: ''' @brief: 请求响应报文,保存一个请求响应所需要的数据 ''' SYNC_CALL = 1 ASYNC_CALL = 2 ONE_WAY = 3 def __init__(self): self.type = ReqMessage.SYNC_CALL self.servant = None self.lock = None self.adapter = None self.request = None self.response = None self.callback = None self.begtime = None self.endtime = None self.isHash = False self.isConHash = False self.hashCode = 0 def packReq(self): ''' @brief: 序列化请求报文 @return: 序列化后的请求报文 @rtype: str ''' if not self.request: return '' oos = TarsOutputStream() RequestPacket.writeTo(oos, self.request) reqpkt = oos.getBuffer() plen = len(reqpkt) + 4 reqpkt = struct.pack('!i', plen) + reqpkt return reqpkt @staticmethod def unpackRspList(buf): ''' @brief: 解码响应报文 @param buf: 多个序列化后的响应报文数据 @type buf: str @return: 解码出来的响应报文和解码的buffer长度 @rtype: rsplist: 装有ResponsePacket的list unpacklen: int ''' rsplist = [] if not buf: return rsplist unpacklen = 0 buf = buffer(buf) while True: if len(buf) - unpacklen < 4: break packsize = buf[unpacklen: unpacklen+4] packsize, = struct.unpack_from('!i', packsize) if len(buf) < unpacklen + packsize: break ios = TarsInputStream(buf[unpacklen+4: unpacklen+packsize]) rsp = ResponsePacket.readFrom(ios) rsplist.append(rsp) unpacklen += packsize return rsplist, unpacklen # 超时队列,加锁,线程安全 class TimeoutQueue: ''' @brief: 超时队列,加锁,线程安全 可以像队列一样FIFO,也可以像字典一样按key取item @todo: 限制队列长度 ''' def __init__(self, timeout=3): self.__uniqId = 0 # self.__lock = threading.Lock() self.__lock = NewLock() self.__data = {} self.__queue = [] self.__timeout = timeout def getTimeout(self): ''' @brief: 获取超时时间,单位为s @return: 超时时间 @rtype: float ''' return self.__timeout def setTimeout(self, timeout): ''' @brief: 设置超时时间,单位为s @param timeout: 超时时间 @type timeout: float @return: None @rtype: None ''' self.__timeout = timeout def size(self): ''' @brief: 获取队列长度 @return: 队列长度 @rtype: int ''' # self.__lock.acquire() lock = LockGuard(self.__lock) ret = len(self.__data) # self.__lock.release() return ret def generateId(self): ''' @brief: 生成唯一id,0 < id < 2 ** 32 @return: id @rtype: int ''' # self.__lock.acquire() lock = LockGuard(self.__lock) ret = self.__uniqId ret = (ret + 1) % 0x7FFFFFFF while ret <= 0: ret = (ret + 1) % 0x7FFFFFFF self.__uniqId = ret # self.__lock.release() return ret def pop(self, uniqId=0, erase=True): ''' @brief: 弹出item @param uniqId: item的id,如果为0,按FIFO弹出 @type uniqId: int @param erase: 弹出后是否从字典里删除item @type erase: bool @return: item @rtype: any type ''' ret = None # self.__lock.acquire() lock = LockGuard(self.__lock) if not uniqId: if len(self.__queue): uniqId = self.__queue.pop(0) if uniqId: if erase: ret = self.__data.pop(uniqId, None) else: ret = self.__data.get(uniqId, None) # self.__lock.release() return ret[0] if ret else None def push(self, item, uniqId): ''' @brief: 数据入队列,如果队列已经有了uniqId,插入失败 @param item: 插入的数据 @type item: any type @return: 插入是否成功 @rtype: bool ''' begtime = time.time() ret = True # self.__lock.acquire() lock = LockGuard(self.__lock) if uniqId in self.__data: ret = False else: self.__data[uniqId] = [item, begtime] self.__queue.append(uniqId) # self.__lock.release() return ret def peek(self, uniqId): ''' @brief: 根据uniqId获取item,不会删除item @param uniqId: item的id @type uniqId: int @return: item @rtype: any type ''' # self.__lock.acquire() lock = LockGuard(self.__lock) ret = self.__data.get(uniqId, None) # self.__lock.release() if not ret: return None return ret[0] def timeout(self): ''' @brief: 检测是否有item超时,如果有就删除 @return: None @rtype: None ''' endtime = time.time() # self.__lock.acquire() lock = LockGuard(self.__lock) # 处理异常情况,防止死锁 try: new_data = {} for uniqId, item in self.__data.items(): if endtime - item[1] < self.__timeout: new_data[uniqId] = item else: tarsLogger.debug( 'TimeoutQueue:timeout remove id : %d' % uniqId) self.__data = new_data finally: # self.__lock.release() pass class QueueTimeout(threading.Thread): """ 超时线程,定时触发超时事件 """ def __init__(self, timeout=0.1): # threading.Thread.__init__(self) tarsLogger.debug('QueueTimeout:__init__') super(QueueTimeout, self).__init__() self.timeout = timeout self.__terminate = False self.__handler = None self.__lock = threading.Condition() def terminate(self): tarsLogger.debug('QueueTimeout:terminate') self.__terminate = True self.__lock.acquire() self.__lock.notifyAll() self.__lock.release() def setHandler(self, handler): self.__handler = handler def run(self): while not self.__terminate: try: self.__lock.acquire() self.__lock.wait(self.timeout) self.__lock.release() if self.__terminate: break self.__handler() except Exception as msg: tarsLogger.error('QueueTimeout:run exception : %s', msg) tarsLogger.debug('QueueTimeout:run finished') if __name__ == '__main__': pass ================================================ FILE: danmu/danmaku/tars/__adapterproxy.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __adapterproxymanager.py_compiler # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: 将rpc部分中的adapterproxymanager抽离出来,实现不同的负载均衡 ''' from enum import Enum import random import socket import select import os import time from .__util import (LockGuard, NewLock, ConsistentHashNew) from .__trans import EndPointInfo from .__logger import tarsLogger from . import exception from .__trans import TcpTransceiver from .__TimeoutQueue import ReqMessage from .exception import TarsException # 因为循环import的问题只能放这里,不能放文件开始处 from .QueryF import QueryFProxy from .QueryF import QueryFPrxCallback class AdapterProxy: ''' @brief: 每一个Adapter管理一个服务端端口的连接,数据收发 ''' def __init__(self): tarsLogger.debug('AdapterProxy:__init__') self.__closeTrans = False self.__trans = None self.__object = None self.__reactor = None self.__lock = None self.__asyncProc = None self.__activeStateInReg = True @property def activatestateinreg(self): return self.__activeStateInReg @activatestateinreg.setter def activatestateinreg(self, value): self.__activeStateInReg = value def __del__(self): tarsLogger.debug('AdapterProxy:__del__') def initialize(self, endPointInfo, objectProxy, reactor, asyncProc): ''' @brief: 初始化 @param endPointInfo: 连接对端信息 @type endPointInfo: EndPointInfo @type objectProxy: ObjectProxy @type reactor: FDReactor @type asyncProc: AsyncProcThread ''' tarsLogger.debug('AdapterProxy:initialize') self.__closeTrans = False self.__trans = TcpTransceiver(endPointInfo) self.__object = objectProxy self.__reactor = reactor # self.__lock = threading.Lock() self.__lock = NewLock() self.__asyncProc = asyncProc def terminate(self): ''' @brief: 关闭 ''' tarsLogger.debug('AdapterProxy:terminate') self.setCloseTrans(True) def trans(self): ''' @brief: 获取传输类 @return: 负责网络传输的trans @rtype: Transceiver ''' return self.__trans def invoke(self, reqmsg): ''' @brief: 远程过程调用处理方法 @param reqmsg: 请求响应报文 @type reqmsg: ReqMessage @return: 错误码:0表示成功,-1表示连接失败 @rtype: int ''' tarsLogger.debug('AdapterProxy:invoke') assert(self.__trans) if (not self.__trans.hasConnected() and not self.__trans.isConnecting): # -1表示连接失败 return -1 reqmsg.request.iRequestId = self.__object.getTimeoutQueue().generateId() self.__object.getTimeoutQueue().push(reqmsg, reqmsg.request.iRequestId) self.__reactor.notify(self) return 0 def finished(self, rsp): ''' @brief: 远程过程调用返回处理 @param rsp: 响应报文 @type rsp: ResponsePacket @return: 函数是否执行成功 @rtype: bool ''' tarsLogger.debug('AdapterProxy:finished') reqmsg = self.__object.getTimeoutQueue().pop(rsp.iRequestId) if not reqmsg: tarsLogger.error( 'finished, can not get ReqMessage, may be timeout, id: %d', rsp.iRequestId) return False reqmsg.response = rsp if reqmsg.type == ReqMessage.SYNC_CALL: return reqmsg.servant._finished(reqmsg) elif reqmsg.callback: self.__asyncProc.put(reqmsg) return True tarsLogger.error('finished, adapter proxy finish fail, id: %d, ret: %d', rsp.iRequestId, rsp.iRet) return False # 检测连接是否失败,失效时重连 def checkActive(self, forceConnect=False): ''' @brief: 检测连接是否失效 @param forceConnect: 是否强制发起连接,为true时不对状态进行判断就发起连接 @type forceConnect: bool @return: 连接是否有效 @rtype: bool ''' tarsLogger.debug('AdapterProxy:checkActive') # self.__lock.acquire() lock = LockGuard(self.__lock) tarsLogger.info('checkActive, %s, forceConnect: %s', self.__trans.getEndPointInfo(), forceConnect) if not self.__trans.isConnecting() and not self.__trans.hasConnected(): self.doReconnect() # self.__lock.release() return self.__trans.isConnecting() or self.__trans.hasConnected() def doReconnect(self): ''' @brief: 重新发起连接 @return: None @rtype: None ''' tarsLogger.debug('AdapterProxy:doReconnect') assert(self.__trans) self.__trans.reInit() tarsLogger.info('doReconnect, connect: %s, fd:%d', self.__trans.getEndPointInfo(), self.__trans.getFd()) self.__reactor.registerAdapter(self, select.EPOLLIN | select.EPOLLOUT) def sendRequest(self): ''' @brief: 把队列中的请求放到Transceiver的发送缓存里 @return: 放入缓存的数据长度 @rtype: int ''' tarsLogger.debug('AdapterProxy:sendRequest') if not self.__trans.hasConnected(): return False reqmsg = self.__object.popRequest() blen = 0 while reqmsg: reqmsg.adapter = self buf = reqmsg.packReq() self.__trans.writeToSendBuf(buf) tarsLogger.info('sendRequest, id: %d, len: %d', reqmsg.request.iRequestId, len(buf)) blen += len(buf) # 合并一次发送的包 最大合并至8k 提高异步时客户端效率? if (self.__trans.getEndPointInfo().getConnType() == EndPointInfo.SOCK_UDP or blen > 8192): break reqmsg = self.__object.popRequest() return blen def finishConnect(self): ''' @brief: 使用的非阻塞socket连接不能立刻判断是否连接成功, 在epoll响应后调用此函数处理connect结束后的操作 @return: 是否连接成功 @rtype: bool ''' tarsLogger.debug('AdapterProxy:finishConnect') success = True errmsg = '' try: ret = self.__trans.getSock().getsockopt( socket.SOL_SOCKET, socket.SO_ERROR) if ret: success = False errmsg = os.strerror(ret) except Exception as msg: errmsg = msg success = False if not success: self.__reactor.unregisterAdapter( self, socket.EPOLLIN | socket.EPOLLOUT) self.__trans.close() self.__trans.setConnFailed() tarsLogger.error( 'AdapterProxy finishConnect, exception: %s, error: %s', self.__trans.getEndPointInfo(), errmsg) return False self.__trans.setConnected() self.__reactor.notify(self) tarsLogger.info('AdapterProxy finishConnect, connect %s success', self.__trans.getEndPointInfo()) return True def finishInvoke(self, isTimeout): pass # 弹出请求报文 def popRequest(self): pass def shouldCloseTrans(self): ''' @brief: 是否设置关闭连接 @return: 关闭连接的flag的值 @rtype: bool ''' return self.__closeTrans def setCloseTrans(self, closeTrans): ''' @brief: 设置关闭连接flag的值 @param closeTrans: 是否关闭连接 @type closeTrans: bool @return: None @rtype: None ''' self.__closeTrans = closeTrans class QueryRegisterCallback(QueryFPrxCallback): def __init__(self, adpManager): self.__adpManager = adpManager super(QueryRegisterCallback, self).__init__() # QueryFPrxCallback.__init__(self) def callback_findObjectById4All(self, ret, activeEp, inactiveEp): eplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType) for x in activeEp if ret == 0 and x.istcp] ieplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType) for x in inactiveEp if ret == 0 and x.istcp] self.__adpManager.setEndpoints(eplist, ieplist) def callback_findObjectById4All_exception(self, ret): tarsLogger.error('callback_findObjectById4All_exception ret: %d', ret) class EndpointWeightType(Enum): E_LOOP = 0 E_STATIC_WEIGHT = 1 class AdapterProxyManager: ''' @brief: 管理Adapter ''' def __init__(self): tarsLogger.debug('AdapterProxyManager:__init__') self.__comm = None self.__object = None # __adps的key=str(EndPointInfo) value=[EndPointInfo, AdapterProxy, cnt] # cnt是访问次数 self.__adps = {} self.__iadps = {} self.__newLock = None self.__isDirectProxy = True self.__lastFreshTime = 0 self.__queryRegisterCallback = QueryRegisterCallback(self) self.__regAdapterProxyDict = {} self.__lastConHashPrxList = [] self.__consistentHashWeight = None self.__weightType = EndpointWeightType.E_LOOP self.__update = True self.__lastWeightedProxyData = {} def initialize(self, comm, objectProxy, eplist): ''' @brief: 初始化 ''' tarsLogger.debug('AdapterProxyManager:initialize') self.__comm = comm self.__object = objectProxy self.__newLock = NewLock() self.__isDirectProxy = len(eplist) > 0 if self.__isDirectProxy: self.setEndpoints(eplist, {}) else: self.refreshEndpoints() def terminate(self): ''' @brief: 释放资源 ''' tarsLogger.debug('AdapterProxyManager:terminate') # self.__lock.acquire() lock = LockGuard(self.__newLock) for ep, epinfo in self.__adps.items(): epinfo[1].terminate() self.__adps = {} self.__lock.release() def refreshEndpoints(self): ''' @brief: 刷新服务器列表 @return: 新的服务列表 @rtype: EndPointInfo列表 ''' tarsLogger.debug('AdapterProxyManager:refreshEndpoints') if self.__isDirectProxy: return interval = self.__comm.getProperty( 'refresh-endpoint-interval', float) / 1000 locator = self.__comm.getProperty('locator') if '@' not in locator: raise exception.TarsRegistryException( 'locator is not valid: ' + locator) now = time.time() last = self.__lastFreshTime epSize = len(self.__adps) if last + interval < now or (epSize <= 0 and last + 2 < now): queryFPrx = self.__comm.stringToProxy(QueryFProxy, locator) # 首次访问是同步调用,之后访问是异步调用 if epSize == 0 or last == 0: ret, activeEps, inactiveEps = ( queryFPrx.findObjectById4All(self.__object.name())) # 目前只支持TCP eplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType) for x in activeEps if ret == 0 and x.istcp] ieplist = [EndPointInfo(x.host, x.port, x.timeout, x.weight, x.weightType) for x in inactiveEps if ret == 0 and x.istcp] self.setEndpoints(eplist, ieplist) else: queryFPrx.async_findObjectById4All(self.__queryRegisterCallback, self.__object.name()) self.__lastFreshTime = now def getEndpoints(self): ''' @brief: 获取可用服务列表 如果启用分组,只返回同分组的服务端ip @return: 获取节点列表 @rtype: EndPointInfo列表 ''' tarsLogger.debug('AdapterProxyManager:getEndpoints') # self.__lock.acquire() lock = LockGuard(self.__newLock) ret = [x[1][0] for x in list(self.__adps.items())] # self.__lock.release() return ret def setEndpoints(self, eplist, ieplist): ''' @brief: 设置服务端信息 @para eplist: 活跃的被调节点列表 @para ieplist: 不活跃的被调节点列表 ''' tarsLogger.debug('AdapterProxyManager:setEndpoints') adps = {} iadps = {} comm = self.__comm isNeedNotify = False # self.__lock.acquire() lock = LockGuard(self.__newLock) isStartStatic = True for ep in eplist: if ep.getWeightType() == 0: isStartStatic = False epstr = str(ep) if epstr in self.__adps: adps[epstr] = self.__adps[epstr] continue isNeedNotify = True self.__update = True adapter = AdapterProxy() adapter.initialize(ep, self.__object, comm.getReactor(), comm.getAsyncProc()) adapter.activatestateinreg = True adps[epstr] = [ep, adapter, 0] self.__adps, adps = adps, self.__adps for iep in ieplist: iepstr = str(iep) if iepstr in self.__iadps: iadps[iepstr] = self.__iadps[iepstr] continue isNeedNotify = True adapter = AdapterProxy() adapter.initialize(iep, self.__object, comm.getReactor(), comm.getAsyncProc()) adapter.activatestateinreg = False iadps[iepstr] = [iep, adapter, 0] self.__iadps, iadps = iadps, self.__iadps if isStartStatic: self.__weightType = EndpointWeightType.E_STATIC_WEIGHT else: self.__weightType = EndpointWeightType.E_LOOP # self.__lock.release() if isNeedNotify: self.__notifyEndpoints(self.__adps, self.__iadps) # 关闭已经失效的连接 for ep in adps: if ep not in self.__adps: adps[ep][1].terminate() def __notifyEndpoints(self, actives, inactives): # self.__lock.acquire() lock = LockGuard(self.__newLock) self.__regAdapterProxyDict.clear() self.__regAdapterProxyDict.update(actives) self.__regAdapterProxyDict.update(inactives) # self.__lock.release() def __getNextValidProxy(self): ''' @brief: 刷新本地缓存列表,如果服务下线了,要求删除本地缓存 @return: @rtype: EndPointInfo列表 @todo: 优化负载均衡算法 ''' tarsLogger.debug('AdapterProxyManager:getNextValidProxy') lock = LockGuard(self.__newLock) if len(self.__adps) == 0: raise TarsException("the activate adapter proxy is empty") sortedActivateAdp = sorted( list(self.__adps.items()), key=lambda item: item[1][2]) # self.refreshEndpoints() # self.__lock.acquire() sortedActivateAdpSize = len(sortedActivateAdp) while sortedActivateAdpSize != 0: if sortedActivateAdp[0][1][1].checkActive(): self.__adps[sortedActivateAdp[0][0]][2] += 1 # 返回的是 adapterProxy return self.__adps[sortedActivateAdp[0][0]][1] sortedActivateAdp.pop(0) sortedActivateAdpSize -= 1 # 随机重连一个可用节点 adpPrx = list(self.__adps.items())[random.randint( 0, len(self.__adps))][1][1] adpPrx.checkActive() return None # self.__lock.release() def __getHashProxy(self, reqmsg): if self.__weightType == EndpointWeightType.E_LOOP: if reqmsg.isConHash: return self.__getConHashProxyForNormal(reqmsg.hashCode) else: return self.__getHashProxyForNormal(reqmsg.hashCode) else: if reqmsg.isConHash: return self.__getConHashProxyForWeight(reqmsg.hashCode) else: return self.__getHashProxyForWeight(reqmsg.hashCode) def __getHashProxyForNormal(self, hashCode): tarsLogger.debug('AdapterProxyManager:getHashProxyForNormal') # self.__lock.acquire() lock = LockGuard(self.__newLock) regAdapterProxyList = sorted( list(self.__regAdapterProxyDict.items()), key=lambda item: item[0]) allPrxSize = len(regAdapterProxyList) if allPrxSize == 0: raise TarsException("the adapter proxy is empty") hashNum = hashCode % allPrxSize if regAdapterProxyList[hashNum][1][1].activatestateinreg and regAdapterProxyList[hashNum][1][1].checkActive(): epstr = regAdapterProxyList[hashNum][0] self.__regAdapterProxyDict[epstr][2] += 1 if epstr in self.__adps: self.__adps[epstr][2] += 1 elif epstr in self.__iadps: self.__iadps[epstr][2] += 1 return self.__regAdapterProxyDict[epstr][1] else: if len(self.__adps) == 0: raise TarsException("the activate adapter proxy is empty") activeProxyList = list(self.__adps.items()) actPrxSize = len(activeProxyList) while actPrxSize != 0: hashNum = hashCode % actPrxSize if activeProxyList[hashNum][1][1].checkActive(): self.__adps[activeProxyList[hashNum][0]][2] += 1 return self.__adps[activeProxyList[hashNum][0]][1] activeProxyList.pop(hashNum) actPrxSize -= 1 # 随机重连一个可用节点 adpPrx = list(self.__adps.items())[random.randint( 0, len(self.__adps))][1][1] adpPrx.checkActive() return None def __getConHashProxyForNormal(self, hashCode): tarsLogger.debug('AdapterProxyManager:getConHashProxyForNormal') lock = LockGuard(self.__newLock) if len(self.__regAdapterProxyDict) == 0: raise TarsException("the adapter proxy is empty") if self.__consistentHashWeight is None or self.__checkConHashChange(self.__lastConHashPrxList): self.__updateConHashProxyWeighted() if len(self.__consistentHashWeight.nodes) > 0: conHashIndex = self.__consistentHashWeight.getNode(hashCode) if conHashIndex in self.__regAdapterProxyDict and self.__regAdapterProxyDict[conHashIndex][1].activatestateinreg and self.__regAdapterProxyDict[conHashIndex][1].checkActive(): self.__regAdapterProxyDict[conHashIndex][2] += 1 if conHashIndex in self.__adps: self.__adps[conHashIndex][2] += 1 elif conHashIndex in self.__iadps: self.__iadps[conHashIndex][2] += 1 return self.__regAdapterProxyDict[conHashIndex][1] else: if len(self.__adps) == 0: raise TarsException("the activate adapter proxy is empty") activeProxyList = list(self.__adps.items()) actPrxSize = len(activeProxyList) while actPrxSize != 0: hashNum = hashCode % actPrxSize if activeProxyList[hashNum][1][1].checkActive(): self.__adps[activeProxyList[hashNum][0]][2] += 1 return self.__adps[activeProxyList[hashNum][0]][1] activeProxyList.pop(hashNum) actPrxSize -= 1 # 随机重连一个可用节点 adpPrx = list(self.__adps.items())[random.randint( 0, len(self.__adps))][1][1] adpPrx.checkActive() return None pass else: return self.__getHashProxyForNormal(hashCode) def __getHashProxyForWeight(self, hashCode): return None pass def __getConHashProxyForWeight(self, hashCode): return None pass def __checkConHashChange(self, lastConHashPrxList): tarsLogger.debug('AdapterProxyManager:checkConHashChange') lock = LockGuard(self.__newLock) if len(lastConHashPrxList) != len(self.__regAdapterProxyDict): return True regAdapterProxyList = sorted( list(self.__regAdapterProxyDict.items()), key=lambda item: item[0]) regAdapterProxyListSize = len(regAdapterProxyList) for index in range(regAdapterProxyListSize): if cmp(lastConHashPrxList[index][0], regAdapterProxyList[index][0]) != 0: return True return False def __updateConHashProxyWeighted(self): tarsLogger.debug('AdapterProxyManager:updateConHashProxyWeighted') lock = LockGuard(self.__newLock) if len(self.__regAdapterProxyDict) == 0: raise TarsException("the adapter proxy is empty") self.__lastConHashPrxList = sorted( list(self.__regAdapterProxyDict.items()), key=lambda item: item[0]) nodes = [] for var in self.__lastConHashPrxList: nodes.append(var[0]) if self.__consistentHashWeight is None: self.__consistentHashWeight = ConsistentHashNew(nodes) else: theOldActiveNodes = [ var for var in nodes if var in self.__consistentHashWeight.nodes] theOldInactiveNodes = [ var for var in self.__consistentHashWeight.nodes if var not in theOldActiveNodes] for var in theOldInactiveNodes: self.__consistentHashWeight.removeNode(var) theNewActiveNodes = [ var for var in nodes if var not in theOldActiveNodes] for var in theNewActiveNodes: self.__consistentHashWeight.addNode(var) self.__consistentHashWeight.nodes = nodes pass def __getWeightedProxy(self): tarsLogger.debug('AdapterProxyManager:getWeightedProxy') lock = LockGuard(self.__newLock) if len(self.__adps) == 0: raise TarsException("the activate adapter proxy is empty") if self.__update is True: self.__lastWeightedProxyData.clear() weightedProxyData = {} minWeight = (list(self.__adps.items())[0][1][0]).getWeight() for item in list(self.__adps.items()): weight = (item[1][0].getWeight()) weightedProxyData[item[0]] = (weight) if minWeight > weight: minWeight = weight if minWeight <= 0: addWeight = -minWeight + 1 for item in list(weightedProxyData.items()): item[1] += addWeight self.__update = False self.__lastWeightedProxyData = weightedProxyData weightedProxyData = self.__lastWeightedProxyData while len(weightedProxyData) > 0: total = sum(weightedProxyData.values()) rand = random.randint(1, total) temp = 0 for item in list(weightedProxyData.items()): temp += item[1] if rand <= temp: if self.__adps[item[0]][1].checkActive(): self.__adps[item[0]][2] += 1 return self.__adps[item[0]][1] else: weightedProxyData.pop(item[0]) break # 没有一个活跃的节点 # 随机重连一个可用节点 adpPrx = list(self.__adps.items())[random.randint( 0, len(self.__adps))][1][1] adpPrx.checkActive() return None def selectAdapterProxy(self, reqmsg): ''' @brief: 刷新本地缓存列表,如果服务下线了,要求删除本地缓存,通过一定算法返回AdapterProxy @param: reqmsg:请求响应报文 @type reqmsg: ReqMessage @return: @rtype: EndPointInfo列表 @todo: 优化负载均衡算法 ''' tarsLogger.debug('AdapterProxyManager:selectAdapterProxy') self.refreshEndpoints() if reqmsg.isHash: return self.__getHashProxy(reqmsg) else: if self.__weightType == EndpointWeightType.E_STATIC_WEIGHT: return self.__getWeightedProxy() else: return self.__getNextValidProxy() ================================================ FILE: danmu/danmaku/tars/__async.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __rpc.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: 异步rpc实现 ''' import threading import Queue from __logger import tarsLogger from __packet import ResponsePacket from __servantproxy import ServantProxy class AsyncProcThread: ''' @brief: 异步调用线程管理类 ''' def __init__(self): tarsLogger.debug('AsyncProcThread:__init__') self.__initialize = False self.__runners = [] self.__queue = None self.__nrunner = 0 self.__popTimeout = 0.1 def __del__(self): tarsLogger.debug('AsyncProcThread:__del__') def initialize(self, nrunner=3): ''' @brief: 使用AsyncProcThread前必须先调用此函数 @param nrunner: 异步线程个数 @type nrunner: int @return: None @rtype: None ''' tarsLogger.debug('AsyncProcThread:initialize') if self.__initialize: return self.__nrunner = nrunner self.__queue = Queue.Queue() self.__initialize = True def terminate(self): ''' @brief: 关闭所有异步线程 @return: None @rtype: None ''' tarsLogger.debug('AsyncProcThread:terminate') for runner in self.__runners: runner.terminate() for runner in self.__runners: runner.join() self.__runners = [] def put(self, reqmsg): ''' @brief: 处理数据入队列 @param reqmsg: 待处理数据 @type reqmsg: ReqMessage @return: None @rtype: None ''' tarsLogger.debug('AsyncProcThread:put') # 异步请求超时 if not reqmsg.response: reqmsg.response = ResponsePacket() reqmsg.response.iVerson = reqmsg.request.iVerson reqmsg.response.cPacketType = reqmsg.request.cPacketType reqmsg.response.iRequestId = reqmsg.request.iRequestId reqmsg.response.iRet = ServantProxy.TARSASYNCCALLTIMEOUT self.__queue.put(reqmsg) def pop(self): ''' @brief: 处理数据出队列 @return: ReqMessage @rtype: ReqMessage ''' # tarsLogger.debug('AsyncProcThread:pop') ret = None try: ret = self.__queue.get(True, self.__popTimeout) except Queue.Empty: pass return ret def start(self): ''' @brief: 启动异步线程 @return: None @rtype: None ''' tarsLogger.debug('AsyncProcThread:start') for i in xrange(self.__nrunner): runner = AsyncProcThreadRunner() runner.initialize(self) runner.start() self.__runners.append(runner) class AsyncProcThreadRunner(threading.Thread): ''' @brief: 异步调用线程 ''' def __init__(self): tarsLogger.debug('AsyncProcThreadRunner:__init__') super(AsyncProcThreadRunner, self).__init__() # threading.Thread.__init__(self) self.__terminate = False self.__initialize = False self.__procQueue = None def __del__(self): tarsLogger.debug('AsyncProcThreadRunner:__del__') def initialize(self, queue): ''' @brief: 使用AsyncProcThreadRunner前必须调用此函数 @param queue: 有pop()的类,用于提取待处理数据 @type queue: AsyncProcThread @return: None @rtype: None ''' tarsLogger.debug('AsyncProcThreadRunner:initialize') self.__procQueue = queue def terminate(self): ''' @brief: 关闭线程 @return: None @rtype: None ''' tarsLogger.debug('AsyncProcThreadRunner:terminate') self.__terminate = True def run(self): ''' @brief: 线程启动函数,执行异步调用 ''' tarsLogger.debug('AsyncProcThreadRunner:run') while not self.__terminate: if self.__terminate: break reqmsg = self.__procQueue.pop() if not reqmsg or not reqmsg.callback: continue if reqmsg.adapter: succ = reqmsg.response.iRet == ServantProxy.TARSSERVERSUCCESS reqmsg.adapter.finishInvoke(succ) try: reqmsg.callback.onDispatch(reqmsg) except Exception, msg: tarsLogger.error('AsyncProcThread excepttion: %s', msg) tarsLogger.debug('AsyncProcThreadRunner:run finished') class ServantProxyCallback(object): ''' @brief: 异步回调对象基类 ''' def __init__(self): tarsLogger.debug('ServantProxyCallback:__init__') def onDispatch(reqmsg): ''' @brief: 分配响应报文到对应的回调函数 @param queue: 有pop()的类,用于提取待处理数据 @type queue: AsyncProcThread @return: None @rtype: None ''' raise NotImplementedError() ================================================ FILE: danmu/danmaku/tars/__init__.py ================================================ #! /usr/bin/env python # -*- coding: utf-8 -*- # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # __version__ = "0.0.1" from .__util import util from .__tars import TarsInputStream from .__tars import TarsOutputStream from .__tup import TarsUniPacket class tarscore: class TarsInputStream(TarsInputStream): pass class TarsOutputStream(TarsOutputStream): pass class TarsUniPacket(TarsUniPacket): pass class boolean(util.boolean): pass class int8(util.int8): pass class uint8(util.uint8): pass class int16(util.int16): pass class uint16(util.uint16): pass class int32(util.int32): pass class uint32(util.uint32): pass class int64(util.int64): pass class float(util.float): pass class double(util.double): pass class bytes(util.bytes): pass class string(util.string): pass class struct(util.struct): pass @staticmethod def mapclass(ktype, vtype): return util.mapclass(ktype, vtype) @staticmethod def vctclass(vtype): return util.vectorclass(vtype) @staticmethod def printHex(buff): util.printHex(buff) ================================================ FILE: danmu/danmaku/tars/__logger.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __logger.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: 日志模块 ''' # 仅用于调试 import logging from logging.handlers import RotatingFileHandler import os import re tarsLogger = logging.getLogger('TARS client') strToLoggingLevel = { "critical": logging.CRITICAL, "error": logging.ERROR, "warn": logging.WARNING, "info": logging.INFO, "debug": logging.DEBUG, "none": logging.NOTSET } #console = logging.StreamHandler() # console.setLevel(logging.DEBUG) #filelog = logging.FileHandler('tars.log') # filelog.setLevel(logging.DEBUG) #formatter = logging.Formatter('%(asctime)s | %(levelname)8s | [%(name)s] %(message)s', '%Y-%m-%d %H:%M:%S') # console.setFormatter(formatter) # filelog.setFormatter(formatter) # tarsLogger.addHandler(console) # tarsLogger.addHandler(filelog) # tarsLogger.setLevel(logging.DEBUG) # tarsLogger.setLevel(logging.INFO) # tarsLogger.setLevel(logging.ERROR) def createLogFile(filename): if filename.endswith('/'): raise ValueError("The logfile is a dir not a file") if os.path.exists(filename) and os.path.isfile(filename): pass else: fileComposition = str.split(filename, '/') print(fileComposition) currentFile = '' for item in fileComposition: if item == fileComposition[-1]: currentFile += item if not os.path.exists(currentFile) or not os.path.isfile(currentFile): while True: try: os.mknod(currentFile) break except OSError as msg: errno = re.findall(r"\d+", str(msg)) if len(errno) > 0 and errno[0] == '17': currentFile += '.log' continue break currentFile += (item + '/') if not os.path.exists(currentFile): os.mkdir(currentFile) def initLog(logpath, logsize, lognum, loglevel): createLogFile(logpath) handler = RotatingFileHandler(filename=logpath, maxBytes=logsize, backupCount=lognum) formatter = logging.Formatter( '%(asctime)s | %(levelname)6s | [%(filename)18s:%(lineno)4d] | [%(thread)d] %(message)s', '%Y-%m-%d %H:%M:%S') handler.setFormatter(formatter) tarsLogger.addHandler(handler) if loglevel in strToLoggingLevel: tarsLogger.setLevel(strToLoggingLevel[loglevel]) else: tarsLogger.setLevel(strToLoggingLevel["error"]) if __name__ == '__main__': tarsLogger.debug('debug log') tarsLogger.info('info log') tarsLogger.warning('warning log') tarsLogger.error('error log') tarsLogger.critical('critical log') ================================================ FILE: danmu/danmaku/tars/__packet.py ================================================ # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # from .__util import util class RequestPacket(util.struct): mapcls_context = util.mapclass(util.string, util.string) mapcls_status = util.mapclass(util.string, util.string) def __init__(self): self.iVersion = 0 self.cPacketType = 0 self.iMessageType = 0 self.iRequestId = 0 self.sServantName = '' self.sFuncName = '' self.sBuffer = bytes() self.iTimeout = 0 self.context = RequestPacket.mapcls_context() self.status = RequestPacket.mapcls_status() @staticmethod def writeTo(oos, value): oos.write(util.int16, 1, value.iVersion) oos.write(util.int8, 2, value.cPacketType) oos.write(util.int32, 3, value.iMessageType) oos.write(util.int32, 4, value.iRequestId) oos.write(util.string, 5, value.sServantName) oos.write(util.string, 6, value.sFuncName) oos.write(util.bytes, 7, value.sBuffer) oos.write(util.int32, 8, value.iTimeout) oos.write(RequestPacket.mapcls_context, 9, value.context) oos.write(RequestPacket.mapcls_status, 10, value.status) @staticmethod def readFrom(ios): value = RequestPacket() value.iVersion = ios.read(util.int16, 1, True, 0) print(("iVersion = %d" % value.iVersion)) value.cPacketType = ios.read(util.int8, 2, True, 0) print(("cPackerType = %d" % value.cPacketType)) value.iMessageType = ios.read(util.int32, 3, True, 0) print(("iMessageType = %d" % value.iMessageType)) value.iRequestId = ios.read(util.int32, 4, True, 0) print(("iRequestId = %d" % value.iRequestId)) value.sServantName = ios.read(util.string, 5, True, '22222222') value.sFuncName = ios.read(util.string, 6, True, '') value.sBuffer = ios.read(util.bytes, 7, True, value.sBuffer) value.iTimeout = ios.read(util.int32, 8, True, 0) value.context = ios.read( RequestPacket.mapcls_context, 9, True, value.context) value.status = ios.read( RequestPacket.mapcls_status, 10, True, value.status) return value class ResponsePacket(util.struct): __tars_class__ = "tars.RpcMessage.ResponsePacket" mapcls_status = util.mapclass(util.string, util.string) def __init__(self): self.iVersion = 0 self.cPacketType = 0 self.iRequestId = 0 self.iMessageType = 0 self.iRet = 0 self.sBuffer = bytes() self.status = RequestPacket.mapcls_status() @staticmethod def writeTo(oos, value): oos.write(util.int16, 1, value.iVersion) oos.write(util.int8, 2, value.cPacketType) oos.write(util.int32, 3, value.iRequestId) oos.write(util.int32, 4, value.iMessageType) oos.write(util.int32, 5, value.iRet) oos.write(util.bytes, 6, value.sBuffer) oos.write(value.mapcls_status, 7, value.status) @staticmethod def readFrom(ios): value = ResponsePacket() value.iVersion = ios.read(util.int16, 1, True) value.cPacketType = ios.read(util.int8, 2, True) value.iRequestId = ios.read(util.int32, 3, True) value.iMessageType = ios.read(util.int32, 4, True) value.iRet = ios.read(util.int32, 5, True) value.sBuffer = ios.read(util.bytes, 6, True) value.status = ios.read(value.mapcls_status, 7, True) return value ================================================ FILE: danmu/danmaku/tars/__rpc.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __rpc.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: rpc调用逻辑实现 ''' import time import argparse from .__logger import tarsLogger from .__logger import initLog from .__trans import EndPointInfo from .__TimeoutQueue import TimeoutQueue from .__TimeoutQueue import QueueTimeout from .__trans import FDReactor from .__adapterproxy import AdapterProxyManager from .__servantproxy import ServantProxy from .exception import (TarsException) from .__async import AsyncProcThread class Communicator: ''' @brief: 通讯器,创建和维护ServantProxy、ObjectProxy、FDReactor线程和超时线程 ''' default_config = {'tars': {'application': {'client': {'async-invoke-timeout': 20000, 'asyncthread': 0, 'locator': '', 'loglevel': 'error', 'logpath': 'tars.log', 'logsize': 15728640, 'lognum': 0, 'refresh-endpoint-interval': 60000, 'sync-invoke-timeout': 5000}}}} def __init__(self, config={}): tarsLogger.debug('Communicator:__init__') self.__terminate = False self.__initialize = False self.__objects = {} self.__servants = {} self.__reactor = None self.__qTimeout = None self.__asyncProc = None self.__config = Communicator.default_config.copy() self.__config.update(config) self.initialize() def __del__(self): tarsLogger.debug('Communicator:__del__') def initialize(self): ''' @brief: 使用通讯器前必须先调用此函数 ''' tarsLogger.debug('Communicator:initialize') if self.__initialize: return logpath = self.getProperty('logpath') logsize = self.getProperty('logsize', int) lognum = self.getProperty('lognum', int) loglevel = self.getProperty('loglevel') initLog(logpath, logsize, lognum, loglevel) self.__reactor = FDReactor() self.__reactor.initialize() self.__reactor.start() self.__qTimeout = QueueTimeout() self.__qTimeout.setHandler(self.handleTimeout) self.__qTimeout.start() async_num = self.getProperty('asyncthread', int) self.__asyncProc = AsyncProcThread() self.__asyncProc.initialize(async_num) self.__asyncProc.start() self.__initialize = True def terminate(self): ''' @brief: 不再使用通讯器需调用此函数释放资源 ''' tarsLogger.debug('Communicator:terminate') if not self.__initialize: return self.__reactor.terminate() self.__qTimeout.terminate() self.__asyncProc.terminate() for objName in self.__servants: self.__servants[objName]._terminate() for objName in self.__objects: self.__objects[objName].terminate() self.__objects = {} self.__servants = {} self.__reactor = None self.__initialize = False def parseConnAddr(self, connAddr): ''' @brief: 解析connAddr字符串 @param connAddr: 连接地址 @type connAddr: str @return: 解析结果 @rtype: dict, key是str,val里name是str, timeout是float,endpoint是EndPointInfo的list ''' tarsLogger.debug('Communicator:parseConnAddr') connAddr = connAddr.strip() connInfo = { 'name': '', 'timeout': -1, 'endpoint': [] } if '@' not in connAddr: connInfo['name'] = connAddr return connInfo try: tks = connAddr.split('@') connInfo['name'] = tks[0] tks = tks[1].lower().split(':') parser = argparse.ArgumentParser(add_help=False) parser.add_argument('-h') parser.add_argument('-p') parser.add_argument('-t') for tk in tks: argv = tk.split() if argv[0] != 'tcp': raise TarsException( 'unsupport transmission protocal : %s' % connInfo['name']) mes = parser.parse_args(argv[1:]) try: ip = mes.h if mes.h is not None else '' port = int(mes.p) if mes.p is not None else '-1' timeout = int(mes.t) if mes.t is not None else '-1' connInfo['endpoint'].append( EndPointInfo(ip, port, timeout)) except Exception: raise TarsException('Unrecognized option : %s' % mes) except TarsException: raise except Exception as exp: raise TarsException(exp) return connInfo def getReactor(self): ''' @brief: 获取reactor ''' return self.__reactor def getAsyncProc(self): ''' @brief: 获取asyncProc ''' return self.__asyncProc def getProperty(self, name, dt_type=str): ''' @brief: 获取配置 @param name: 配置名称 @type name: str @param dt_type: 数据类型 @type name: type @return: 配置内容 @rtype: str ''' try: ret = self.__config['tars']['application']['client'][name] ret = dt_type(ret) except: ret = Communicator.default_config['tars']['application']['client'][name] return ret def setProperty(self, name, value): ''' @brief: 修改配置 @param name: 配置名称 @type propertys: str @param value: 配置内容 @type propertys: str @return: 设置是否成功 @rtype: bool ''' try: self.__config['tars']['application']['client'][name] = value return True except: return False def setPropertys(self, propertys): ''' @brief: 修改配置 @param propertys: 配置集合 @type propertys: map, key type: str, value type: str @return: 无 @rtype: None ''' pass def updateConfig(self): ''' @brief: 重新设置配置 ''' def stringToProxy(self, servantProxy, connAddr): ''' @brief: 初始化ServantProxy @param connAddr: 服务器地址信息 @type connAddr: str @param servant: servant proxy @type servant: ServantProxy子类 @return: 无 @rtype: None @note: 如果connAddr的ServantObj连接过,返回连接过的ServantProxy 如果没有连接过,用参数servant初始化,返回servant ''' tarsLogger.debug('Communicator:stringToProxy') connInfo = self.parseConnAddr(connAddr) objName = connInfo['name'] if objName in self.__servants: return self.__servants[objName] objectPrx = ObjectProxy() objectPrx.initialize(self, connInfo) servantPrx = servantProxy() servantPrx._initialize(self.__reactor, objectPrx) self.__objects[objName] = objectPrx self.__servants[objName] = servantPrx return servantPrx def handleTimeout(self): ''' @brief: 处理超时事件 @return: 无 @rtype: None ''' # tarsLogger.debug('Communicator:handleTimeout') for obj in self.__objects.values(): obj.handleQueueTimeout() class ObjectProxy: ''' @brief: 一个object name在一个Communicator里有一个objectproxy 管理收发的消息队列 ''' DEFAULT_TIMEOUT = 3.0 def __init__(self): tarsLogger.debug('ObjectProxy:__init__') self.__name = '' self.__timeout = ObjectProxy.DEFAULT_TIMEOUT self.__comm = None self.__epi = None self.__adpmanager = None self.__timeoutQueue = None # self.__adapter = None self.__initialize = False def __del__(self): tarsLogger.debug('ObjectProxy:__del__') def initialize(self, comm, connInfo): ''' @brief: 初始化,使用ObjectProxy前必须调用 @param comm: 通讯器 @type comm: Communicator @param connInfo: 连接信息 @type comm: dict @return: None @rtype: None ''' if self.__initialize: return tarsLogger.debug('ObjectProxy:initialize') self.__comm = comm # async-invoke-timeout来设置队列时间 async_timeout = self.__comm.getProperty( 'async-invoke-timeout', float) / 1000 self.__timeoutQueue = TimeoutQueue(async_timeout) self.__name = connInfo['name'] self.__timeout = self.__comm.getProperty( 'sync-invoke-timeout', float) / 1000 # 通过Communicator的配置设置超时 # 不再通过连接信息的-t来设置 # if connInfo['timeout'] != -1: # self.__timeout = connInfo['timeout'] eplist = connInfo['endpoint'] self.__adpmanager = AdapterProxyManager() self.__adpmanager.initialize(comm, self, eplist) self.__initialize = True def terminate(self): ''' @brief: 回收资源,不再使用ObjectProxy时调用 @return: None @rtype: None ''' tarsLogger.debug('ObjectProxy:terminate') self.__timeoutQueue = None self.__adpmanager.terminate() self.__initialize = False def name(self): ''' @brief: 获取object name @return: object name @rtype: str ''' return self.__name # def setTimeout(self, timeout): # ''' # @brief: 设置超时 # @param timeout: 超时时间,单位为s # @type timeout: float # @return: None # @rtype: None # ''' # self.__timeout = timeout # self.__timeoutQueue.setTimeout(timeout) def timeout(self): ''' @brief: 获取超时时间 @return: 超时时间,单位为s @rtype: float ''' return self.__timeout def getTimeoutQueue(self): ''' @brief: 获取超时队列 @return: 超时队列 @rtype: TimeoutQueue ''' return self.__timeoutQueue def handleQueueTimeout(self): ''' @brief: 超时事件发生时处理超时事务 @return: None @rtype: None ''' # tarsLogger.debug('ObjectProxy:handleQueueTimeout') self.__timeoutQueue.timeout() def invoke(self, reqmsg): ''' @brief: 远程过程调用 @param reqmsg: 请求响应报文 @type reqmsg: ReqMessage @return: 错误码 @rtype: ''' tarsLogger.debug('ObjectProxy:invoke, objname: %s, func: %s', self.__name, reqmsg.request.sFuncName) # 负载均衡 # adapter = self.__adpmanager.getNextValidProxy() adapter = self.__adpmanager.selectAdapterProxy(reqmsg) if not adapter: tarsLogger.error("invoke %s, select adapter proxy return None", self.__name) return -2 adapter.checkActive(True) reqmsg.adapter = adapter return adapter.invoke(reqmsg) # 弹出请求报文 def popRequest(self): ''' @brief: 返回消息队列里的请求响应报文,FIFO 不删除TimeoutQueue里的数据,响应时要用 @return: 请求响应报文 @rtype: ReqMessage ''' return self.__timeoutQueue.pop(erase=False) if __name__ == '__main__': connAddr = "apptest.lightServer.lightServantObj@tcp -h 10.130.64.220 -p 10001 -t 10000" connAddr = 'MTT.BookMarksUnifyServer.BookMarksUnifyObj@tcp -h 172.17.149.77 -t 60000 -p 10023' comm = Communicator() comm.initialize() servant = ServantProxy() servant = comm.stringToProxy(connAddr, servant) print(servant.tars_timeout()) try: rsp = servant.tars_invoke( ServantProxy.TARSNORMAL, "test", '', ServantProxy.mapcls_context(), None) print('Servant invoke success, request id: %d, iRet: %d' % ( rsp.iRequestId, rsp.iRet)) except Exception as msg: print(msg) finally: servant.tars_terminate() time.sleep(2) print('app closing ...') comm.terminate() time.sleep(2) print('cpp closed') ================================================ FILE: danmu/danmaku/tars/__servantproxy.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __servantproxy.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: rpc抽离出servantproxy ''' import threading import time from __logger import tarsLogger from __util import util from __packet import RequestPacket # from __packet import ResponsePacket from __TimeoutQueue import ReqMessage import exception from exception import TarsException class ServantProxy(object): ''' @brief: 1、远程对象的本地代理 2、同名servant在一个通信器中最多只有一个实例 3、防止和用户在Tars中定义的函数名冲突,接口以tars_开头 ''' # 服务器响应的错误码 TARSSERVERSUCCESS = 0 # 服务器端处理成功 TARSSERVERDECODEERR = -1 # 服务器端解码异常 TARSSERVERENCODEERR = -2 # 服务器端编码异常 TARSSERVERNOFUNCERR = -3 # 服务器端没有该函数 TARSSERVERNOSERVANTERR = -4 # 服务器端五该Servant对象 TARSSERVERRESETGRID = -5 # 服务器端灰度状态不一致 TARSSERVERQUEUETIMEOUT = -6 # 服务器队列超过限制 TARSASYNCCALLTIMEOUT = -7 # 异步调用超时 TARSPROXYCONNECTERR = -8 # proxy链接异常 TARSSERVERUNKNOWNERR = -99 # 服务器端未知异常 TARSVERSION = 1 TUPVERSION = 2 TUPVERSION2 = 3 TARSNORMAL = 0 TARSONEWAY = 1 TARSMESSAGETYPENULL = 0 TARSMESSAGETYPEHASH = 1 TARSMESSAGETYPEGRID = 2 TARSMESSAGETYPEDYED = 4 TARSMESSAGETYPESAMPLE = 8 TARSMESSAGETYPEASYNC = 16 mapcls_context = util.mapclass(util.string, util.string) def __init__(self): tarsLogger.debug('ServantProxy:__init__') self.__reactor = None self.__object = None self.__initialize = False def __del__(self): tarsLogger.debug('ServantProxy:__del__') def _initialize(self, reactor, obj): ''' @brief: 初始化函数,需要调用才能使用ServantProxy @param reactor: 网络管理的reactor实例 @type reactor: FDReactor @return: None @rtype: None ''' tarsLogger.debug('ServantProxy:_initialize') assert(reactor and obj) if self.__initialize: return self.__reactor = reactor self.__object = obj self.__initialize = True def _terminate(self): ''' @brief: 不再使用ServantProxy时调用,会释放相应资源 @return: None @rtype: None ''' tarsLogger.debug('ServantProxy:_terminate') self.__object = None self.__reactor = None self.__initialize = False def tars_name(self): ''' @brief: 获取ServantProxy的名字 @return: ServantProxy的名字 @rtype: str ''' return self.__object.name() def tars_timeout(self): ''' @brief: 获取超时时间,单位是ms @return: 超时时间 @rtype: int ''' # 默认的为3S = ObjectProxy.DEFAULT_TIMEOUT return int(self.__timeout() * 1000) def tars_ping(self): pass # def tars_initialize(self): # pass # def tars_terminate(self): # pass def tars_invoke(self, cPacketType, sFuncName, sBuffer, context, status): ''' @brief: TARS协议同步方法调用 @param cPacketType: 请求包类型 @type cPacketType: int @param sFuncName: 调用函数名 @type sFuncName: str @param sBuffer: 序列化后的发送参数 @type sBuffer: str @param context: 上下文件信息 @type context: ServantProxy.mapcls_context @param status: 状态信息 @type status: @return: 响应报文 @rtype: ResponsePacket ''' tarsLogger.debug('ServantProxy:tars_invoke, func: %s', sFuncName) req = RequestPacket() req.iVersion = ServantProxy.TARSVERSION req.cPacketType = cPacketType req.iMessageType = ServantProxy.TARSMESSAGETYPENULL req.iRequestId = 0 req.sServantName = self.tars_name() req.sFuncName = sFuncName req.sBuffer = sBuffer req.iTimeout = self.tars_timeout() reqmsg = ReqMessage() reqmsg.type = ReqMessage.SYNC_CALL reqmsg.servant = self reqmsg.lock = threading.Condition() reqmsg.request = req reqmsg.begtime = time.time() # # test reqmsg.isHash = True reqmsg.isConHash = True reqmsg.hashCode = 123456 rsp = None try: rsp = self.__invoke(reqmsg) except exception.TarsSyncCallTimeoutException: if reqmsg.adapter: reqmsg.adapter.finishInvoke(True) raise except TarsException: raise except: raise TarsException('ServantProxy::tars_invoke excpetion') if reqmsg.adapter: reqmsg.adapter.finishInvoke(False) return rsp def tars_invoke_async(self, cPacketType, sFuncName, sBuffer, context, status, callback): ''' @brief: TARS协议同步方法调用 @param cPacketType: 请求包类型 @type cPacketType: int @param sFuncName: 调用函数名 @type sFuncName: str @param sBuffer: 序列化后的发送参数 @type sBuffer: str @param context: 上下文件信息 @type context: ServantProxy.mapcls_context @param status: 状态信息 @type status: @param callback: 异步调用回调对象 @type callback: ServantProxyCallback的子类 @return: 响应报文 @rtype: ResponsePacket ''' tarsLogger.debug('ServantProxy:tars_invoke') req = RequestPacket() req.iVersion = ServantProxy.TARSVERSION req.cPacketType = cPacketType if callback else ServantProxy.TARSONEWAY req.iMessageType = ServantProxy.TARSMESSAGETYPENULL req.iRequestId = 0 req.sServantName = self.tars_name() req.sFuncName = sFuncName req.sBuffer = sBuffer req.iTimeout = self.tars_timeout() reqmsg = ReqMessage() reqmsg.type = ReqMessage.ASYNC_CALL if callback else ReqMessage.ONE_WAY reqmsg.callback = callback reqmsg.servant = self reqmsg.request = req reqmsg.begtime = time.time() rsp = None try: rsp = self.__invoke(reqmsg) except TarsException: raise except Exception: raise TarsException('ServantProxy::tars_invoke excpetion') if reqmsg.adapter: reqmsg.adapter.finishInvoke(False) return rsp def __timeout(self): ''' @brief: 获取超时时间,单位是s @return: 超时时间 @rtype: float ''' return self.__object.timeout() def __invoke(self, reqmsg): ''' @brief: 远程过程调用 @param reqmsg: 请求数据 @type reqmsg: ReqMessage @return: 调用成功或失败 @rtype: bool ''' tarsLogger.debug('ServantProxy:invoke, func: %s', reqmsg.request.sFuncName) ret = self.__object.invoke(reqmsg) if ret == -2: errmsg = ('ServantProxy::invoke fail, no valid servant,' + ' servant name : %s, function name : %s' % (reqmsg.request.sServantName, reqmsg.request.sFuncName)) raise TarsException(errmsg) if ret == -1: errmsg = ('ServantProxy::invoke connect fail,' + ' servant name : %s, function name : %s, adapter : %s' % (reqmsg.request.sServantName, reqmsg.request.sFuncName, reqmsg.adapter.getEndPointInfo())) raise TarsException(errmsg) elif ret != 0: errmsg = ('ServantProxy::invoke unknown fail, ' + 'Servant name : %s, function name : %s' % (reqmsg.request.sServantName, reqmsg.request.sFuncName)) raise TarsException(errmsg) if reqmsg.type == ReqMessage.SYNC_CALL: reqmsg.lock.acquire() reqmsg.lock.wait(self.__timeout()) reqmsg.lock.release() if not reqmsg.response: errmsg = ('ServantProxy::invoke timeout: %d, servant name' ': %s, adapter: %s, request id: %d' % ( self.tars_timeout(), self.tars_name(), reqmsg.adapter.trans().getEndPointInfo(), reqmsg.request.iRequestId)) raise exception.TarsSyncCallTimeoutException(errmsg) elif reqmsg.response.iRet == ServantProxy.TARSSERVERSUCCESS: return reqmsg.response else: errmsg = 'servant name: %s, function name: %s' % ( self.tars_name(), reqmsg.request.sFuncName) self.tarsRaiseException(reqmsg.response.iRet, errmsg) def _finished(self, reqmsg): ''' @brief: 通知远程过程调用线程响应报文到了 @param reqmsg: 请求响应报文 @type reqmsg: ReqMessage @return: 函数执行成功或失败 @rtype: bool ''' tarsLogger.debug('ServantProxy:finished') if not reqmsg.lock: return False reqmsg.lock.acquire() reqmsg.lock.notifyAll() reqmsg.lock.release() return True def tarsRaiseException(self, errno, desc): ''' @brief: 服务器调用失败,根据服务端给的错误码抛出异常 @param errno: 错误码 @type errno: int @param desc: 错误描述 @type desc: str @return: 没有返回值,函数会抛出异常 @rtype: ''' if errno == ServantProxy.TARSSERVERSUCCESS: return elif errno == ServantProxy.TARSSERVERDECODEERR: raise exception.TarsServerDecodeException( "server decode exception: errno: %d, msg: %s" % (errno, desc)) elif errno == ServantProxy.TARSSERVERENCODEERR: raise exception.TarsServerEncodeException( "server encode exception: errno: %d, msg: %s" % (errno, desc)) elif errno == ServantProxy.TARSSERVERNOFUNCERR: raise exception.TarsServerNoFuncException( "server function mismatch exception: errno: %d, msg: %s" % (errno, desc)) elif errno == ServantProxy.TARSSERVERNOSERVANTERR: raise exception.TarsServerNoServantException( "server servant mismatch exception: errno: %d, msg: %s" % (errno, desc)) elif errno == ServantProxy.TARSSERVERRESETGRID: raise exception.TarsServerResetGridException( "server reset grid exception: errno: %d, msg: %s" % (errno, desc)) elif errno == ServantProxy.TARSSERVERQUEUETIMEOUT: raise exception.TarsServerQueueTimeoutException( "server queue timeout exception: errno: %d, msg: %s" % (errno, desc)) elif errno == ServantProxy.TARSPROXYCONNECTERR: raise exception.TarsServerQueueTimeoutException( "server connection lost: errno: %d, msg: %s" % (errno, desc)) else: raise exception.TarsServerUnknownException( "server unknown exception: errno: %d, msg: %s" % (errno, desc)) ================================================ FILE: danmu/danmaku/tars/__tars.py ================================================ # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # import struct from .__util import util from .exception import * class BinBuffer: def __init__(self, buff=bytes()): self.buffer = buff self.position = 0 def writeBuf(self, buff): self.buffer += buff def getBuffer(self): return self.buffer def length(self): return len(self.buffer) class DataHead: EN_INT8 = 0 EN_INT16 = 1 EN_INT32 = 2 EN_INT64 = 3 EN_FLOAT = 4 EN_DOUBLE = 5 EN_STRING1 = 6 EN_STRING4 = 7 EN_MAP = 8 EN_LIST = 9 EN_STRUCTBEGIN = 10 EN_STRUCTEND = 11 EN_ZERO = 12 EN_BYTES = 13 @staticmethod def writeTo(buff, tag, vtype): if tag < 15: helper = (tag << 4) | vtype buff.writeBuf(struct.pack('!B', helper)) else: helper = (0xF0 | vtype) << 8 | tag buff.writeBuf(struct.pack('!H', helper)) class TarsOutputStream(object): def __init__(self): self.__buffer = BinBuffer() def __writeBoolean(self, tag, value): self.__writeInt8(tag, int(value)) def __writeInt8(self, tag, value): if value == 0: DataHead.writeTo(self.__buffer, tag, DataHead.EN_ZERO) else: DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT8) self.__buffer.writeBuf(struct.pack('!b', value)) def __writeInt16(self, tag, value): if value >= -128 and value <= 127: self.__writeInt8(tag, value) else: DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT16) self.__buffer.writeBuf(struct.pack('!h', value)) def __writeInt32(self, tag, value): if value >= -32768 and value <= 32767: self.__writeInt16(tag, value) else: DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT32) self.__buffer.writeBuf(struct.pack('!i', value)) def __writeInt64(self, tag, value): if value >= (-2147483648) and value <= 2147483647: self.__writeInt32(tag, value) else: DataHead.writeTo(self.__buffer, tag, DataHead.EN_INT64) self.__buffer.writeBuf(struct.pack('!q', value)) def __writeFloat(self, tag, value): DataHead.writeTo(self.__buffer, tag, DataHead.EN_FLOAT) self.__buffer.writeBuf(struct.pack('!f', value)) def __writeDouble(self, tag, value): DataHead.writeTo(self.__buffer, tag, DataHead.EN_DOUBLE) self.__buffer.writeBuf(struct.pack('!d', value)) def __writeString(self, tag, value): length = len(value) if length <= 255: DataHead.writeTo(self.__buffer, tag, DataHead.EN_STRING1) self.__buffer.writeBuf(struct.pack('!B', length)) self.__buffer.writeBuf(str.encode(value)) else: DataHead.writeTo(self.__buffer, tag, DataHead.EN_STRING4) self.__buffer.writeBuf(struct.pack('!I', length)) self.__buffer.writeBuf(str.encode(value)) def __writeBytes(self, tag, value): DataHead.writeTo(self.__buffer, tag, DataHead.EN_BYTES) DataHead.writeTo(self.__buffer, 0, DataHead.EN_INT8) length = len(value) self.__writeInt32(0, length) self.__buffer.buffer += value self.__buffer.position += length def __writeMap(self, coder, tag, value): DataHead.writeTo(self.__buffer, tag, DataHead.EN_MAP) self.__writeInt32(0, len(value)) for key in value: self.write(coder.ktype, 0, key) self.write(coder.vtype, 1, value.get(key)) def __writeVector(self, coder, tag, value): DataHead.writeTo(self.__buffer, tag, DataHead.EN_LIST) n = len(value) self.__writeInt32(0, n) for i in range(0, n): self.write(value.vtype, 0, value[i]) def __writeStruct(self, coder, tag, value): DataHead.writeTo(self.__buffer, tag, DataHead.EN_STRUCTBEGIN) value.writeTo(self, value) DataHead.writeTo(self.__buffer, 0, DataHead.EN_STRUCTEND) def write(self, coder, tag, value): if coder.__tars_index__ == 999: self.__writeBoolean(tag, value) elif coder.__tars_index__ == 0: self.__writeInt8(tag, value) elif coder.__tars_index__ == 1: self.__writeInt16(tag, value) elif coder.__tars_index__ == 2: self.__writeInt32(tag, value) elif coder.__tars_index__ == 3: self.__writeInt64(tag, value) elif coder.__tars_index__ == 4: self.__writeFloat(tag, value) elif coder.__tars_index__ == 5: self.__writeDouble(tag, value) elif coder.__tars_index__ == 13: self.__writeBytes(tag, value) elif coder.__tars_index__ == 67: self.__writeString(tag, value) elif coder.__tars_index__ == 8: self.__writeMap(coder, tag, value) elif coder.__tars_index__ == 9: self.__writeVector(coder, tag, value) elif coder.__tars_index__ == 1011: self.__writeStruct(coder, tag, value) else: raise TarsTarsUnsupportType( "tars unsupport data type:" % coder.__tars_index__) def getBuffer(self): return self.__buffer.getBuffer() def printHex(self): util.printHex(self.__buffer.getBuffer()) class TarsInputStream(object): def __init__(self, buff): self.__buffer = BinBuffer(buff) def __peekFrom(self): helper, = struct.unpack_from( '!B', self.__buffer.buffer, self.__buffer.position) t = (helper & 0xF0) >> 4 p = (helper & 0x0F) l = 1 if t >= 15: l = 2 t, = struct.unpack_from( '!B', self.__buffer.buffer, self.__buffer.position + 1) return (t, p, l) def __readFrom(self): t, p, l = self.__peekFrom() self.__buffer.position += l return (t, p, l) def __skipToStructEnd(self): t, p, l = self.__readFrom() while p != DataHead.EN_STRUCTEND: self.__skipField(p) t, p, l = self.__readFrom() def __skipField(self, p): if p == DataHead.EN_INT8: self.__buffer.position += 1 elif p == DataHead.EN_INT16: self.__buffer.position += 2 elif p == DataHead.EN_INT32: self.__buffer.position += 4 elif p == DataHead.EN_INT64: self.__buffer.position += 8 elif p == DataHead.EN_FLOAT: self.__buffer.position += 4 elif p == DataHead.EN_DOUBLE: self.__buffer.position += 8 elif p == DataHead.EN_STRING1: length, = struct.unpack_from( '!B', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += length + 1 elif p == DataHead.EN_STRING4: length, = struct.unpack_from( '!i', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += length + 4 elif p == DataHead.EN_MAP: size = self.__readInt32(0, True) for i in range(0, size * 2): ti, pi, li = self.__readFrom() self.__skipField(pi) elif p == DataHead.EN_LIST: size = self.__readInt32(0, True) for i in range(0, size): ti, pi, li = self.__readFrom() self.__skipField(pi) elif p == DataHead.EN_BYTES: ti, pi, li = self.__readFrom() if pi != DataHead.EN_INT8: raise TarsTarsDecodeInvalidValue( "skipField with invalid type, type value: %d, %d." % (p, pi)) size = self.__readInt32(0, True) self.__buffer.position += size elif p == DataHead.EN_STRUCTBEGIN: self.__skipToStructEnd() elif p == DataHead.EN_STRUCTEND: pass #self.__buffer.position += length + 1; elif p == DataHead.EN_ZERO: pass #self.__buffer.position += length + 1; else: raise TarsTarsDecodeMismatch( "skipField with invalid type, type value:%d" % p) def __skipToTag(self, tag): length = self.__buffer.length() while self.__buffer.position < length: t, p, l = self.__peekFrom() if tag <= t or p == DataHead.EN_STRUCTEND: return False if (p == DataHead.EN_STRUCTEND) else (t == tag) self.__buffer.position += l self.__skipField(p) return False def __readBoolean(self, tag, require, default=None): v = self.__readInt8(tag, require) if v is None: return default else: return (v != 0) def __readInt8(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_ZERO: return 0 elif p == DataHead.EN_INT8: value, = struct.unpack_from( '!b', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 1 return value else: raise TarsTarsDecodeMismatch( "read 'Char' type mismatch, tag: %d , get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readInt16(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_ZERO: return 0 elif p == DataHead.EN_INT8: value, = struct.unpack_from( '!b', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 1 return value elif p == DataHead.EN_INT16: value, = struct.unpack_from( '!h', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 2 return value else: raise TarsTarsDecodeMismatch( "read 'Short' type mismatch, tag: %d , get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readInt32(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_ZERO: return 0 elif p == DataHead.EN_INT8: value, = struct.unpack_from( '!b', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 1 return value elif p == DataHead.EN_INT16: value, = struct.unpack_from( '!h', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 2 return value elif p == DataHead.EN_INT32: value, = struct.unpack_from( '!i', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 4 return value else: raise TarsTarsDecodeMismatch( "read 'Int32' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readInt64(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_ZERO: return 0 elif p == DataHead.EN_INT8: value, = struct.unpack_from( '!b', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 1 return value elif p == DataHead.EN_INT16: value, = struct.unpack_from( '!h', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 2 return value elif p == DataHead.EN_INT32: value, = struct.unpack_from( '!i', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 4 return value elif p == DataHead.EN_INT64: value, = struct.unpack_from( '!q', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 8 return value else: raise TarsTarsDecodeMismatch( "read 'Int64' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readString(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_STRING1: length, = struct.unpack_from( '!B', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 1 value, = struct.unpack_from( str(length) + "s", self.__buffer.buffer, self.__buffer.position) self.__buffer.position += length return value elif p == DataHead.EN_STRING4: length, = struct.unpack_from( '!i', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 4 value, = struct.unpack_from( str(length) + "s", self.__buffer.buffer, self.__buffer.position) self.__buffer.position += length return value else: raise TarsTarsDecodeMismatch( "read 'string' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readBytes(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_BYTES: ti, pi, li = self.__readFrom() if pi != DataHead.EN_INT8: raise TarsTarsDecodeMismatch( "type mismatch, tag: %d, type: %d, %d" % (tag, p, pi)) size = self.__readInt32(0, True) value, = struct.unpack_from( str(size) + 's', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += size return value else: raise TarsTarsDecodeMismatch( "type mismatch, tag: %d, type: %d" % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readFloat(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_ZERO: return 0 elif p == DataHead.EN_FLOAT: value, = struct.unpack_from( '!f', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 4 return value else: raise TarsTarsDecodeMismatch( "read 'Float' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readDouble(self, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_ZERO: return 0 elif p == DataHead.EN_FLOAT: value, = struct.unpack_from( '!f', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 4 return value elif p == DataHead.EN_DOUBLE: value, = struct.unpack_from( '!d', self.__buffer.buffer, self.__buffer.position) self.__buffer.position += 8 return value else: raise TarsTarsDecodeMismatch( "read 'Double' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readStruct(self, coder, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p != DataHead.EN_STRUCTBEGIN: raise TarsTarsDecodeMismatch( "read 'struct' type mismatch, tag: %d, get type: %d." % (tag, p)) value = coder.readFrom(self) self.__skipToStructEnd() return value elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readMap(self, coder, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_MAP: size = self.__readInt32(0, True) omap = coder() for i in range(0, size): k = self.read(coder.ktype, 0, True) v = self.read(coder.vtype, 1, True) omap[k] = v return omap else: raise TarsTarsDecodeMismatch( "read 'map' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def __readVector(self, coder, tag, require, default=None): if self.__skipToTag(tag): t, p, l = self.__readFrom() if p == DataHead.EN_LIST: size = self.__readInt32(0, True) value = coder() for i in range(0, size): k = self.read(coder.vtype, 0, True) value.append(k) return value else: raise TarsTarsDecodeMismatch( "read 'vector' type mismatch, tag: %d, get type: %d." % (tag, p)) elif require: raise TarsTarsDecodeRequireNotExist( "require field not exist, tag: %d" % tag) return default def read(self, coder, tag, require, default=None): if coder.__tars_index__ == 999: return self.__readBoolean(tag, require, default) elif coder.__tars_index__ == 0: return self.__readInt8(tag, require, default) elif coder.__tars_index__ == 1: return self.__readInt16(tag, require, default) elif coder.__tars_index__ == 2: return self.__readInt32(tag, require, default) elif coder.__tars_index__ == 3: return self.__readInt64(tag, require, default) elif coder.__tars_index__ == 4: return self.__readFloat(tag, require, default) elif coder.__tars_index__ == 5: return self.__readDouble(tag, require, default) elif coder.__tars_index__ == 13: return self.__readBytes(tag, require, default) elif coder.__tars_index__ == 67: return self.__readString(tag, require, default) elif coder.__tars_index__ == 8: return self.__readMap(coder, tag, require, default) elif coder.__tars_index__ == 9: return self.__readVector(coder, tag, require, default) elif coder.__tars_index__ == 1011: return self.__readStruct(coder, tag, require, default) else: raise TarsTarsUnsupportType( "tars unsupport data type:" % coder.__tars_index__) def printHex(self): util.printHex(self.__buffer.buffer) ================================================ FILE: danmu/danmaku/tars/__trans.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # filename: __trans.py # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ''' @version: 0.01 @brief: 网络相关模块 ''' import socket import select import errno import threading from .__logger import tarsLogger from .__TimeoutQueue import ReqMessage class EndPointInfo: ''' @brief: 保存每个连接端口的信息 ''' SOCK_TCP = 'TCP' SOCK_UDP = 'UDP' def __init__(self, ip='', port=0, timeout=-1, weight=0, weightType=0, connType=SOCK_TCP): self.__ip = ip self.__port = port self.__timeout = timeout self.__connType = connType self.__weightType = weightType self.__weight = weight def getIp(self): return self.__ip def getPort(self): return self.__port def getConnType(self): ''' @return: 传输层连接类型 @rtype: EndPointInfo.SOCK_TCP 或 EndPointInfo.SOCK_UDP ''' return self.__connType def getWeightType(self): return self.__weightType def getWeight(self): return self.__weight def __str__(self): return '%s %s:%s %d:%d' % (self.__connType, self.__ip, self.__port, self.__weightType, self.__weight) class Transceiver: ''' @brief: 网络传输基类,提供网络send/recv接口 ''' CONNECTED = 0 CONNECTING = 1 UNCONNECTED = 2 def __init__(self, endPointInfo): tarsLogger.debug('Transceiver:__init__, %s', endPointInfo) self.__epi = endPointInfo self.__sock = None self.__connStatus = Transceiver.UNCONNECTED self.__connFailed = False # 这两个变量要给子类用,不能用name mangling隐藏 self._sendBuff = '' self._recvBuf = '' def __del__(self): tarsLogger.debug('Transceiver:__del__') self.close() def getSock(self): ''' @return: socket对象 @rtype: socket.socket ''' return self.__sock def getFd(self): ''' @brief: 获取socket的文件描述符 @return: 如果self.__sock没有建立返回-1 @rtype: int ''' if self.__sock: return self.__sock.fileno() else: return -1 def getEndPointInfo(self): ''' @return: 端口信息 @rtype: EndPointInfo ''' return self.__epi def isValid(self): ''' @return: 是否创建了socket @rtype: bool ''' return self.__sock is not None def hasConnected(self): ''' @return: 是否连接上了 @rtype: bool ''' return self.isValid() and self.__connStatus == Transceiver.CONNECTED def isConnFailed(self): ''' @return: 是否连接失败 @rtype: bool ''' return self.__connFailed def isConnecting(self): ''' @return: 是否正在连接 @rtype: bool ''' return self.isValid() and self.__connStatus == Transceiver.CONNECTING def setConnFailed(self): ''' @brief: 设置为连接失败 @return: None @rtype: None ''' self.__connFailed = True self.__connStatus = Transceiver.UNCONNECTED def setConnected(self): ''' @brief: 设置为连接完 @return: None @rtype: None ''' self.__connFailed = False self.__connStatus = Transceiver.CONNECTED def close(self): ''' @brief: 关闭连接 @return: None @rtype: None @note: 多次调用不会有问题 ''' tarsLogger.debug('Transceiver:close') if not self.isValid(): return self.__sock.close() self.__sock = None self.__connStatus = Transceiver.UNCONNECTED self.__connFailed = False self._sendBuff = '' self._recvBuf = '' tarsLogger.info('trans close : %s' % self.__epi) def writeToSendBuf(self, msg): ''' @brief: 把数据添加到send buffer里 @param msg: 发送的数据 @type msg: str @return: None @rtype: None @note: 没有加锁,多线程调用会有race conditions ''' self._sendBuff += msg def recv(self, bufsize, flag=0): raise NotImplementedError() def send(self, buf, flag=0): raise NotImplementedError() def doResponse(self): raise NotImplementedError() def doRequest(self): ''' @brief: 将请求数据发送出去 @return: 发送的字节数 @rtype: int ''' tarsLogger.debug('Transceiver:doRequest') if not self.isValid(): return -1 nbytes = 0 buf = buffer(self._sendBuff) while True: if not buf: break ret = self.send(buf[nbytes:]) if ret > 0: nbytes += ret else: break # 发送前面的字节后将后面的字节拷贝上来 self._sendBuff = buf[nbytes:] return nbytes def reInit(self): ''' @brief: 初始化socket,并连接服务器 @return: 成功返回0,失败返回-1 @rtype: int ''' tarsLogger.debug('Transceiver:reInit') assert(self.isValid() is False) if self.__epi.getConnType() != EndPointInfo.SOCK_TCP: return -1 try: self.__sock = socket.socket() self.__sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self.__sock.setblocking(0) self.__sock.connect((self.__epi.getIp(), self.__epi.getPort())) self.__connStatus = Transceiver.CONNECTED except socket.error as msg: if msg.errno == errno.EINPROGRESS: self.__connStatus = Transceiver.CONNECTING else: tarsLogger.info('reInit, %s, faild!, %s', self.__epi, msg) self.__sock = None return -1 tarsLogger.info('reInit, connect: %s, fd: %d', self.__epi, self.getFd()) return 0 class TcpTransceiver(Transceiver): ''' @brief: TCP传输实现 ''' def send(self, buf, flag=0): ''' @brief: 实现tcp的发送 @param buf: 发送的数据 @type buf: str @param flag: 发送标志 @param flag: int @return: 发送字节数 @rtype: int ''' tarsLogger.debug('TcpTransceiver:send') if not self.isValid(): return -1 nbytes = 0 try: nbytes = self.getSock().send(buf, flag) tarsLogger.info('tcp send, fd: %d, %s, len: %d', self.getFd(), self.getEndPointInfo(), nbytes) except socket.error as msg: if msg.errno != errno.EAGAIN: tarsLogger.error('tcp send, fd: %d, %s, fail!, %s, close', self.getFd(), self.getEndPointInfo(), msg) self.close() return 0 return nbytes def recv(self, bufsize, flag=0): ''' @brief: 实现tcp的recv @param bufsize: 接收大小 @type bufsize: int @param flag: 接收标志 @param flag: int @return: 接收的内容,接收出错返回None @rtype: str ''' tarsLogger.debug('TcpTransceiver:recv') assert(self.isValid()) buf = '' try: buf = self.getSock().recv(bufsize, flag) if len(buf) == 0: tarsLogger.info('tcp recv, fd: %d, %s, recv 0 bytes, close', self.getFd(), self.getEndPointInfo()) self.close() return None except socket.error as msg: if msg.errno != errno.EAGAIN: tarsLogger.info('tcp recv, fd: %d, %s, faild!, %s, close', self.getFd(), self.getEndPointInfo(), msg) self.close() return None tarsLogger.info('tcp recv, fd: %d, %s, nbytes: %d', self.getFd(), self.getEndPointInfo(), len(buf)) return buf def doResponse(self): ''' @brief: 处理接收的数据 @return: 返回响应报文的列表,如果出错返回None @rtype: list: ResponsePacket ''' tarsLogger.debug('TcpTransceiver:doResponse') if not self.isValid(): return None bufs = [self._recvBuf] while True: buf = self.recv(8292) if not buf: break bufs.append(buf) self._recvBuf = ''.join(bufs) tarsLogger.info('tcp doResponse, fd: %d, recvbuf: %d', self.getFd(), len(self._recvBuf)) if not self._recvBuf: return None rsplist = None try: rsplist, bufsize = ReqMessage.unpackRspList(self._recvBuf) self._recvBuf = self._recvBuf[bufsize:] except Exception as msg: tarsLogger.error( 'tcp doResponse, fd: %d, %s, tcp recv unpack error: %s', self.getFd(), self.getEndPointInfo(), msg) self.close() return rsplist class FDReactor(threading.Thread): ''' @brief: 监听FD事件并解发注册的handle ''' def __init__(self): tarsLogger.debug('FDReactor:__init__') # threading.Thread.__init__(self) super(FDReactor, self).__init__() self.__terminate = False self.__ep = None self.__shutdown = None # {fd : adapterproxy} self.__adapterTab = {} def __del__(self): tarsLogger.debug('FDReactor:__del__') self.__ep.close() self.__shutdown.close() self.__ep = None self.__shutdown = None def initialize(self): ''' @brief: 初始化,使用FDReactor前必须调用 @return: None @rtype: None ''' tarsLogger.debug('FDReactor:initialize') self.__ep = select.epoll() self.__shutdown = socket.socket() self.__ep.register(self.__shutdown.fileno(), select.EPOLLET | select.EPOLLIN) tarsLogger.debug('FDReactor init, shutdown fd : %d', self.__shutdown.fileno()) def terminate(self): ''' @brief: 结束FDReactor的线程 @return: None @rtype: None ''' tarsLogger.debug('FDReactor:terminate') self.__terminate = True self.__ep.modify(self.__shutdown.fileno(), select.EPOLLOUT) self.__adapterTab = {} def handle(self, adapter, events): ''' @brief: 处理epoll事件 @param adapter: 事件对应的adapter @type adapter: AdapterProxy @param events: epoll事件 @param events: int @return: None @rtype: None ''' tarsLogger.debug('FDReactor:handle events : %d', events) assert(adapter) try: if events == 0: return if events & (select.EPOLLERR | select.EPOLLHUP): tarsLogger.debug('FDReactor::handle EPOLLERR or EPOLLHUP: %s', adapter.trans().getEndPointInfo()) adapter.trans().close() return if adapter.shouldCloseTrans(): tarsLogger.debug('FDReactor::handle should close trans: %s', adapter.trans().getEndPointInfo()) adapter.setCloseTrans(False) adapter.trans().close() return if adapter.trans().isConnecting(): if not adapter.finishConnect(): return if events & select.EPOLLIN: self.handleInput(adapter) if events & select.EPOLLOUT: self.handleOutput(adapter) except Exception as msg: tarsLogger.error('FDReactor handle exception: %s', msg) def handleExcept(self): pass def handleInput(self, adapter): ''' @brief: 处理接收事件 @param adapter: 事件对应的adapter @type adapter: AdapterProxy @return: None @rtype: None ''' tarsLogger.debug('FDReactor:handleInput') if not adapter.trans().isValid(): return rsplist = adapter.trans().doResponse() if not rsplist: return for rsp in rsplist: adapter.finished(rsp) def handleOutput(self, adapter): ''' @brief: 处理发送事件 @param adapter: 事件对应的adapter @type adapter: AdapterProxy @return: None @rtype: None ''' tarsLogger.debug('FDReactor:handleOutput') if not adapter.trans().isValid(): return while adapter.trans().doRequest() >= 0 and adapter.sendRequest(): pass def notify(self, adapter): ''' @brief: 更新adapter对应的fd的epoll状态 @return: None @rtype: None @note: FDReactor使用的epoll是EPOLLET模式,同一事件只通知一次 希望某一事件再次通知需调用此函数 ''' tarsLogger.debug('FDReactor:notify') fd = adapter.trans().getFd() if fd != -1: self.__ep.modify(fd, select.EPOLLET | select.EPOLLOUT | select.EPOLLIN) def registerAdapter(self, adapter, events): ''' @brief: 注册adapter @param adapter: 收发事件处理类 @type adapter: AdapterProxy @param events: 注册事件 @type events: int @return: None @rtype: None ''' tarsLogger.debug('FDReactor:registerAdapter events : %d', events) events |= select.EPOLLET try: self.__ep.unregister(adapter.trans().getFd()) except: pass self.__ep.register(adapter.trans().getFd(), events) self.__adapterTab[adapter.trans().getFd()] = adapter def unregisterAdapter(self, adapter): ''' @brief: 注销adapter @param adapter: 收发事件处理类 @type adapter: AdapterProxy @return: None @rtype: None ''' tarsLogger.debug('FDReactor:registerAdapter') self.__ep.unregister(adapter.trans().getFd()) self.__adapterTab.pop(adapter.trans().getFd(), None) def run(self): ''' @brief: 线程启动函数,循环监听网络事件 ''' tarsLogger.debug('FDReactor:run') while not self.__terminate: try: eplist = self.__ep.poll(1) if eplist: tarsLogger.debug('FDReactor run get eplist : %s, terminate : %s', str( eplist), self.__terminate) if self.__terminate: tarsLogger.debug('FDReactor terminate') break for fd, events in eplist: adapter = self.__adapterTab.get(fd, None) if not adapter: continue self.handle(adapter, events) except Exception as msg: tarsLogger.error('FDReactor run exception: %s', msg) tarsLogger.debug('FDReactor:run finished') if __name__ == '__main__': print('hello world') epi = EndPointInfo('127.0.0.1', 1313) print(epi) trans = TcpTransceiver(epi) print(trans.getSock()) print(trans.getFd()) print(trans.reInit()) print(trans.isConnecting()) print(trans.hasConnected()) buf = 'hello world' print(trans.send(buf)) buf = trans.recv(1024) print(buf) trans.close() ================================================ FILE: danmu/danmaku/tars/__tup.py ================================================ # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # import struct import string from .__util import util from .__tars import TarsOutputStream from .__tars import TarsInputStream from .__packet import RequestPacket class TarsUniPacket(object): def __init__(self): self.__mapa = util.mapclass(util.string, util.bytes) self.__mapv = util.mapclass(util.string, self.__mapa) self.__buffer = self.__mapv() self.__code = RequestPacket() # @property # def version(self): # return self.__code.iVersion # @version.setter # def version(self, value): # self.__code.iVersion = value @property def servant(self): return self.__code.sServantName @servant.setter def servant(self, value): self.__code.sServantName = value @property def func(self): return self.__code.sFuncName @func.setter def func(self, value): self.__code.sFuncName = value @property def requestid(self): return self.__code.iRequestId @requestid.setter def requestid(self, value): self.__code.iRequestId = value @property def result_code(self): if ("STATUS_RESULT_CODE" in self.__code.status) == False: return 0 return string.atoi(self.__code.status["STATUS_RESULT_CODE"]) @property def result_desc(self): if ("STATUS_RESULT_DESC" in self.__code.status) == False: return '' return self.__code.status["STATUS_RESULT_DESC"] def put(self, vtype, name, value): oos = TarsOutputStream() oos.write(vtype, 0, value) self.__buffer[name] = {vtype.__tars_class__: oos.getBuffer()} def get(self, vtype, name): if (name in self.__buffer) == False: raise Exception("UniAttribute not found key:%s,type:%s" % (name, vtype.__tars_class__)) t = self.__buffer[name] if (vtype.__tars_class__ in t) == False: raise Exception("UniAttribute not found type:" + vtype.__tars_class__) o = TarsInputStream(t[vtype.__tars_class__]) return o.read(vtype, 0, True) def encode(self): oos = TarsOutputStream() oos.write(self.__mapv, 0, self.__buffer) self.__code.iVersion = 2 self.__code.sBuffer = oos.getBuffer() sos = TarsOutputStream() RequestPacket.writeTo(sos, self.__code) return struct.pack('!i', 4 + len(sos.getBuffer())) + sos.getBuffer() def decode(self, buf): ois = TarsInputStream(buf[4:]) self.__code = RequestPacket.readFrom(ois) sis = TarsInputStream(self.__code.sBuffer) self.__buffer = sis.read(self.__mapv, 0, True) def clear(self): self.__code.__init__() def haskey(self, name): return name in self.__buffer ================================================ FILE: danmu/danmaku/tars/__util.py ================================================ #!/usr/bin/env python # -*- coding: utf-8 -*- # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # import sys from threading import Lock import hashlib from xml.etree import cElementTree as ET from .exception import TarsException class util: @staticmethod def printHex(buff): count = 0 for c in buff: sys.stdout.write("0X%02X " % ord(c)) count += 1 if count % 16 == 0: sys.stdout.write("\n") sys.stdout.write("\n") sys.stdout.flush() @staticmethod def mapclass(ktype, vtype): class mapklass(dict): def size(self): return len(self) setattr(mapklass, '__tars_index__', 8) setattr(mapklass, '__tars_class__', "map<" + ktype.__tars_class__ + "," + vtype.__tars_class__ + ">") setattr(mapklass, 'ktype', ktype) setattr(mapklass, 'vtype', vtype) return mapklass @staticmethod def vectorclass(vtype): class klass(list): def size(self): return len(self) setattr(klass, '__tars_index__', 9) setattr(klass, '__tars_class__', "list<" + vtype.__tars_class__ + ">") setattr(klass, 'vtype', vtype) return klass class boolean: __tars_index__ = 999 __tars_class__ = "bool" class int8: __tars_index__ = 0 __tars_class__ = "char" class uint8: __tars_index__ = 1 __tars_class__ = "short" class int16: __tars_index__ = 1 __tars_class__ = "short" class uint16: __tars_index__ = 2 __tars_class__ = "int32" class int32: __tars_index__ = 2 __tars_class__ = "int32" class uint32: __tars_index__ = 3 __tars_class__ = "int64" class int64: __tars_index__ = 3 __tars_class__ = "int64" class float: __tars_index__ = 4 __tars_class__ = "float" class double: __tars_index__ = 5 __tars_class__ = "double" class bytes: __tars_index__ = 13 __tars_class__ = "list" class string: __tars_index__ = 67 __tars_class__ = "string" class struct: __tars_index__ = 1011 def xml2dict(node, dic={}): ''' @brief: 将xml解析树转成字典 @param node: 树的根节点 @type node: cElementTree.Element @param dic: 存储信息的字典 @type dic: dict @return: 转换好的字典 @rtype: dict ''' dic[node.tag] = ndic = {} [xml2dict(child, ndic) for child in node.getchildren() if child != node] ndic.update([list(map(str.strip, exp.split('=')[:2])) for exp in node.text.splitlines() if '=' in exp]) return dic def configParse(filename): ''' @brief: 解析tars配置文件 @param filename: 文件名 @type filename: str @return: 解析出来的配置信息 @rtype: dict ''' tree = ET.parse(filename) return xml2dict(tree.getroot()) class NewLock(object): def __init__(self): self.__count = 0 self.__lock = Lock() self.__lockForCount = Lock() pass def newAcquire(self): self.__lockForCount.acquire() self.__count += 1 if self.__count == 1: self.__lock.acquire() self.__lockForCount.release() pass def newRelease(self): self.__lockForCount.acquire() self.__count -= 1 if self.__count == 0: self.__lock.release() self.__lockForCount.release() class LockGuard(object): def __init__(self, newLock): self.__newLock = newLock self.__newLock.newAcquire() def __del__(self): self.__newLock.newRelease() class ConsistentHashNew(object): def __init__(self, nodes=None, nodeNumber=3): """ :param nodes: 服务器的节点的epstr列表 :param n_number: 一个节点对应的虚拟节点数量 :return: """ self.__nodes = nodes self.__nodeNumber = nodeNumber # 每一个节点对应多少个虚拟节点,这里默认是3个 self.__nodeDict = dict() # 用于记录虚拟节点的hash值与服务器epstr的对应关系 self.__sortListForKey = [] # 用于存放所有的虚拟节点的hash值,这里需要保持排序,以找出对应的服务器 if nodes: for node in nodes: self.addNode(node) @property def nodes(self): return self.__nodes @nodes.setter def nodes(self, value): self.__nodes = value def addNode(self, node): """ 添加node,首先要根据虚拟节点的数目,创建所有的虚拟节点,并将其与对应的node对应起来 当然还需要将虚拟节点的hash值放到排序的里面 这里在添加了节点之后,需要保持虚拟节点hash值的顺序 :param node: :return: """ for i in range(self.__nodeNumber): nodeStr = "%s%s" % (node, i) key = self.__genKey(nodeStr) self.__nodeDict[key] = node self.__sortListForKey.append(key) self.__sortListForKey.sort() def removeNode(self, node): """ 这里一个节点的退出,需要将这个节点的所有的虚拟节点都删除 :param node: :return: """ for i in range(self.__nodeNumber): nodeStr = "%s%s" % (node, i) key = self.__genKey(nodeStr) del self.__nodeDict[key] self.__sortListForKey.remove(key) def getNode(self, key): """ 返回这个字符串应该对应的node,这里先求出字符串的hash值,然后找到第一个小于等于的虚拟节点,然后返回node 如果hash值大于所有的节点,那么用第一个虚拟节点 :param : hashNum or keyStr :return: """ keyStr = '' if isinstance(key, int): keyStr = "the keyStr is %d" % key elif isinstance(key, type('a')): keyStr = key else: raise TarsException("the hash code has wrong type") if self.__sortListForKey: key = self.__genKey(keyStr) for keyItem in self.__sortListForKey: if key <= keyItem: return self.__nodeDict[keyItem] return self.__nodeDict[self.__sortListForKey[0]] else: return None def __genKey(self, keyStr): """ 通过key,返回当前key的hash值,这里采用md5 :param key: :return: """ md5Str = hashlib.md5(keyStr).hexdigest() return int(md5Str, 16) ================================================ FILE: danmu/danmaku/tars/core.py ================================================ #! /usr/bin/env python # -*- coding: utf-8 -*- # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # __version__ = "0.0.1" from __util import util from __tars import TarsInputStream from __tars import TarsOutputStream from __tup import TarsUniPacket class tarscore: class TarsInputStream(TarsInputStream): pass class TarsOutputStream(TarsOutputStream): pass class TarsUniPacket(TarsUniPacket): pass class boolean(util.boolean): pass class int8(util.int8): pass class uint8(util.uint8): pass class int16(util.int16): pass class uint16(util.uint16): pass class int32(util.int32): pass class uint32(util.uint32): pass class int64(util.int64): pass class float(util.float): pass class double(util.double): pass class bytes(util.bytes): pass class string(util.string): pass class struct(util.struct): pass @staticmethod def mapclass(ktype, vtype): return util.mapclass(ktype, vtype) @staticmethod def vctclass(vtype): return util.vectorclass(vtype) @staticmethod def printHex(buff): util.printHex(buff) # 被用户引用 from __util import configParse from __rpc import Communicator from exception import * from __logger import tarsLogger ================================================ FILE: danmu/danmaku/tars/exception.py ================================================ # Tencent is pleased to support the open source community by making Tars available. # # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law or agreed to in writing, software distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # class TarsException(Exception): pass class TarsTarsDecodeRequireNotExist(TarsException): pass class TarsTarsDecodeMismatch(TarsException): pass class TarsTarsDecodeInvalidValue(TarsException): pass class TarsTarsUnsupportType(TarsException): pass class TarsNetConnectException(TarsException): pass class TarsNetConnectLostException(TarsException): pass class TarsNetSocketException(TarsException): pass class TarsProxyDecodeException(TarsException): pass class TarsProxyEncodeException(TarsException): pass class TarsServerEncodeException(TarsException): pass class TarsServerDecodeException(TarsException): pass class TarsServerNoFuncException(TarsException): pass class TarsServerNoServantException(TarsException): pass class TarsServerQueueTimeoutException(TarsException): pass class TarsServerUnknownException(TarsException): pass class TarsSyncCallTimeoutException(TarsException): pass class TarsRegistryException(TarsException): pass class TarsServerResetGridException(TarsException): pass ================================================ FILE: danmu/danmaku/tars/tars/EndpointF.tars ================================================ module register { /** * ˿Ϣ */ struct EndpointF { 0 require string host; 1 require int port; 2 require int timeout; 3 require int istcp; 4 require int grid; 5 optional int groupworkid; 6 optional int grouprealid; 7 optional string setId; 8 optional int qos; 9 optional int bakFlag; 11 optional int weight; 12 optional int weightType; }; key[EndpointF, host, port, timeout, istcp, grid, qos, weight, weightType]; }; ================================================ FILE: danmu/danmaku/tars/tars/QueryF.tars ================================================ #include "EndpointF.tars" module register { /** * ȡendpointqueryӿ */ interface QueryF { /** idȡ * * @param id * * @return иöĻendpointб */ vector findObjectById(string id); /**idȡж,ͷǻ * * @param id * @param activeEp endpointб * @param inactiveEp Ǵendpointб * @return: 0-ɹ others-ʧ */ int findObjectById4Any(string id, out vector activeEp, out vector inactiveEp); /** idȡendpointб,ͬfindObjectByIdInSameGroup * * @param id * @param activeEp endpointб * @param inactiveEp Ǵendpointб * @return: 0-ɹ others-ʧ */ int findObjectById4All(string id, out vector activeEp, out vector inactiveEp); /** idȡͬendpointб * * @param id * @param activeEp endpointб * @param inactiveEp Ǵendpointб * @return: 0-ɹ others-ʧ */ int findObjectByIdInSameGroup(string id, out vector activeEp, out vector inactiveEp); /** idȡָصendpointб * * @param id * @param activeEp endpointб * @param inactiveEp Ǵendpointб * @return: 0-ɹ others-ʧ */ int findObjectByIdInSameStation(string id, string sStation, out vector activeEp, out vector inactiveEp); /** idȡͬendpointб * * @param id * @param setId setȫ,ʽΪsetname.setarea.setgroup * @param activeEp endpointб * @param inactiveEp Ǵendpointб * @return: 0-ɹ others-ʧ */ int findObjectByIdInSameSet(string id, string setId, out vector activeEp, out vector inactiveEp); }; }; ================================================ FILE: danmu/danmaku/tars/tars/__init__.py ================================================ ================================================ FILE: danmu/danmaku/yqs.proto ================================================ syntax = "proto2"; package YiQishanPack; message CSHead { optional uint32 command = 1; optional uint32 subcmd = 2; optional uint32 seq = 3; optional bytes uuid = 4; optional uint32 clientType = 5; optional uint32 headFlag = 6; optional uint32 clientVer = 7; optional bytes signature = 8; optional uint32 routeKey = 9; } message TCPAccessReq { optional bytes AccessToken = 1; optional bytes MachineCode = 2; } message TcpHelloReq { optional string uuid = 1; } message EnterRoomReq { optional bytes uuid = 1; optional bytes roomid = 2; optional uint32 neednum = 3; optional bool isfake = 4; optional bool needbroadcast = 5; optional bytes nick = 6; optional bytes clientip = 7; optional bytes subroomid = 8; optional uint32 gameid = 10; } message RoomHelloReq { optional bytes uuid = 1; optional bytes roomid = 2; optional bytes roomsig = 3; optional uint32 connsvrip = 4; optional bool isinternal = 5; optional bytes subroomid = 6; } message Token { optional string uuid = 1; optional bytes gtkey = 2; optional uint32 ip = 3; optional uint32 expiresstime = 4; optional uint32 gentime = 5; } message PublicChatNotify { optional bytes roomid = 1; optional bytes uuid = 2; optional bytes nick = 3; optional ChatInfo info = 4; optional bytes touuid = 5; optional bytes tonick = 6; optional uint32 privilege = 7; optional uint32 rank = 8; optional uint32 fromgame = 9; optional bytes gameid = 10; repeated BadgeType badges = 11; optional RoomUserInfo userinfo = 12; optional bool isnoble = 13; optional uint32 noblelevelid = 14; optional string noblelevelname = 15; optional bool isnoblemessage = 16; } enum BadgeType { NOBARRAGE = 0; FIRST_CHARGE_BADGE = 1; FIRST_CHARGE_COPPER = 2; FIRST_CHARGE_SLIVER = 3; FIRST_CHARGE_GOLD = 4; } message ChatInfo { optional uint32 chattype = 1; optional bytes textmsg = 2; } message RoomUserInfo { optional bytes uuid = 1; optional bytes nick = 2; optional uint32 weekartistconsume = 3; optional uint32 artisttotalconsume = 4; optional uint32 totalconsume = 5; optional uint32 guardendtime = 6; optional uint32 peerageid = 7; } message GiftNotyInfo { optional bytes roomid = 1; optional bytes giftid = 2; optional uint32 giftcnt = 3; optional bytes fromuuid = 4; optional bytes fromnick = 5; optional bytes touuid = 6; optional bytes tonick = 7; optional uint32 consume = 8; optional bytes sessid = 9; optional uint32 hits = 10; optional uint32 hitsall = 11; optional uint32 flag = 12; optional uint32 fromviplevel = 13; optional uint32 fanslevel = 14; optional bool fromisnoble = 15; optional uint32 fromnoblelevelid = 16; } message NotifyFreeGift { optional bytes uuid = 1; optional bytes fromnick = 2; optional bytes touuid = 3; optional bytes tonick = 4; optional bytes roomid = 5; optional uint32 giftid = 6; optional uint32 giftcnt = 7; optional uint32 fromviplevel = 8; optional uint32 fanslevel = 9; optional bool fromisnoble = 11; optional uint32 fromnoblelevelid = 12; } message SendBroadcastPkg { optional bytes uuid = 1; repeated BroadcastMsg broadcastmsg = 2; message BroadcastMsg { optional uint32 businesstype = 1; optional bytes title = 2; optional bytes content = 3; optional uint32 msgseq = 4; } } ================================================ FILE: danmu/danmaku/yqs.py ================================================ import binascii import struct import requests from Crypto.Cipher import DES from Crypto.Util.Padding import pad from . import yqs_pb2 as pb class YiQiShan: ws_url = 'wss://websocket.173.com/' def __init__(self, rid): self.rid = str(rid) self.key = b'e#>&*m16' with requests.Session() as se: res = se.get('http://www.173.com/{}'.format(rid)) try: self.uuid, _, token, _ = res.cookies.values() except ValueError: raise Exception('房间不存在') self.accesstoken = binascii.a2b_hex(token) s = YiQiShan.des_decode(self.accesstoken, self.key) p = pb.Token() p.ParseFromString(s) self.gtkey = p.gtkey[:8] @staticmethod def des_encode(t, key): t = pad(t, DES.block_size) c = DES.new(key, DES.MODE_ECB) res = c.encrypt(t) return res @staticmethod def des_decode(t, key): c = DES.new(key, DES.MODE_ECB) res = c.decrypt(t) length = len(res) padding = res[length - 1] res = res[0:length - padding] return res def startup(self): p = pb.TCPAccessReq() p.AccessToken = self.accesstoken return p.SerializeToString() def tcphelloreq(self): p = pb.TcpHelloReq() p.uuid = self.uuid return p.SerializeToString() def enterroomreq(self): p = pb.EnterRoomReq() p.uuid = self.uuid.encode() p.roomid = self.rid.encode() return p.SerializeToString() def roomhelloreq(self): p = pb.RoomHelloReq() p.uuid = self.uuid.encode() p.roomid = self.rid.encode() return p.SerializeToString() def pack(self, paylod_type): command = { 'startup': 123, 'tcphelloreq': 122, 'enterroomreq': 601, 'roomhelloreq': 600 } subcmd = { 'startup': 0, 'tcphelloreq': 0, 'enterroomreq': 1, 'roomhelloreq': 1 } p = pb.CSHead() p.command = command[paylod_type] p.subcmd = subcmd[paylod_type] p.uuid = self.uuid.encode() p.clientType = 4 p.routeKey = int(self.rid) n = p.SerializeToString() key = self.key if paylod_type == 'startup' else self.gtkey payload = getattr(self, paylod_type)() s = YiQiShan.des_encode(payload, key) buf = struct.pack('!HcH', len(n) + len(s) + 8, b'W', len(n)) buf += n buf += struct.pack('!H', len(s)) buf += s + b'M' return buf def unpack(self, data): msgs = [{'name': '', 'content': '', 'msg_type': 'other'}] s, = struct.unpack_from('!h', data, 3) p, = struct.unpack_from('!h', data, 5 + s) u = data[7 + s:7 + s + p] a = pb.CSHead() a.ParseFromString(data[5:5 + s]) cmd = a.command key = self.key if cmd == 123 else self.gtkey t = u if cmd == 102 else YiQiShan.des_decode(u, key) o = cmd # r = a.subcmd if o == 102: p = pb.SendBroadcastPkg() p.ParseFromString(t) for i in p.broadcastmsg: # PublicChatNotify = 1 # BUSINESS_TYPE_FREE_GIFT = 2 # BUSINESS_TYPE_PAY_GIFT = 3 if i.businesstype == 1: # 发言 q = pb.PublicChatNotify() q.ParseFromString(i.content) user = q.nick.decode() content = q.info.textmsg.decode() # elif i.businesstype == 2: # 免费礼物 # print(i.businesstype) # q = pb.NotifyFreeGift() # q.ParseFromString(i.content) # elif i.businesstype == 3: # 收费礼物 # print(i.businesstype) # q = pb.GiftNotyInfo() # q.ParseFromString(i.content) # else: # pass msg = {'name': user, 'content': content, 'msg_type': 'danmaku'} msgs.append(msg.copy()) return msgs ================================================ FILE: danmu/danmaku/yqs_pb2.py ================================================ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yqs.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='yqs.proto', package='YiQishanPack', syntax='proto2', serialized_options=None, create_key=_descriptor._internal_create_key, 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' ) _BADGETYPE = _descriptor.EnumDescriptor( name='BadgeType', full_name='YiQishanPack.BadgeType', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name='NOBARRAGE', index=0, number=0, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FIRST_CHARGE_BADGE', index=1, number=1, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FIRST_CHARGE_COPPER', index=2, number=2, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FIRST_CHARGE_SLIVER', index=3, number=3, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), _descriptor.EnumValueDescriptor( name='FIRST_CHARGE_GOLD', index=4, number=4, serialized_options=None, type=None, create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, serialized_start=1953, serialized_end=2076, ) _sym_db.RegisterEnumDescriptor(_BADGETYPE) BadgeType = enum_type_wrapper.EnumTypeWrapper(_BADGETYPE) NOBARRAGE = 0 FIRST_CHARGE_BADGE = 1 FIRST_CHARGE_COPPER = 2 FIRST_CHARGE_SLIVER = 3 FIRST_CHARGE_GOLD = 4 _CSHEAD = _descriptor.Descriptor( name='CSHead', full_name='YiQishanPack.CSHead', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='command', full_name='YiQishanPack.CSHead.command', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='subcmd', full_name='YiQishanPack.CSHead.subcmd', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='seq', full_name='YiQishanPack.CSHead.seq', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.CSHead.uuid', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientType', full_name='YiQishanPack.CSHead.clientType', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='headFlag', full_name='YiQishanPack.CSHead.headFlag', index=5, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientVer', full_name='YiQishanPack.CSHead.clientVer', index=6, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='signature', full_name='YiQishanPack.CSHead.signature', index=7, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='routeKey', full_name='YiQishanPack.CSHead.routeKey', index=8, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=28, serialized_end=190, ) _TCPACCESSREQ = _descriptor.Descriptor( name='TCPAccessReq', full_name='YiQishanPack.TCPAccessReq', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='AccessToken', full_name='YiQishanPack.TCPAccessReq.AccessToken', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='MachineCode', full_name='YiQishanPack.TCPAccessReq.MachineCode', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=192, serialized_end=248, ) _TCPHELLOREQ = _descriptor.Descriptor( name='TcpHelloReq', full_name='YiQishanPack.TcpHelloReq', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.TcpHelloReq.uuid', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=250, serialized_end=277, ) _ENTERROOMREQ = _descriptor.Descriptor( name='EnterRoomReq', full_name='YiQishanPack.EnterRoomReq', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.EnterRoomReq.uuid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='roomid', full_name='YiQishanPack.EnterRoomReq.roomid', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='neednum', full_name='YiQishanPack.EnterRoomReq.neednum', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isfake', full_name='YiQishanPack.EnterRoomReq.isfake', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='needbroadcast', full_name='YiQishanPack.EnterRoomReq.needbroadcast', index=4, number=5, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='nick', full_name='YiQishanPack.EnterRoomReq.nick', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='clientip', full_name='YiQishanPack.EnterRoomReq.clientip', index=6, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='subroomid', full_name='YiQishanPack.EnterRoomReq.subroomid', index=7, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gameid', full_name='YiQishanPack.EnterRoomReq.gameid', index=8, number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=280, serialized_end=447, ) _ROOMHELLOREQ = _descriptor.Descriptor( name='RoomHelloReq', full_name='YiQishanPack.RoomHelloReq', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.RoomHelloReq.uuid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='roomid', full_name='YiQishanPack.RoomHelloReq.roomid', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='roomsig', full_name='YiQishanPack.RoomHelloReq.roomsig', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='connsvrip', full_name='YiQishanPack.RoomHelloReq.connsvrip', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isinternal', full_name='YiQishanPack.RoomHelloReq.isinternal', index=4, number=5, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='subroomid', full_name='YiQishanPack.RoomHelloReq.subroomid', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=449, serialized_end=568, ) _TOKEN = _descriptor.Descriptor( name='Token', full_name='YiQishanPack.Token', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.Token.uuid', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gtkey', full_name='YiQishanPack.Token.gtkey', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='ip', full_name='YiQishanPack.Token.ip', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='expiresstime', full_name='YiQishanPack.Token.expiresstime', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gentime', full_name='YiQishanPack.Token.gentime', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=570, serialized_end=657, ) _PUBLICCHATNOTIFY = _descriptor.Descriptor( name='PublicChatNotify', full_name='YiQishanPack.PublicChatNotify', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='roomid', full_name='YiQishanPack.PublicChatNotify.roomid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.PublicChatNotify.uuid', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='nick', full_name='YiQishanPack.PublicChatNotify.nick', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='info', full_name='YiQishanPack.PublicChatNotify.info', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='touuid', full_name='YiQishanPack.PublicChatNotify.touuid', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tonick', full_name='YiQishanPack.PublicChatNotify.tonick', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='privilege', full_name='YiQishanPack.PublicChatNotify.privilege', index=6, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='rank', full_name='YiQishanPack.PublicChatNotify.rank', index=7, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromgame', full_name='YiQishanPack.PublicChatNotify.fromgame', index=8, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='gameid', full_name='YiQishanPack.PublicChatNotify.gameid', index=9, number=10, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='badges', full_name='YiQishanPack.PublicChatNotify.badges', index=10, number=11, type=14, cpp_type=8, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='userinfo', full_name='YiQishanPack.PublicChatNotify.userinfo', index=11, number=12, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isnoble', full_name='YiQishanPack.PublicChatNotify.isnoble', index=12, number=13, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='noblelevelid', full_name='YiQishanPack.PublicChatNotify.noblelevelid', index=13, number=14, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='noblelevelname', full_name='YiQishanPack.PublicChatNotify.noblelevelname', index=14, number=15, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='isnoblemessage', full_name='YiQishanPack.PublicChatNotify.isnoblemessage', index=15, number=16, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=660, serialized_end=1033, ) _CHATINFO = _descriptor.Descriptor( name='ChatInfo', full_name='YiQishanPack.ChatInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='chattype', full_name='YiQishanPack.ChatInfo.chattype', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='textmsg', full_name='YiQishanPack.ChatInfo.textmsg', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1035, serialized_end=1080, ) _ROOMUSERINFO = _descriptor.Descriptor( name='RoomUserInfo', full_name='YiQishanPack.RoomUserInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.RoomUserInfo.uuid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='nick', full_name='YiQishanPack.RoomUserInfo.nick', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='weekartistconsume', full_name='YiQishanPack.RoomUserInfo.weekartistconsume', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='artisttotalconsume', full_name='YiQishanPack.RoomUserInfo.artisttotalconsume', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='totalconsume', full_name='YiQishanPack.RoomUserInfo.totalconsume', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='guardendtime', full_name='YiQishanPack.RoomUserInfo.guardendtime', index=5, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='peerageid', full_name='YiQishanPack.RoomUserInfo.peerageid', index=6, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1083, serialized_end=1243, ) _GIFTNOTYINFO = _descriptor.Descriptor( name='GiftNotyInfo', full_name='YiQishanPack.GiftNotyInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='roomid', full_name='YiQishanPack.GiftNotyInfo.roomid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftid', full_name='YiQishanPack.GiftNotyInfo.giftid', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftcnt', full_name='YiQishanPack.GiftNotyInfo.giftcnt', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromuuid', full_name='YiQishanPack.GiftNotyInfo.fromuuid', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromnick', full_name='YiQishanPack.GiftNotyInfo.fromnick', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='touuid', full_name='YiQishanPack.GiftNotyInfo.touuid', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tonick', full_name='YiQishanPack.GiftNotyInfo.tonick', index=6, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='consume', full_name='YiQishanPack.GiftNotyInfo.consume', index=7, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='sessid', full_name='YiQishanPack.GiftNotyInfo.sessid', index=8, number=9, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hits', full_name='YiQishanPack.GiftNotyInfo.hits', index=9, number=10, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hitsall', full_name='YiQishanPack.GiftNotyInfo.hitsall', index=10, number=11, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='flag', full_name='YiQishanPack.GiftNotyInfo.flag', index=11, number=12, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromviplevel', full_name='YiQishanPack.GiftNotyInfo.fromviplevel', index=12, number=13, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fanslevel', full_name='YiQishanPack.GiftNotyInfo.fanslevel', index=13, number=14, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromisnoble', full_name='YiQishanPack.GiftNotyInfo.fromisnoble', index=14, number=15, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromnoblelevelid', full_name='YiQishanPack.GiftNotyInfo.fromnoblelevelid', index=15, number=16, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1246, serialized_end=1543, ) _NOTIFYFREEGIFT = _descriptor.Descriptor( name='NotifyFreeGift', full_name='YiQishanPack.NotifyFreeGift', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.NotifyFreeGift.uuid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromnick', full_name='YiQishanPack.NotifyFreeGift.fromnick', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='touuid', full_name='YiQishanPack.NotifyFreeGift.touuid', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tonick', full_name='YiQishanPack.NotifyFreeGift.tonick', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='roomid', full_name='YiQishanPack.NotifyFreeGift.roomid', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftid', full_name='YiQishanPack.NotifyFreeGift.giftid', index=5, number=6, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='giftcnt', full_name='YiQishanPack.NotifyFreeGift.giftcnt', index=6, number=7, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromviplevel', full_name='YiQishanPack.NotifyFreeGift.fromviplevel', index=7, number=8, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fanslevel', full_name='YiQishanPack.NotifyFreeGift.fanslevel', index=8, number=9, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromisnoble', full_name='YiQishanPack.NotifyFreeGift.fromisnoble', index=9, number=11, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='fromnoblelevelid', full_name='YiQishanPack.NotifyFreeGift.fromnoblelevelid', index=10, number=12, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1546, serialized_end=1763, ) _SENDBROADCASTPKG_BROADCASTMSG = _descriptor.Descriptor( name='BroadcastMsg', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='businesstype', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.businesstype', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='title', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.title', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='content', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.content', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='msgseq', full_name='YiQishanPack.SendBroadcastPkg.BroadcastMsg.msgseq', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1867, serialized_end=1951, ) _SENDBROADCASTPKG = _descriptor.Descriptor( name='SendBroadcastPkg', full_name='YiQishanPack.SendBroadcastPkg', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='uuid', full_name='YiQishanPack.SendBroadcastPkg.uuid', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='broadcastmsg', full_name='YiQishanPack.SendBroadcastPkg.broadcastmsg', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_SENDBROADCASTPKG_BROADCASTMSG, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1766, serialized_end=1951, ) _PUBLICCHATNOTIFY.fields_by_name['info'].message_type = _CHATINFO _PUBLICCHATNOTIFY.fields_by_name['badges'].enum_type = _BADGETYPE _PUBLICCHATNOTIFY.fields_by_name['userinfo'].message_type = _ROOMUSERINFO _SENDBROADCASTPKG_BROADCASTMSG.containing_type = _SENDBROADCASTPKG _SENDBROADCASTPKG.fields_by_name['broadcastmsg'].message_type = _SENDBROADCASTPKG_BROADCASTMSG DESCRIPTOR.message_types_by_name['CSHead'] = _CSHEAD DESCRIPTOR.message_types_by_name['TCPAccessReq'] = _TCPACCESSREQ DESCRIPTOR.message_types_by_name['TcpHelloReq'] = _TCPHELLOREQ DESCRIPTOR.message_types_by_name['EnterRoomReq'] = _ENTERROOMREQ DESCRIPTOR.message_types_by_name['RoomHelloReq'] = _ROOMHELLOREQ DESCRIPTOR.message_types_by_name['Token'] = _TOKEN DESCRIPTOR.message_types_by_name['PublicChatNotify'] = _PUBLICCHATNOTIFY DESCRIPTOR.message_types_by_name['ChatInfo'] = _CHATINFO DESCRIPTOR.message_types_by_name['RoomUserInfo'] = _ROOMUSERINFO DESCRIPTOR.message_types_by_name['GiftNotyInfo'] = _GIFTNOTYINFO DESCRIPTOR.message_types_by_name['NotifyFreeGift'] = _NOTIFYFREEGIFT DESCRIPTOR.message_types_by_name['SendBroadcastPkg'] = _SENDBROADCASTPKG DESCRIPTOR.enum_types_by_name['BadgeType'] = _BADGETYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) CSHead = _reflection.GeneratedProtocolMessageType('CSHead', (_message.Message,), { 'DESCRIPTOR' : _CSHEAD, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.CSHead) }) _sym_db.RegisterMessage(CSHead) TCPAccessReq = _reflection.GeneratedProtocolMessageType('TCPAccessReq', (_message.Message,), { 'DESCRIPTOR' : _TCPACCESSREQ, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.TCPAccessReq) }) _sym_db.RegisterMessage(TCPAccessReq) TcpHelloReq = _reflection.GeneratedProtocolMessageType('TcpHelloReq', (_message.Message,), { 'DESCRIPTOR' : _TCPHELLOREQ, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.TcpHelloReq) }) _sym_db.RegisterMessage(TcpHelloReq) EnterRoomReq = _reflection.GeneratedProtocolMessageType('EnterRoomReq', (_message.Message,), { 'DESCRIPTOR' : _ENTERROOMREQ, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.EnterRoomReq) }) _sym_db.RegisterMessage(EnterRoomReq) RoomHelloReq = _reflection.GeneratedProtocolMessageType('RoomHelloReq', (_message.Message,), { 'DESCRIPTOR' : _ROOMHELLOREQ, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.RoomHelloReq) }) _sym_db.RegisterMessage(RoomHelloReq) Token = _reflection.GeneratedProtocolMessageType('Token', (_message.Message,), { 'DESCRIPTOR' : _TOKEN, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.Token) }) _sym_db.RegisterMessage(Token) PublicChatNotify = _reflection.GeneratedProtocolMessageType('PublicChatNotify', (_message.Message,), { 'DESCRIPTOR' : _PUBLICCHATNOTIFY, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.PublicChatNotify) }) _sym_db.RegisterMessage(PublicChatNotify) ChatInfo = _reflection.GeneratedProtocolMessageType('ChatInfo', (_message.Message,), { 'DESCRIPTOR' : _CHATINFO, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.ChatInfo) }) _sym_db.RegisterMessage(ChatInfo) RoomUserInfo = _reflection.GeneratedProtocolMessageType('RoomUserInfo', (_message.Message,), { 'DESCRIPTOR' : _ROOMUSERINFO, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.RoomUserInfo) }) _sym_db.RegisterMessage(RoomUserInfo) GiftNotyInfo = _reflection.GeneratedProtocolMessageType('GiftNotyInfo', (_message.Message,), { 'DESCRIPTOR' : _GIFTNOTYINFO, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.GiftNotyInfo) }) _sym_db.RegisterMessage(GiftNotyInfo) NotifyFreeGift = _reflection.GeneratedProtocolMessageType('NotifyFreeGift', (_message.Message,), { 'DESCRIPTOR' : _NOTIFYFREEGIFT, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.NotifyFreeGift) }) _sym_db.RegisterMessage(NotifyFreeGift) SendBroadcastPkg = _reflection.GeneratedProtocolMessageType('SendBroadcastPkg', (_message.Message,), { 'BroadcastMsg' : _reflection.GeneratedProtocolMessageType('BroadcastMsg', (_message.Message,), { 'DESCRIPTOR' : _SENDBROADCASTPKG_BROADCASTMSG, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.SendBroadcastPkg.BroadcastMsg) }) , 'DESCRIPTOR' : _SENDBROADCASTPKG, '__module__' : 'yqs_pb2' # @@protoc_insertion_point(class_scope:YiQishanPack.SendBroadcastPkg) }) _sym_db.RegisterMessage(SendBroadcastPkg) _sym_db.RegisterMessage(SendBroadcastPkg.BroadcastMsg) # @@protoc_insertion_point(module_scope) ================================================ FILE: danmu/danmaku/zhanqi.py ================================================ import json import struct import aiohttp class ZhanQi: heartbeat = b'\xbb\xcc\x00\x00\x00\x00\x15\x00\x00\x00\x10\'{"cmdid": "keeplive"}' wss_url = 'wss://gw.zhanqi.tv/' heartbeatInterval = 30 @staticmethod async def get_ws_info(url): reg_datas = [] rid = url.split('/')[-1] async with aiohttp.ClientSession() as session: async with session.get('https://m.zhanqi.tv/api/static/v2.1/room/domain/{}.json'.format(rid)) as resp: info = json.loads(await resp.text()) roomid = info['data']['id'] async with session.get('https://m.zhanqi.tv/api/public/room.viewer') as resp2: res = json.loads(await resp2.text()) gid = res['data']['gid'] sid = res['data']['sid'] timestamp = res['data']['timestamp'] login = { 'cmdid': 'loginreq', 'roomid': int(roomid), 'chatroomid': 0, 'gid': gid, 'sid': sid, 't': 0, 'r': 0, 'device': 1, 'fhost': 'mzhanqi', 'uid': 0, 'timestamp': timestamp } body = json.dumps(login, separators=(',', ':')) head = struct.pack('>> 16) & 65535) * (c & 65535) + (d & 65535) * ((c >>> 16) & 65535)) << 16) >>> 0) | 0) } ; for (var aV = 0, aN = 0; aN < ba.length; ++aN) { var aU = ba.charCodeAt(aN); aU >= 55296 && aU <= 57343 && (aU = 65536 + ((1023 & aU) << 10) | 1023 & ba.charCodeAt(++aN)), aU <= 127 ? ++aV : aV += aU <= 2047 ? 2 : aU <= 65535 ? 3 : aU <= 2097151 ? 4 : aU <= 67108863 ? 5 : 6 } var aO = new Array(aV + 1) , aP = 0; ai[51] = 3920, ai[54] = 8328; for (var a9 = aP + aV, aN = 0; aN < ba.length; ++aN) { var aU = ba.charCodeAt(aN); if (aU >= 55296 && aU <= 57343 && (aU = 65536 + ((1023 & aU) << 10) | 1023 & ba.charCodeAt(++aN)), aU <= 127) { if (aP >= a9) { break } aO[aP++] = aU } else { if (aU <= 2047) { if (aP + 1 >= a9) { break } aO[aP++] = 192 | aU >> 6, aO[aP++] = 128 | 63 & aU } else { if (aU <= 65535) { if (aP + 2 >= a9) { break } aO[aP++] = 224 | aU >> 12, aO[aP++] = 128 | aU >> 6 & 63, aO[aP++] = 128 | 63 & aU } else { if (aU <= 2097151) { if (aP + 3 >= a9) { break } aO[aP++] = 240 | aU >> 18, aO[aP++] = 128 | aU >> 12 & 63, aO[aP++] = 128 | aU >> 6 & 63, aO[aP++] = 128 | 63 & aU } else { if (aU <= 67108863) { if (aP + 4 >= a9) { break } aO[aP++] = 248 | aU >> 24, aO[aP++] = 128 | aU >> 18 & 63, aO[aP++] = 128 | aU >> 12 & 63, aO[aP++] = 128 | aU >> 6 & 63, aO[aP++] = 128 | 63 & aU } else { if (aP + 5 >= a9) { break } aO[aP++] = 252 | aU >> 30, aO[aP++] = 128 | aU >> 24 & 63, aO[aP++] = 128 | aU >> 18 & 63, aO[aP++] = 128 | aU >> 12 & 63, aO[aP++] = 128 | aU >> 6 & 63, aO[aP++] = 128 | 63 & aU } } } } } } aO[aP] = 0, ah.set(aO, av), ba = av; var aM = 0 , bh = 0 , a1 = 0 , aZ = 0 , bb = 0 , aK = 0 , a4 = 0 , aW = 0 , aL = 0 , aJ = 0 , aI = 0 , aT = 0 , bX = 0 , aR = 0 , bv = 0 , a7 = 0 , aU = 0 , bU = 0 , a2 = 0 , bR = 0 , bD = 0 , bu = 0 , bk = 0 , bW = 0 , bI = 0 , bQ = 0 , br = 0 , aH = 0 , bP = 0 , bO = 0 , bL = 0 , bH = 0 , bG = 0 , bF = 0 , bB = 0 , bz = 0 , by = 0 , bx = 0 , bs = 0 , bq = 0 , bp = 0 , bo = 0 , bn = 0 , ca = 0 , af = 0 , aQ = 0 , aX = 0 , bJ = 0 , b0 = 0 , bS = 0 , a5 = 0 , b8 = 0 , cp = 0 , ci = 0 , bf = 0 , bt = 0 , aj = 0 , cm = 0 , aw = 0 , ap = 0 , bA = 0 , b5 = 0 , aD = 0 , cs = 0 , cd = 0 , aA = 0 , cj = 0 , am = 0 , aq = 0 , b2 = 0 , bC = 0 , ay = 0 , aY = 0 , cq = 0 , ct = 0 , ch = 0 , ad = 0 , b3 = 0 , bK = 0 , az = 0 , bZ = 0 , bY = 0 , ak = 0 , cn = 0 , b6 = 0 , a6 = 0 , aB = 0 , an = 0 , b9 = 0 , bT = 0 , bg = 0 , aE = 0 , cf = 0 , bl = 0 , aG = 0 , au = 0 , ab = 0 , bN = 0 , ag = 0 , aS = 0 , a0 = 0 , bM = 0 , b1 = 0 , bV = 0 , a8 = 0 , cb = 0 , cr = 0 , ck = 0 , bi = 0 , bw = 0 , al = 0 , co = 0 , ax = 0 , ar = 0 , bE = 0 , b7 = 0 , aF = 0 , aa = 0 , cg = 0; b9 = a3, a3 = a3 + 304 | 0, ch = b9 + 40 | 0, aB = b9, bb = ch + 4 | 0, aK = ch + 8 | 0, aU = ch + 12 | 0, aH = ch + 16 | 0, bs = ch + 20 | 0, bS = ch + 24 | 0, bA = ch + 28 | 0, cd = ch + 32 | 0, aA = ch + 36 | 0, cj = ch + 40 | 0, a4 = ch + 44 | 0, aW = ch + 48 | 0, aL = ch + 52 | 0, aJ = ch + 56 | 0, aI = ch + 60 | 0, aT = ch + 64 | 0, bX = ch + 68 | 0, aR = ch + 72 | 0, bv = ch + 76 | 0, a7 = ch + 80 | 0, bU = ch + 84 | 0, a2 = ch + 88 | 0, bR = ch + 92 | 0, bD = ch + 96 | 0, bu = ch + 100 | 0, bk = ch + 104 | 0, bW = ch + 108 | 0, bI = ch + 112 | 0, bQ = ch + 116 | 0, br = ch + 120 | 0, bP = ch + 124 | 0, bO = ch + 128 | 0, bL = ch + 132 | 0, bH = ch + 136 | 0, bG = ch + 140 | 0, bF = ch + 144 | 0, bB = ch + 148 | 0, bz = ch + 152 | 0, by = ch + 156 | 0, bx = ch + 160 | 0, bq = ch + 164 | 0, bp = ch + 168 | 0, bo = ch + 172 | 0, bn = ch + 176 | 0, ca = ch + 180 | 0, af = ch + 184 | 0, aQ = ch + 188 | 0, aX = ch + 192 | 0, bJ = ch + 196 | 0, b0 = ch + 200 | 0, a5 = ch + 204 | 0, b8 = ch + 208 | 0, cp = ch + 212 | 0, ci = ch + 216 | 0, bf = ch + 220 | 0, bt = ch + 224 | 0, aj = ch + 228 | 0, cm = ch + 232 | 0, aw = ch + 236 | 0, ap = ch + 240 | 0, b5 = ch + 244 | 0, aD = ch + 248 | 0, cs = ch + 252 | 0, a1 = 78, am = 0, aq = 0, b2 = 0, bC = 0, ay = 0, aY = 0, cq = 0, ct = 0, ad = 0, b3 = 0, bK = 0, az = 0, bZ = 0, bh = 0, aM = 0, bY = 0, ak = 0, cn = 0, b6 = 0, a6 = 0; ba: for (; ; ) { switch (0 | a1) { case 62: break ba; case 145: an = 136; break ba; case 112: cr = a6, cb = b6, a8 = cn, bV = ak, b1 = bY, bM = aM, a0 = bh, aS = bZ, ag = az, bN = bK, ab = b3, au = ad, aG = ct, bl = cq, cf = ay, aE = bC, bg = b2, bT = aq, aZ = am, a1 = 99, aY = 0 | bd[aB + (cn + 1588902052 + -1 + -1588902052 + -1250383377 - am + 1250383377 << 2) >> 2], a6 = cr, b6 = cb, cn = a8, ak = bV, bY = b1, aM = bM, bh = a0, bZ = aS, az = ag, bK = bN, b3 = ab, ad = au, ct = aG, cq = bl, ay = cf, bC = aE, b2 = bg, aq = bT, am = aZ; continue ba; case 111: ck = a6, aZ = b6, bT = cn, bg = ak, aE = bY, cf = aM, bl = bh, aG = bZ, au = az, ab = bK, bN = b3, ag = ad, aS = ct, a0 = cq, bM = aY, b1 = ay, bV = bC, a8 = b2, cb = aq, cr = am, a1 = (0 | cn) == (0 | am) ? 110 : 107, a6 = ck, b6 = aZ, cn = bT, ak = bg, bY = aE, aM = cf, bh = bl, bZ = aG, az = au, bK = ab, b3 = bN, ad = ag, ct = aS, cq = a0, aY = bM, ay = b1, bC = bV, b2 = a8, aq = cb, am = cr; continue ba; case 110: aZ = a6, bT = b6, bg = cn, aE = ak, cf = bY, bl = aM, aG = bh, au = bZ, ab = az, bN = bK, ag = b3, aS = ad, a0 = ct, bM = cq, b1 = aY, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = (0 | bh) > 0 ? 109 : 107, a6 = aZ, b6 = bT, cn = bg, ak = aE, bY = cf, aM = bl, bh = aG, bZ = au, az = ab, bK = bN, b3 = ag, ad = aS, ct = a0, cq = bM, aY = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 109: bT = a6, bg = b6, aE = cn, cf = ak, bl = bY, aG = aM, au = bh, ab = bZ, bN = az, ag = bK, aS = b3, a0 = ad, bM = ct, b1 = cq, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = 99, aY = 0 | bd[aB >> 2], a6 = bT, b6 = bg, cn = aE, ak = cf, bY = bl, aM = aG, bh = au, bZ = ab, az = bN, bK = ag, b3 = aS, ad = a0, ct = bM, cq = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 107: aZ = a6, bT = b6, bg = cn, aE = ak, cf = bY, bl = aM, aG = bh, au = bZ, ab = az, bN = bK, ag = b3, aS = ad, a0 = ct, bM = cq, b1 = aY, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = (0 | cn) > (am - 1017329338 + 1 + 1017329338 | 0) ? 106 : 105, a6 = aZ, b6 = bT, cn = bg, ak = aE, bY = cf, aM = bl, bh = aG, bZ = au, az = ab, bK = bN, b3 = ag, ad = aS, ct = a0, cq = bM, aY = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 106: bT = a6, bg = b6, aE = cn, cf = ak, bl = bY, aG = aM, au = bh, ab = bZ, bN = az, ag = bK, aS = b3, a0 = ad, bM = ct, b1 = cq, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = 99, aY = 0, a6 = bT, b6 = bg, cn = aE, ak = cf, bY = bl, aM = aG, bh = au, bZ = ab, az = bN, bK = ag, b3 = aS, ad = a0, ct = bM, cq = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 105: bT = a6, bg = b6, aE = cn, cf = ak, bl = bY, aG = aM, au = bh, ab = bZ, bN = az, ag = bK, aS = b3, a0 = ad, bM = ct, b1 = cq, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = 99, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = bT, b6 = bg, cn = aE, ak = cf, bY = bl, aM = aG, bh = au, bZ = ab, az = bN, bK = ag, b3 = aS, ad = a0, ct = bM, cq = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 104: a1 = ad - 520486856 + 40 + 520486856 >> 6 << 4, aZ = a6, bT = b6, bg = cn, aE = ak, cf = bY, bl = aM, aG = bh, au = bZ, ab = az, bN = bK, ag = b3, aS = ad, a0 = ct, bM = cq, b1 = aY, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = (0 | cn) == (14 & a1 | 14 ^ a1 | 0) ? 103 : 102, a6 = aZ, b6 = bT, cn = bg, ak = aE, bY = cf, aM = bl, bh = aG, bZ = au, az = ab, bK = bN, b3 = ag, ad = aS, ct = a0, cq = bM, aY = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 103: bT = a6, bg = b6, aE = cn, cf = ak, bl = bY, aG = aM, au = bh, ab = bZ, bN = az, ag = bK, aS = b3, a0 = ad, bM = ct, b1 = cq, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = 99, aY = (ad << 3) - 906020365 + 256 + 906020365 | 0, a6 = bT, b6 = bg, cn = aE, ak = cf, bY = bl, aM = aG, bh = au, bZ = ab, az = bN, bK = ag, b3 = aS, ad = a0, ct = bM, cq = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 102: aZ = a6, bT = b6, bg = cn, aE = ak, cf = bY, bl = aM, aG = bh, au = bZ, ab = az, bN = bK, ag = b3, aS = ad, a0 = ct, bM = cq, b1 = aY, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = (0 | cn) > (am - 2136007327 + 1 + 2136007327 | 0) ? 101 : 100, a6 = aZ, b6 = bT, cn = bg, ak = aE, bY = cf, aM = bl, bh = aG, bZ = au, az = ab, bK = bN, b3 = ag, ad = aS, ct = a0, cq = bM, aY = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 101: bT = a6, bg = b6, aE = cn, cf = ak, bl = bY, aG = aM, au = bh, ab = bZ, bN = az, ag = bK, aS = b3, a0 = ad, bM = ct, b1 = cq, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = 99, aY = 0, a6 = bT, b6 = bg, cn = aE, ak = cf, bY = bl, aM = aG, bh = au, bZ = ab, az = bN, bK = ag, b3 = aS, ad = a0, ct = bM, cq = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 100: bT = a6, bg = b6, aE = cn, cf = ak, bl = bY, aG = aM, au = bh, ab = bZ, bN = az, ag = bK, aS = b3, a0 = ad, bM = ct, b1 = cq, bV = ay, a8 = bC, cb = b2, cr = aq, ck = am, a1 = 99, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = bT, b6 = bg, cn = aE, ak = cf, bY = bl, aM = aG, bh = au, bZ = ab, az = bN, bK = ag, b3 = aS, ad = a0, ct = bM, cq = b1, ay = bV, bC = a8, b2 = cb, aq = cr, am = ck; continue ba; case 99: am = 0 | bd[ch + (ct << 2) >> 2], bY = -1 & ~(1 | ~(((1 ^ am) & am) - (0 - aY))), bg = (-2 ^ am) & am, bT = ~bY, aE = ~bg, cn = 1404706963, cn = ((-1404706964 & bT | bY & cn) ^ (-1404706964 & aE | bg & cn) | ~(bT | aE) & (-1404706964 | cn)) - (0 - ((-2 ^ aY) & aY)) | 0, aE = -1 & ~(1 | ~(0 - (0 - cn + (0 - ((1 ^ ak) & ak))))), bT = (-2 ^ ak) & ak, bg = ~aE, bY = ~bT, aG = 405859794, am = 0 - (0 - ((-405859795 & bg | aE & aG) ^ (-405859795 & bY | bT & aG) | ~(bg | bY) & (-405859795 | aG)) + (0 - (-1 & ~(-2 | ~(am + 125479053 + aY - 125479053))))) | 0, aG = (0 | ct) % 4 | 0, aG = 0 - (0 - (aG << 2) - 1639813410) - 1628865018 + ((0 | bm(aG + -946902778 + -1 + 946902778 | 0, aG)) / 2 | 0) + 1628865018 | 0, bY = aG + -705355747 + -1639813405 + 705355747 | 0, bg = am << bY, aG = am >>> (-135710764 - aG + 1775524201 | 0), aG = bg & aG | bg ^ aG, bg = (-2 ^ b2) & b2, bT = 0 - (0 - b2 - 1859242102) | 0, bT = -1 & ~(1 | ~(403699684 + ((1 ^ bT) & bT) + aG + -403699684)), aE = ~bT, cf = ~bg, bl = 2075741682, al = -1 & ~(-2 | ~aG), bw = ~al, bi = 1859242101, aZ = 1973195179, au = a6, ab = b6, bN = ak, ag = aM, aS = bh, a0 = bZ, bM = az, b1 = bK, bV = b3, a8 = ad, cb = cq, cr = bC, ck = b2, aq = ay, a1 = 119, 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, aY = aG, ct = 0 - (0 - ct - 1) | 0, a6 = au, b6 = ab, ak = bN, aM = ag, bh = aS, bZ = a0, az = bM, bK = b1, b3 = bV, ad = a8, cq = cb, ay = cr, bC = ck; continue ba; case 97: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | ct) < 48 ? 95 : 63, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 95: aE = b2 & ~bC | bC & ~b2, ak = 1719848736, ak = (-1719848737 & ~aE | aE & ak) ^ (-1719848737 & ~ay | ay & ak), aE = 0 - (0 - (-1 & ~(1 | ~aq)) + (0 - ak)) | 0, aE &= 1 ^ aE, cf = (-2 ^ aq) & aq, bl = ~aE, aG = ~cf, cn = -373881475, au = a6, ab = b6, bN = bY, ag = aM, aS = bh, a0 = bZ, bM = az, b1 = bK, bV = b3, a8 = ad, cb = ct, cr = cq, ck = ay, bi = bC, bw = b2, al = aq, a1 = 94, am = 0 - (0 - ad + 1) >> 2, aY = ak, ak = ((373881474 & bl | aE & cn) ^ (373881474 & aG | cf & cn) | ~(bl | aG) & (373881474 | cn)) - (0 - (-1 & ~(-2 | ~ak))) | 0, cn = ((0 - (0 - (3 * ct | 0) - 5) | 0) % 16 | 0) - 169207214 + cq + 169207214 | 0, a6 = au, b6 = ab, bY = bN, aM = ag, bh = aS, bZ = a0, az = bM, bK = b1, b3 = bV, ad = a8, ct = cb, cq = cr, ay = ck, bC = bi, b2 = bw, aq = al; continue ba; case 94: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (ad + 1934808656 + 32 - 1934808656 >> 2 | 0) ? 82 : 93, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 93: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (0 | am) ? 92 : 89, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 92: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | bh) > 0 ? 91 : 90, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 91: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0 | bd[aB + (cn + (0 - am) << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 90: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0 | bd[aB + (cn + 692823717 + -1 - 692823717 + 2024697286 - am - 2024697286 << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 89: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) == (0 | am) ? 88 : 85, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 88: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | bh) > 0 ? 87 : 85, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 87: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0 | bd[aB >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 85: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (0 - (0 - am - 1) | 0) ? 84 : 83, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 84: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 83: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 82: aZ = ad + 430907182 + 40 - 430907182 >> 6 << 4, bT = ~aZ, bg = -15, a1 = 2004298389, aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) == ((-2004298390 & bT | aZ & a1) ^ (-2004298390 & bg | 14 & a1) | ~(bT | bg) & (-2004298390 | a1) | 0) ? 81 : 80, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 81: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = (ad << 3) - -256 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 80: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (0 - (0 - am - 1) | 0) ? 79 : 77, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 79: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 78: bd[ch >> 2] = -680876936, bd[bb >> 2] = -389564586, bd[aK >> 2] = 606105819, bd[aU >> 2] = -1044525330, bd[aH >> 2] = -176418897, bd[bs >> 2] = 1200080426, bd[bS >> 2] = -1473231341, bd[bA >> 2] = -45705983, bd[cd >> 2] = 1770035416, bd[aA >> 2] = -1958414417, bd[cj >> 2] = -42063, bd[a4 >> 2] = -1990404162, bd[aW >> 2] = 1804603682, bd[aL >> 2] = -40341101, bd[aJ >> 2] = -1502002290, bd[aI >> 2] = 1236535329, bd[aT >> 2] = -165796510, bd[bX >> 2] = -1069501632, bd[aR >> 2] = 643717713, bd[bv >> 2] = -373897302, bd[a7 >> 2] = -701558691, bd[bU >> 2] = 38016083, bd[a2 >> 2] = -660478335, bd[bR >> 2] = -405537848, bd[bD >> 2] = 568446438, bd[bu >> 2] = -1019803690, bd[bk >> 2] = -187363961, bd[bW >> 2] = 1163531501, bd[bI >> 2] = -1444681467, bd[bQ >> 2] = -51403784, bd[br >> 2] = 1735328473, bd[bP >> 2] = -1926607734, bd[bO >> 2] = -378558, bd[bL >> 2] = -2022574463, bd[bH >> 2] = 1839030562, bd[bG >> 2] = -35309556, bd[bF >> 2] = -1530992060, bd[bB >> 2] = 1272893353, bd[bz >> 2] = -155497632, bd[by >> 2] = -1094730640, bd[bx >> 2] = 681279174, bd[bq >> 2] = -358537222, bd[bp >> 2] = -722521979, bd[bo >> 2] = 76029189, bd[bn >> 2] = -640364487, bd[ca >> 2] = -421815835, bd[af >> 2] = 530742520, bd[aQ >> 2] = -995338651, bd[aX >> 2] = -198630844, bd[bJ >> 2] = 1126891415, bd[b0 >> 2] = -1416354905, bd[a5 >> 2] = -57434055, bd[b8 >> 2] = 1700485571, bd[cp >> 2] = -1894986606, bd[ci >> 2] = -1051523, bd[bf >> 2] = -2054922799, bd[bt >> 2] = 1873313359, bd[aj >> 2] = -30611744, bd[cm >> 2] = -1560198380, bd[aw >> 2] = 1309151649, bd[ap >> 2] = -145523070, bd[b5 >> 2] = -1120210379, bd[aD >> 2] = 718787259, bd[cs >> 2] = -343485551, bM = a6, b1 = b6, bV = cn, a8 = ak, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, a1 = 74, am = 0, aq = 1732584193, b2 = -271733879, bC = -1732584194, ay = 271733878, aY = 1732584193, cq = 0, ct = 0, ad = 0, bY = 1, a6 = bM, b6 = b1, cn = bV, ak = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al; continue ba; case 77: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 75, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 75: am = 0 | bd[ch + (ct << 2) >> 2], cf = -1 & ~(1 | ~(((1 ^ am) & am) - (0 - aY))), aE = -1 & ~(-2 | ~am), bg = ~cf, bT = ~aE, cn = 268273122, cn = ((-268273123 & bg | cf & cn) ^ (-268273123 & bT | aE & cn) | ~(bg | bT) & (-268273123 | cn)) - 1134317627 + ((-2 ^ aY) & aY) + 1134317627 | 0, bT = -1 & ~(1 | ~(cn + 796911875 + (-1 & ~(1 | ~ak)) + -796911875)), bg = (-2 ^ ak) & ak, aE = ~bT, cf = ~bg, bl = 234558881, am = am - (0 - aY) | 0, aG = a6, au = b6, ab = ak, bN = bY, ag = aM, aS = bh, a0 = bZ, bM = az, b1 = bK, bV = b3, a8 = ad, cb = ct, cr = cq, ck = aY, bi = bC, bw = b2, al = b2, aq = ay, a1 = 73, am = 506753693 + ((-234558882 & aE | bT & bl) ^ (-234558882 & cf | bg & bl) | ~(aE | cf) & (-234558882 | bl)) + ((-2 ^ am) & am) - 506753693 | 0, a6 = aG, b6 = au, ak = ab, bY = bN, aM = ag, bh = aS, bZ = a0, az = bM, bK = b1, b3 = bV, ad = a8, ct = cb, cq = cr, aY = ck, ay = bi, bC = bw, b2 = al; continue ba; case 74: bl = a6, b6 = cq, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 72, cq = 0 - (0 - cq - 1) | 0, a6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 73: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | (0 | ct) % 4) < 2 ? 71 : 69, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 72: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 0 == (0 | bj[ba + b6 >> 0]) ? 66 : 68, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 71: cf = a6, bl = b6, aG = cn, au = ak, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 67, bY = 4, a6 = cf, b6 = bl, cn = aG, ak = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 69: cf = a6, bl = b6, aG = cn, au = ak, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 67, bY = 2, a6 = cf, b6 = bl, cn = aG, ak = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 68: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 74, ad = 0 - (0 - ad - 1) | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 67: aG = 0 - (0 - (7 * ((0 | ct) % 4 | 0) | 0) + (0 - bY)) | 0, cf = am << aG, bl = am >>> (-117621897 - aG + 117621929 | 0), aE = ~bl, bg = ~cf, aY = -1172163970, aY = (1172163969 & aE | bl & aY) ^ (1172163969 & bg | cf & aY) | ~(aE | bg) & (1172163969 | aY), bg = -1 & ~(1 | ~(0 - (0 - aY + (0 - (-1 & ~(1 | ~bC)))))), aE = (-2 ^ bC) & bC, cf = ~bg, bl = ~aE, b2 = 861084162, au = a6, ab = b6, bN = cn, ag = ak, aS = aM, a0 = bh, bM = bZ, b1 = az, bV = bK, a8 = b3, cb = ad, cr = cq, ck = ay, bi = bC, bw = aq, al = am, a1 = 97, b2 = 1763856666 + ((-861084163 & cf | bg & b2) ^ (-861084163 & bl | aE & b2) | ~(cf | bl) & (-861084163 | b2)) + ((-2 ^ aY) & aY) - 1763856666 | 0, ct = ct + 1402583234 + 1 - 1402583234 | 0, bY = aG, a6 = au, b6 = ab, cn = bN, ak = ag, aM = aS, bh = a0, bZ = bM, az = b1, bK = bV, b3 = a8, ad = cb, cq = cr, ay = ck, bC = bi, aq = bw, am = al; continue ba; case 66: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 64, bh = ad >> 2, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 64: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | ad) < 6 ? 62 : 60, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 63: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | ct) < 64 ? 59 : 21, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 60: cf = a6, bl = b6, aG = cn, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 58, ak = 0 - (0 - bh - 1) | 0, a6 = cf, b6 = bl, cn = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 59: aE = 0 | ~ay | 0 & ay, aE = b2 & aE | b2 ^ aE, aE &= aE ^ ~(0 | ~bC | 0 & bC), ak = -659082405, ak = -1 & ~(~(-1 & ~(~bC | ~((659082404 & ~b2 | b2 & ak) ^ (0 | -1 & ak)))) | ~ay), ak = aE & ak | aE ^ ak, aE = 794469430 + ((1 ^ aq) & aq) + ak - 794469430 | 0, aE &= 1 ^ aE, cf = -1 & ~(-2 | ~aq), bl = ~aE, aG = ~cf, cn = 797466865, au = a6, ab = b6, bN = bY, ag = aM, aS = bh, a0 = bZ, bM = az, b1 = bK, bV = b3, a8 = ad, cb = ct, cr = cq, ck = ay, bi = bC, bw = b2, al = aq, a1 = 57, am = 0 - (0 - ad + 1) >> 2, aY = ak, ak = 394913534 + ((-797466866 & bl | aE & cn) ^ (-797466866 & aG | cf & cn) | ~(bl | aG) & (-797466866 | cn)) + (-1 & ~(-2 | ~ak)) - 394913534 | 0, cn = ((7 * ct | 0) % 16 | 0) - (0 - cq) | 0, a6 = au, b6 = ab, bY = bN, aM = ag, bh = aS, bZ = a0, az = bM, bK = b1, b3 = bV, ad = a8, ct = cb, cq = cr, ay = ck, bC = bi, b2 = bw, aq = al; continue ba; case 58: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | ak) < 33 ? 56 : 54, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 57: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (ad - 817781417 + 32 + 817781417 >> 2 | 0) ? 33 : 55, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 56: cf = a6, bl = b6, aG = cn, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 54, ak = 33, a6 = cf, b6 = bl, cn = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 55: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (0 | am) ? 53 : 47, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 54: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | ak) > (248548091 + (ad - -32 >> 2) + 8 - 248548091 | 0) ? 50 : 52, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 53: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | bh) > 0 ? 51 : 49, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 52: cf = a6, bl = b6, aG = cn, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 50, ak = 0 - (0 - (ad - 721543188 + 32 + 721543188 >> 2) - 8) | 0, a6 = cf, b6 = bl, cn = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 51: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0 | bd[aB + (cn - 845217744 - am + 845217744 << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 50: bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 46, cq = 0, a6 = 0 | cmd5xt(ak << 2, bd, av), b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 49: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0 | bd[aB + (cn - 1 + 1839362061 - am - 1839362061 << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 161: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, aY = bC, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 157, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 47: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) == (0 | am) ? 45 : 39, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 160: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) < 10 ? 158 : 156, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 46: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cq) < (0 | ak) ? 42 : 40, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 159: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, aY = ay, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 157, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 45: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | bh) > 0 ? 43 : 39, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 158: cf = a6, bl = b6, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 154, cn = cn - 1241365298 + 32 + 1241365298 | 0, a6 = cf, b6 = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 157: bg = -1 & ~(-29 | ~(ct << 2)), aE = -419482006, cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 155, aY = -1 & ~(-16 | ~(aY >> ((419482005 & ~bg | bg & aE) ^ (419482001 | 4 & aE)))), a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 43: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0 | bd[aB >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 156: cf = a6, bl = b6, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 154, cn = cn - -72 | 0, a6 = cf, b6 = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 42: bd[a6 + (cq << 2) >> 2] = 0, cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 46, cq = cq - 1417402377 + 1 + 1417402377 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 155: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | aY) < 10 ? 153 : 151, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 154: cf = ct - (0 - bh) | 0, bl = cn + -735801710 + 16 + 735801710 << (((0 | cf) % 4 | 0) << 3), cf = aB + (cf - (0 - (cq << 2)) >> 2 << 2) | 0, aG = 0 | bd[cf >> 2], bd[cf >> 2] = aG & bl | aG ^ bl, cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 4, ct = ct + 744675608 + 1 - 744675608 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 40: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 36, cq = 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 153: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 149, aY = aY - 1763841430 + 48 + 1763841430 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 39: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (am + -27115808 + 1 + 27115808 | 0) ? 37 : 35, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 152: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 12, cq = cq + 1905239980 + 1 - 1905239980 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 151: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 149, aY = aY + 522724937 + 87 - 522724937 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 37: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 150: ab = 128 << (((0 | bh) % 4 | 0) << 3), cf = aB + ((cq << 2) - 395027463 + bh + 395027463 >> 2 << 2) | 0, bN = 0 | bd[cf >> 2], au = ~bN, aG = ~ab, bl = -503206211, bd[cf >> 2] = (503206210 & au | bN & bl) ^ (503206210 & aG | ab & bl) | ~(au | aG) & (503206210 | bl), cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 146, cq = 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 36: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cq) < (0 | ad) ? 32 : 30, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 149: bj[aM + ct >> 0] = aY, cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 15, ct = ct + -2060210203 + 1 + 2060210203 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 35: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 147: bj[aM + 32 >> 0] = 0, aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 145, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 33: a1 = ad + 1999768042 + 40 + -1999768042 >> 6 << 4, aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) == (14 & a1 | 14 ^ a1 | 0) ? 31 : 29, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 146: aZ = ad - -40 >> 6 << 4, bT = ~aZ, bg = -15, a1 = -1388890712, aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cq) < ((1388890711 & bT | aZ & a1) ^ (1388890711 & bg | 14 & a1) | ~(bT | bg) & (1388890711 | a1) | 0) ? 143 : 19, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 32: aG = bj[ba + cq >> 0] << (((0 | cq) % 4 | 0) << 3), cf = a6 + (cq >> 2 << 2) | 0, bl = 0 | bd[cf >> 2], bd[cf >> 2] = aG & bl | aG ^ bl, cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 36, cq = cq - -1 | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 31: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0 - (0 - (ad << 3) - 256) | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 30: bh = 0 - (0 - ad - 32) | 0, a1 = 128 << (((0 | bh) % 4 | 0) << 3), bh = a6 + (bh >> 2 << 2) | 0, aZ = 0 | bd[bh >> 2], bd[bh >> 2] = aZ & a1 | aZ ^ a1, bh = (0 | ad) % 4 | 0, a1 = aB, aZ = a1 + 36 | 0; do { bd[a1 >> 2] = 0, a1 = a1 + 4 | 0 } while ((0 | a1) < (0 | aZ));cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 28, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 143: ab = a6, bN = b6, ag = cn, aS = ak, a0 = bY, bM = aM, b1 = bh, bZ = ay, az = bC, bK = b2, b3 = aq, bV = ad, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 141, ct = 0, a6 = ab, b6 = bN, cn = ag, ak = aS, bY = a0, aM = bM, bh = b1, ad = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 29: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (0 - (0 - am - 1) | 0) ? 27 : 25, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 28: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | bh) > 0 ? 26 : 16, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 141: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | ct) < 16 ? 139 : 119, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 27: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 26: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 22, cq = ad + (0 - bh) | 0, a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 139: aG = (bC ^ ~b2) & bC, cn = 529461707, cn = (-529461708 & ~ay | ay & cn) ^ (-529461708 & ~b2 | b2 & cn), cn &= cn ^ ~(0 | ~b2 | 0 & b2), ak = -1514409255, ak = (1514409254 & ~cn | cn & ak) ^ (1514409254 & ~aG | aG & ak), aG = 0 - (0 - (-1 & ~(1 | ~aq)) + (0 - ak)) | 0, aG &= 1 ^ aG, cn = -1 & ~(-2 | ~aq), au = a6, ab = b6, bN = bY, ag = aM, aS = bh, a0 = bZ, bM = az, b1 = bK, bV = b3, a8 = ad, cb = ct, cr = cq, ck = ay, bi = bC, bw = b2, al = aq, a1 = 138, am = ad - 1332493879 - 1 + 1332493879 >> 2, aY = ak, ak = 1330564622 + (aG & cn | aG ^ cn) + (-1 & ~(-2 | ~ak)) - 1330564622 | 0, cn = ((0 | ct) % 16 | 0) - (0 - cq) | 0, a6 = au, b6 = ab, bY = bN, aM = ag, bh = aS, bZ = a0, az = bM, bK = b1, b3 = bV, ad = a8, ct = cb, cq = cr, ay = ck, bC = bi, b2 = bw, aq = al; continue ba; case 25: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 23, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 138: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (ad - -32 >> 2 | 0) ? 126 : 137, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 137: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cn) > (0 | am) ? 136 : 133, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 23: am = 0 | bd[ch + (ct << 2) >> 2], bY = 729837134 + (-1 & ~(1 | ~am)) + aY + -729837134 | 0, bY &= 1 ^ bY, cn = (-2 ^ am) & am, cn = (bY & cn | bY ^ cn) - 1663655995 + (-1 & ~(-2 | ~aY)) + 1663655995 | 0, bY = cn + -2098496209 + ((1 ^ ak) & ak) + 2098496209 | 0, bY &= 1 ^ bY, aG = (-2 ^ ak) & ak, am = (bY & aG | bY ^ aG) - (0 - (-1 & ~(-2 | ~(0 - (0 - am + (0 - aY)))))) | 0, aG = (0 | ct) % 4 | 0, aG = (aG << 2) - 23571533 + 601048392 + 23571533 - (0 - ((0 | bm(0 - (0 - aG + 1) | 0, aG)) / 2 | 0)) | 0, bY = aG - 601048386 | 0, au = am << bY, aG = am >>> (0 - aG + 601048418 | 0), cf = ~au, bl = ~aG, bN = 1777071146, bN = (-1777071147 & cf | au & bN) ^ (-1777071147 & bl | aG & bN) | ~(cf | bl) & (-1777071147 | bN), bl = (-2 ^ b2) & b2, cf = (-1 & ~(1 | ~(b2 + -1742022525 + 1578590490 + 1742022525))) - 702715349 + bN + 702715349 | 0, cf &= 1 ^ cf, aG = ~cf, au = ~bl, ab = -1317685326, aZ = (-2 ^ bN) & bN, bT = ~aZ, bg = 1578590489, aE = -225229395, ag = a6, aS = b6, a0 = ak, bM = aM, b1 = bh, bV = bZ, a8 = az, cb = bK, cr = b3, ck = ad, bi = cq, bw = bC, al = b2, aq = ay, a1 = 63, 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, aY = bN, ct = ct + 1021816955 + 1 - 1021816955 | 0, a6 = ag, b6 = aS, ak = a0, aM = bM, bh = b1, bZ = bV, az = a8, bK = cb, b3 = cr, ad = ck, cq = bi, ay = bw, bC = al; continue ba; case 136: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | bh) > 0 ? 135 : 134, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 22: aE = a6, cf = b6, bl = cn, aG = ak, au = bY, ab = aM, bN = bh, ag = bZ, aS = az, a0 = bK, bM = b3, b1 = ad, bV = ct, a8 = cq, cb = aY, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = (0 | cq) < (0 | ad) ? 18 : 16, a6 = aE, b6 = cf, cn = bl, ak = aG, bY = au, aM = ab, bh = bN, bZ = ag, az = aS, bK = a0, b3 = bM, ad = b1, ct = bV, cq = a8, aY = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 135: cf = a6, bl = b6, aG = cn, au = ak, ab = bY, bN = aM, ag = bh, aS = bZ, a0 = az, bM = bK, b1 = b3, bV = ad, a8 = ct, cb = cq, cr = ay, ck = bC, bi = b2, bw = aq, al = am, a1 = 121, aY = 0 | bd[aB + (cn + (0 - am) << 2) >> 2], a6 = cf, b6 = bl, cn = aG, ak = au, bY = ab, aM = bN, bh = ag, bZ = aS, az = a0, bK = bM, b3 = b1, ad = bV, ct = a8, cq = cb, ay = cr, bC = ck, b2 = bi, aq = bw, am = al; continue ba; case 21: ar = (-2 ^ b3) & b3, bE = aq - -33242356 + 252947873 + ((1 ^ b3) & b3) - 252947873 | 0, bE &= 1 ^ bE, ax = ~bE, co = ~ar, aZ = 380726746, cg = -1 & ~(-2 | ~aq), aa = ~cg, aF = 33242355, b7 = 306070461, cf = ((1 ^ az) & az) - 1609523247 + bC + 1609523247 | 0, cf &= 1 ^ cf, bl = -1 & ~(-2 | ~az), aG = -1 & ~(1 | ~(((1 ^ bZ) & bZ) - 1778799498 + ay + 1778799498)), au = (-2 ^ bZ) & bZ, bg = b2 - -924935704 - 2103109303 + ((1 ^ bK) & bK) + 2103109303 | 0, bg &= 1 ^ bg, aE = (-2 ^ bK) & bK, bT = (-2 ^ b2) & b2, ab = a6, bN = b6, ag = cn, aS = ak, a0 = bY, bM = aM, b1 = bh, bV = bZ, a8 = az, cb = bK, cr = b3, ck = ad, bi = ct, bw = aY, al = am, a1 = 146, 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, b2 = (-924935704 & bT | -924935704 ^ bT) - 937268693 + (bg & aE | bg ^ aE) + 937268693 | 0, bC = 0 - (0 - (cf & bl | cf ^ bl) + (0 - (-1 & ~(-2 | ~bC)))) | 0, ay = (aG & au | aG ^ au) - (0 - ((-2 ^ ay) & ay)) | 0, cq = 0 - (0 - cq - 16) | 0, a6 = ab, b6 = bN, cn = ag, ak = aS, bY = a0, aM = bM, bh = b1, bZ = bV, az = a8, bK = cb, b3 = cr, ad = ck, ct = bi, aY = bw, am = al; continue ba; case 134: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 0 | bd[aB + (cn - 2095981013 - 1 + 2095981013 - 1028988577 - am + 1028988577 << 2) >> 2], a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 133: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cn) == (0 | am) ? 132 : 129, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 19: bM = a6, b1 = b6, bV = cn, a8 = ak, cb = bY, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 15, ct = 0, aM = 0 | cmd5xt(33, bd, av), a6 = bM, b6 = b1, cn = bV, ak = a8, bY = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 132: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | bh) > 0 ? 131 : 129, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 18: bM = bj[ba + cq >> 0] << (((0 | cq) % 4 | 0) << 3), a0 = 0 | bd[aB >> 2], bd[aB >> 2] = bM & a0 | bM ^ a0, a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 22, cq = cq + -1916722598 + 1 + 1916722598 | 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 131: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 0 | bd[aB >> 2], a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 16: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 12, cq = 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 129: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cn) > (am + 1849332518 + 1 - 1849332518 | 0) ? 128 : 127, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 15: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | ct) < 32 ? 11 : 147, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 128: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 127: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 126: a1 = ad - -40 >> 6 << 4, aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cn) == (14 & a1 | 14 ^ a1 | 0) ? 125 : 124, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 12: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cq) < 8 ? 8 : 150, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 125: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 961017688 + (ad << 3) + 256 - 961017688 | 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 11: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 9, cq = (0 | ct) / 8 | 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 124: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cn) > (am + -1509393712 + 1 + 1509393712 | 0) ? 123 : 122, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 123: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 9: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 0 == (0 | cq) ? 7 : 5, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 122: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 121, aY = 0 | bd[a6 + (cn << 2) >> 2], a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 8: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 4, ct = 0, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 121: cn = 0 | bd[ch + (ct << 2) >> 2], am = -1 & ~(-2 | ~cn), cn = -1 & ~(1 | ~(0 - (0 - (0 - (0 - aY + 96809952)) + (0 - (-1 & ~(1 | ~cn)))))), bY = (-2 ^ aY) & aY, bV = ~bY, cr = 524507311, a8 = 205119056, am = 0 - (0 - ((-205119057 & bV | bY & a8) ^ (-205119057 & cr | -524507312 & a8) | ~(bV | cr) & (-205119057 | a8)) + (0 - (cn & am | cn ^ am))) | 0, cn = 0 - (0 - am - 621317264) | 0, a8 = (-2 ^ ak) & ak, cr = -1 & ~(1 | ~(cn - (0 - ((1 ^ ak) & ak)))), bV = ~cr, bY = ~a8, cb = 1186168602, am = -1 & ~(-2 | ~(1196940885 - am - 1818258150)), am = ((-1186168603 & bV | cr & cb) ^ (-1186168603 & bY | a8 & cb) | ~(bV | bY) & (-1186168603 | cb)) - 1517567764 + (1 & ~am | -2 & am) + 1517567764 | 0, cb = 5 * ((0 | ct) % 4 | 0) | 0, bY = cb - -7 | 0, bV = am << bY, cb = am >>> (0 - cb + 25 | 0), cb = bV & cb | bV ^ cb, bV = -1 & ~(1 | ~(cb + 1491303093 + ((1 ^ b2) & b2) + -1491303093)), a8 = (-2 ^ b2) & b2, cr = a6, ck = b6, bi = ak, bw = aM, al = bh, co = bZ, ax = az, ar = bK, bE = b3, b7 = ad, aF = cq, aa = bC, cg = b2, aq = ay, a1 = 141, b2 = (bV & a8 | bV ^ a8) - (0 - ((-2 ^ cb) & cb)) | 0, aY = cb, ct = ct - -1 | 0, a6 = cr, b6 = ck, ak = bi, aM = bw, bh = al, bZ = co, az = ax, bK = ar, b3 = bE, ad = b7, cq = aF, ay = aa, bC = cg; continue ba; case 7: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, aY = aq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 157, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 119: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | ct) < 32 ? 117 : 97, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 5: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 1 == (0 | cq) ? 3 : 1, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 4: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | ct) < 4 ? 0 : 152, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 117: ak = 0 | ~ay | 0 & ay, aS = 223327204 & ~b2 | -223327205 & b2, b1 = ~aS, cn = ~ak, bM = 381686884, bM = (-381686885 & b1 | aS & bM) ^ (-381686885 & cn | ak & bM) | ~(b1 | cn) & (-381686885 | bM), cn = -2088055562, cn = (2088055561 & ~bC | bC & cn) ^ (1882193929 | 223327204 & cn), b1 = ~ay, aS = ~cn, a0 = 1424487793, a0 = (-1424487794 & b1 | ay & a0) ^ (-1424487794 & aS | cn & a0) | ~(b1 | aS) & (-1424487794 | a0), bM &= -223327205 ^ bM, aS = -1 & ~(223327204 | ~b2), aS &= aS ^ ~ay, a0 &= -223327205 ^ a0, ak &= 223327204 ^ ak, ak &= ak ^ ~(bC & ~ay | ay & ~bC), aS = bM & aS | bM ^ aS, a0 = ak & a0 | ak ^ a0, ak = -539859516, ak = (539859515 & ~a0 | a0 & ak) ^ (539859515 & ~aS | aS & ak), aS = -1 & ~(1 | ~((-1 & ~(1 | ~aq)) - (0 - ak))), a0 = (-2 ^ aq) & aq, bM = ~aS, b1 = ~a0, cn = 89952540, bV = a6, a8 = b6, cb = bY, cr = aM, ck = bh, bi = bZ, bw = az, al = bK, co = b3, ax = ad, ar = ct, bE = cq, b7 = ay, aF = bC, aa = b2, cg = aq, a1 = 116, am = 0 - (0 - ad + 1) >> 2, aY = ak, ak = 1116549971 + ((-89952541 & bM | aS & cn) ^ (-89952541 & b1 | a0 & cn) | ~(bM | b1) & (-89952541 | cn)) + (-1 & ~(-2 | ~ak)) - 1116549971 | 0, cn = 0 - (0 - ((106029065 + (5 * ct | 0) + 1 - 106029065 | 0) % 16 | 0) + (0 - cq)) | 0, a6 = bV, b6 = a8, bY = cb, aM = cr, bh = ck, bZ = bi, az = bw, bK = al, b3 = co, ad = ax, ct = ar, cq = bE, ay = b7, bC = aF, b2 = aa, aq = cg; continue ba; case 3: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, aY = b2, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 157, a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 116: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cn) > (ad + 77471208 + 32 - 77471208 >> 2 | 0) ? 104 : 115, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 115: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | cn) > (0 | am) ? 114 : 111, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 1: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 2 == (0 | cq) ? 161 : 159, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 114: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = (0 | bh) > 0 ? 113 : 112, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 0: a0 = a6, bM = b6, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 160, 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, a6 = a0, b6 = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; case 113: a0 = a6, bM = b6, b1 = cn, bV = ak, a8 = bY, cb = aM, cr = bh, ck = bZ, bi = az, bw = bK, al = b3, co = ad, ax = ct, ar = cq, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a1 = 99, aY = 0 | bd[aB + (cn + 1501901147 - am - 1501901147 << 2) >> 2], a6 = a0, b6 = bM, cn = b1, ak = bV, bY = a8, aM = cb, bh = cr, bZ = ck, az = bi, bK = bw, b3 = al, ad = co, ct = ax, cq = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba; default: aS = a6, a0 = b6, bM = cn, b1 = ak, bV = bY, a8 = aM, cb = bh, cr = bZ, ck = az, bi = bK, bw = b3, al = ad, co = ct, ax = cq, ar = aY, bE = ay, b7 = bC, aF = b2, aa = aq, cg = am, a6 = aS, b6 = a0, cn = bM, ak = b1, bY = bV, aM = a8, bh = cb, bZ = cr, az = ck, bK = bi, b3 = bw, ad = al, ct = co, cq = ax, aY = ar, ay = bE, bC = b7, b2 = aF, aq = aa, am = cg; continue ba } } if (136 == (0 | an)) { a3 = b9; for (var aC = 0, cl = 0; ; ) { var ao = ah[aM + cl >> 0]; if (aC |= ao, 0 == ao) { break } cl++ } var at = ""; if (aC < 128) { for (var b4; cl > 0; ) { b4 = String.fromCharCode.apply(String, ah.subarray(aM, aM + Math.min(cl, 1024))), at = at ? at + b4 : b4, aM += 1024, cl -= 1024 } return at } } return a3 = b9, 0 } function cmd5xt(au, aw, ap) { au |= 0; var ak = 0 , ay = 0 , ae = 0 , aj = 0 , af = 0 , ag = 0 , at = 0 , ad = 0 , ax = 0 , an = 0 , am = 0 , av = 0 , ab = 0 , aq = 0 , al = 0 , ac = 0 , aa = 0 , Y = 0 , ai = 0 , W = 0 , ah = 0 , K = 0 , ar = 0 , T = 0 , ao = 0 , Q = 0 , L = 0 , J = 0 , G = 0 , az = 0 , V = 0 , N = 0 , P = 0 , H = 0 , X = 0 , O = 0; do { if (au >>> 0 < 245) { if (ab = au >>> 0 < 11 ? 16 : au + 11 & -8, au = ab >>> 3, ad = 0 | aw[48], 3 & (ak = ad >>> au) | 0) { ak = (1 & ak ^ 1) + au | 0, ay = 232 + (ak << 1 << 2) | 0, ae = ay + 8 | 0, aj = 0 | aw[ae >> 2], af = aj + 8 | 0, ag = 0 | aw[af >> 2]; do { if ((0 | ay) != (0 | ag)) { if (au = ag + 12 | 0, (0 | aw[au >> 2]) == (0 | aj)) { aw[au >> 2] = ay, aw[ae >> 2] = ag; break } } else { aw[48] = ad & ~(1 << ak) } } while (0);return O = ak << 3, aw[aj + 4 >> 2] = 3 | O, O = aj + O + 4 | 0, aw[O >> 2] = 1 | aw[O >> 2], 0 | (O = af) } if (ag = 0 | aw[50], ab >>> 0 > ag >>> 0) { if (0 | ak) { ay = 2 << au, ay = ak << au & (ay | 0 - ay), ay = (ay & 0 - ay) - 1 | 0, at = ay >>> 12 & 16, ay >>>= at, aj = ay >>> 5 & 8, ay >>>= aj, af = ay >>> 2 & 4, ay >>>= af, ae = ay >>> 1 & 2, ay >>>= ae, ak = ay >>> 1 & 1, ak = (aj | at | af | ae | ak) + (ay >>> ak) | 0, ay = 232 + (ak << 1 << 2) | 0, ae = ay + 8 | 0, af = 0 | aw[ae >> 2], at = af + 8 | 0, aj = 0 | aw[at >> 2]; do { if ((0 | ay) != (0 | aj)) { if (au = aj + 12 | 0, (0 | aw[au >> 2]) == (0 | af)) { aw[au >> 2] = ay, aw[ae >> 2] = aj, ax = 0 | aw[50]; break } } else { aw[48] = ad & ~(1 << ak), ax = ag } } while (0);return ag = (ak << 3) - ab | 0, aw[af + 4 >> 2] = 3 | ab, ae = af + ab | 0, aw[ae + 4 >> 2] = 1 | ag, aw[ae + ag >> 2] = ag, 0 | ax && (aj = 0 | aw[53], ak = ax >>> 3, ay = 232 + (ak << 1 << 2) | 0, au = 0 | aw[48], ak = 1 << ak, au & ak ? (au = ay + 8 | 0, (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (an = au, am = ak)) : (aw[48] = au | ak, an = ay + 8 | 0, am = ay), aw[an >> 2] = aj, aw[am + 12 >> 2] = aj, aw[aj + 8 >> 2] = am, aw[aj + 12 >> 2] = ay), aw[50] = ag, aw[53] = ae, 0 | (O = at) } if (au = 0 | aw[49]) { for (ay = (au & 0 - au) - 1 | 0, X = ay >>> 12 & 16, ay >>>= X, H = ay >>> 5 & 8, ay >>>= H, O = ay >>> 2 & 4, ay >>>= O, ak = ay >>> 1 & 2, ay >>>= ak, ae = ay >>> 1 & 1, ae = 0 | aw[496 + ((H | X | O | ak | ae) + (ay >>> ae) << 2) >> 2], ay = (-8 & aw[ae + 4 >> 2]) - ab | 0, ak = ae; ; ) { if (!(au = 0 | aw[ak + 16 >> 2]) && !(au = 0 | aw[ak + 20 >> 2])) { ad = ae; break } ak = (-8 & aw[au + 4 >> 2]) - ab | 0, O = ak >>> 0 < ay >>> 0, ay = O ? ak : ay, ak = au, ae = O ? au : ae } af = 0 | aw[52], at = ad + ab | 0, ag = 0 | aw[ad + 24 >> 2], ae = 0 | aw[ad + 12 >> 2]; do { if ((0 | ae) == (0 | ad)) { if (ak = ad + 20 | 0, !((au = 0 | aw[ak >> 2]) || (ak = ad + 16 | 0, au = 0 | aw[ak >> 2]))) { av = 0; break } for (; ; ) { if (ae = au + 20 | 0, 0 | (aj = 0 | aw[ae >> 2])) { au = aj, ak = ae } else { if (ae = au + 16 | 0, !(aj = 0 | aw[ae >> 2])) { break } au = aj, ak = ae } } if (!(ak >>> 0 < af >>> 0)) { aw[ak >> 2] = 0, av = au; break } } else { if (aj = 0 | aw[ad + 8 >> 2], au = aj + 12 | 0, ak = ae + 8 | 0, (0 | aw[ak >> 2]) == (0 | ad)) { aw[au >> 2] = ae, aw[ak >> 2] = aj, av = ae; break } } } while (0);do { if (0 | ag) { if (au = 0 | aw[ad + 28 >> 2], ak = 496 + (au << 2) | 0, (0 | ad) == (0 | aw[ak >> 2])) { if (aw[ak >> 2] = av, !av) { aw[49] = aw[49] & ~(1 << au); break } } else { if (au = ag + 16 | 0, (0 | aw[au >> 2]) == (0 | ad) ? aw[au >> 2] = av : aw[ag + 20 >> 2] = av, !av) { break } } ak = 0 | aw[52], aw[av + 24 >> 2] = ag, au = 0 | aw[ad + 16 >> 2]; do { if (0 | au && !(au >>> 0 < ak >>> 0)) { aw[av + 16 >> 2] = au, aw[au + 24 >> 2] = av; break } } while (0);if (0 | (au = 0 | aw[ad + 20 >> 2]) && !(au >>> 0 < (0 | aw[52]) >>> 0)) { aw[av + 20 >> 2] = au, aw[au + 24 >> 2] = av; break } } } while (0);return ay >>> 0 < 16 ? (O = ay + ab | 0, aw[ad + 4 >> 2] = 3 | O, O = ad + O + 4 | 0, aw[O >> 2] = 1 | aw[O >> 2]) : (aw[ad + 4 >> 2] = 3 | ab, aw[at + 4 >> 2] = 1 | ay, aw[at + ay >> 2] = ay, au = 0 | aw[50], 0 | au && (aj = 0 | aw[53], ak = au >>> 3, ae = 232 + (ak << 1 << 2) | 0, au = 0 | aw[48], ak = 1 << ak, au & ak ? (au = ae + 8 | 0, (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (aq = au, al = ak)) : (aw[48] = au | ak, aq = ae + 8 | 0, al = ae), aw[aq >> 2] = aj, aw[al + 12 >> 2] = aj, aw[aj + 8 >> 2] = al, aw[aj + 12 >> 2] = ae), aw[50] = ay, aw[53] = at), 0 | (O = ad + 8 | 0) } } } else { if (au >>> 0 <= 4294967231) { if (au = au + 11 | 0, ab = -8 & au, ad = 0 | aw[49]) { ay = 0 - ab | 0, au >>>= 8, au ? ab >>> 0 > 16777215 ? at = 31 : (al = (au + 1048320 | 0) >>> 16 & 8, G = au << al, aq = (G + 520192 | 0) >>> 16 & 4, G <<= aq, at = (G + 245760 | 0) >>> 16 & 2, at = 14 - (aq | al | at) + (G << at >>> 15) | 0, at = ab >>> (at + 7 | 0) & 1 | at << 1) : at = 0, ak = 0 | aw[496 + (at << 2) >> 2]; au: do { if (ak) { for (aj = ay, au = 0, af = ab << (31 == (0 | at) ? 0 : 25 - (at >>> 1) | 0), ag = ak, ak = 0; ; ) { if (ae = -8 & aw[ag + 4 >> 2], (ay = ae - ab | 0) >>> 0 < aj >>> 0) { if ((0 | ae) == (0 | ab)) { au = ag, ak = ag, G = 90; break au } ak = ag } else { ay = aj } if (ae = 0 | aw[ag + 20 >> 2], ag = 0 | aw[ag + 16 + (af >>> 31 << 2) >> 2], au = 0 == (0 | ae) | (0 | ae) == (0 | ag) ? au : ae, ae = 0 == (0 | ag)) { G = 86; break } aj = ay, af <<= 1 & ae ^ 1 } } else { au = 0, ak = 0, G = 86 } } while (0);if (86 == (0 | G)) { if (0 == (0 | au) & 0 == (0 | ak)) { if (au = 2 << at, !(au = ad & (au | 0 - au))) { break } al = (au & 0 - au) - 1 | 0, am = al >>> 12 & 16, al >>>= am, an = al >>> 5 & 8, al >>>= an, av = al >>> 2 & 4, al >>>= av, aq = al >>> 1 & 2, al >>>= aq, au = al >>> 1 & 1, au = 0 | aw[496 + ((an | am | av | aq | au) + (al >>> au) << 2) >> 2] } au ? G = 90 : (at = ay, ad = ak) } if (90 == (0 | G)) { for (; ; ) { if (G = 0, al = (-8 & aw[au + 4 >> 2]) - ab | 0, ae = al >>> 0 < ay >>> 0, ay = ae ? al : ay, ak = ae ? au : ak, 0 | (ae = 0 | aw[au + 16 >> 2])) { au = ae, G = 90 } else { if (!(au = 0 | aw[au + 20 >> 2])) { at = ay, ad = ak; break } G = 90 } } } if (0 != (0 | ad) ? at >>> 0 < ((0 | aw[50]) - ab | 0) >>> 0 : 0) { aj = 0 | aw[52], ag = ad + ab | 0, af = 0 | aw[ad + 24 >> 2], ay = 0 | aw[ad + 12 >> 2]; do { if ((0 | ay) == (0 | ad)) { if (ak = ad + 20 | 0, !((au = 0 | aw[ak >> 2]) || (ak = ad + 16 | 0, au = 0 | aw[ak >> 2]))) { aa = 0; break } for (; ; ) { if (ay = au + 20 | 0, 0 | (ae = 0 | aw[ay >> 2])) { au = ae, ak = ay } else { if (ay = au + 16 | 0, !(ae = 0 | aw[ay >> 2])) { break } au = ae, ak = ay } } if (!(ak >>> 0 < aj >>> 0)) { aw[ak >> 2] = 0, aa = au; break } } else { if (ae = 0 | aw[ad + 8 >> 2], au = ae + 12 | 0, ak = ay + 8 | 0, (0 | aw[ak >> 2]) == (0 | ad)) { aw[au >> 2] = ay, aw[ak >> 2] = ae, aa = ay; break } } } while (0);do { if (0 | af) { if (au = 0 | aw[ad + 28 >> 2], ak = 496 + (au << 2) | 0, (0 | ad) == (0 | aw[ak >> 2])) { if (aw[ak >> 2] = aa, !aa) { aw[49] = aw[49] & ~(1 << au); break } } else { if (au = af + 16 | 0, (0 | aw[au >> 2]) == (0 | ad) ? aw[au >> 2] = aa : aw[af + 20 >> 2] = aa, !aa) { break } } ak = 0 | aw[52], aw[aa + 24 >> 2] = af, au = 0 | aw[ad + 16 >> 2]; do { if (0 | au && !(au >>> 0 < ak >>> 0)) { aw[aa + 16 >> 2] = au, aw[au + 24 >> 2] = aa; break } } while (0);if (0 | (au = 0 | aw[ad + 20 >> 2]) && !(au >>> 0 < (0 | aw[52]) >>> 0)) { aw[aa + 20 >> 2] = au, aw[au + 24 >> 2] = aa; break } } } while (0);do { if (at >>> 0 >= 16) { if (aw[ad + 4 >> 2] = 3 | ab, aw[ag + 4 >> 2] = 1 | at, aw[ag + at >> 2] = at, au = at >>> 3, at >>> 0 < 256) { ay = 232 + (au << 1 << 2) | 0, ak = 0 | aw[48], au = 1 << au, ak & au ? (au = ay + 8 | 0, (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (ai = au, W = ak)) : (aw[48] = ak | au, ai = ay + 8 | 0, W = ay), aw[ai >> 2] = ag, aw[W + 12 >> 2] = ag, aw[ag + 8 >> 2] = W, aw[ag + 12 >> 2] = ay; break } if (au = at >>> 8, au ? at >>> 0 > 16777215 ? ay = 31 : (X = (au + 1048320 | 0) >>> 16 & 8, O = au << X, H = (O + 520192 | 0) >>> 16 & 4, O <<= H, ay = (O + 245760 | 0) >>> 16 & 2, ay = 14 - (H | X | ay) + (O << ay >>> 15) | 0, ay = at >>> (ay + 7 | 0) & 1 | ay << 1) : ay = 0, ae = 496 + (ay << 2) | 0, aw[ag + 28 >> 2] = ay, au = ag + 16 | 0, aw[au + 4 >> 2] = 0, aw[au >> 2] = 0, au = 0 | aw[49], ak = 1 << ay, !(au & ak)) { aw[49] = au | ak, aw[ae >> 2] = ag, aw[ag + 24 >> 2] = ae, aw[ag + 12 >> 2] = ag, aw[ag + 8 >> 2] = ag; break } for (aj = at << (31 == (0 | ay) ? 0 : 25 - (ay >>> 1) | 0), au = 0 | aw[ae >> 2]; ; ) { if ((-8 & aw[au + 4 >> 2] | 0) == (0 | at)) { ay = au, G = 148; break } if (ak = au + 16 + (aj >>> 31 << 2) | 0, !(ay = 0 | aw[ak >> 2])) { G = 145; break } aj <<= 1, au = ay } if (145 == (0 | G)) { if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) { aw[ak >> 2] = ag, aw[ag + 24 >> 2] = au, aw[ag + 12 >> 2] = ag, aw[ag + 8 >> 2] = ag; break } if (148 == (0 | G) && (au = ay + 8 | 0, ak = 0 | aw[au >> 2], O = 0 | aw[52], ak >>> 0 >= O >>> 0 & ay >>> 0 >= O >>> 0)) { aw[ak + 12 >> 2] = ag, aw[au >> 2] = ag, aw[ag + 8 >> 2] = ak, aw[ag + 12 >> 2] = ay, aw[ag + 24 >> 2] = 0; break } } } else { O = at + ab | 0, aw[ad + 4 >> 2] = 3 | O, O = ad + O + 4 | 0, aw[O >> 2] = 1 | aw[O >> 2] } } while (0);return 0 | (O = ad + 8 | 0) } } } else { ab = -1 } } } while (0);if ((ay = 0 | aw[50]) >>> 0 >= ab >>> 0) { return au = ay - ab | 0, ak = 0 | aw[53], au >>> 0 > 15 ? (O = ak + ab | 0, aw[53] = O, aw[50] = au, aw[O + 4 >> 2] = 1 | au, aw[O + au >> 2] = au, aw[ak + 4 >> 2] = 3 | ab) : (aw[50] = 0, aw[53] = 0, aw[ak + 4 >> 2] = 3 | ay, O = ak + ay + 4 | 0, aw[O >> 2] = 1 | aw[O >> 2]), 0 | (O = ak + 8 | 0) } if ((au = 0 | aw[51]) >>> 0 > ab >>> 0) { return H = au - ab | 0, aw[51] = H, O = 0 | aw[54], X = O + ab | 0, aw[54] = X, aw[X + 4 >> 2] = 1 | H, aw[O + 4 >> 2] = 3 | ab, 0 | (O = O + 8 | 0) } do { if (!(0 | aw[166] || (au = 4096) + -1 & au)) { aw[168] = au, aw[167] = au, aw[169] = -1, aw[170] = -1, aw[171] = 0, aw[159] = 0, aw[166] = Date.now() / 1000 & -16 ^ 1431655768; break } } while (0);if (ag = ab + 48 | 0, af = 0 | aw[168], at = ab + 47 | 0, aj = af + at | 0, af = 0 - af | 0, (ad = aj & af) >>> 0 <= ab >>> 0) { return 0 | (O = 0) } if (au = 0 | aw[158], 0 | au ? (ai = 0 | aw[156], (W = ai + ad | 0) >>> 0 <= ai >>> 0 | W >>> 0 > au >>> 0) : 0) { return 0 | (O = 0) } au: do { if (4 & aw[159]) { G = 190 } else { au = 0 | aw[54]; aw: do { if (au) { for (ay = 640; ; ) { if (ak = 0 | aw[ay >> 2], ak >>> 0 <= au >>> 0 ? (ac = ay + 4 | 0, (ak + (0 | aw[ac >> 2]) | 0) >>> 0 > au >>> 0) : 0) { ae = ay, ay = ac; break } if (!(ay = 0 | aw[ay + 8 >> 2])) { G = 173; break aw } } if ((au = aj - (0 | aw[51]) & af) >>> 0 < 2147483647) { if ((0 | (ak = ap)) == ((0 | aw[ae >> 2]) + (0 | aw[ay >> 2]) | 0)) { if (-1 != (0 | ak)) { ag = ak, aj = au, G = 193; break au } } else { G = 183 } } } else { G = 173 } } while (0);do { if ((173 == (0 | G) ? -1 != (0 | (Y = ap)) : 0) && (au = Y, ak = 0 | aw[167], ay = ak + -1 | 0, au = ay & au ? ad - au + (ay + au & 0 - ak) | 0 : ad, ak = 0 | aw[156], ay = ak + au | 0, au >>> 0 > ab >>> 0 & au >>> 0 < 2147483647)) { if (W = 0 | aw[158], 0 | W ? ay >>> 0 <= ak >>> 0 | ay >>> 0 > W >>> 0 : 0) { break } if ((0 | (ak = ap)) == (0 | Y)) { ag = Y, aj = au, G = 193; break au } G = 183 } } while (0);aw: do { if (183 == (0 | G)) { ay = 0 - au | 0; do { if (ag >>> 0 > au >>> 0 & au >>> 0 < 2147483647 & -1 != (0 | ak) ? (ah = 0 | aw[168], (ah = at - au + ah & 0 - ah) >>> 0 < 2147483647) : 0) { if (-1 == ap) { break aw } au = ah + au | 0; break } } while (0);if (-1 != (0 | ak)) { ag = ak, aj = au, G = 193; break au } } } while (0);aw[159] = 4 | aw[159], G = 190 } } while (0);if ((((190 == (0 | G) ? ad >>> 0 < 2147483647 : 0) ? (K = ap, ar = ap, K >>> 0 < ar >>> 0 & -1 != (0 | K) & -1 != (0 | ar)) : 0) ? (T = ar - K | 0) >>> 0 > (ab + 40 | 0) >>> 0 : 0) && (ag = K, aj = T, G = 193), 193 == (0 | G)) { au = (0 | aw[156]) + aj | 0, aw[156] = au, au >>> 0 > (0 | aw[157]) >>> 0 && (aw[157] = au), at = 0 | aw[54]; do { if (at) { ae = 640; do { if (au = 0 | aw[ae >> 2], ak = ae + 4 | 0, ay = 0 | aw[ak >> 2], (0 | ag) == (au + ay | 0)) { ao = au, Q = ak, L = ay, J = ae, G = 203; break } ae = 0 | aw[ae + 8 >> 2] } 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) { aw[Q >> 2] = L + aj, O = at + 8 | 0, O = 0 == (7 & O | 0) ? 0 : 0 - O & 7, X = at + O | 0, O = aj - O + (0 | aw[51]) | 0, aw[54] = X, aw[51] = O, aw[X + 4 >> 2] = 1 | O, aw[X + O + 4 >> 2] = 40, aw[55] = aw[170]; break } for (au = 0 | aw[52], ag >>> 0 < au >>> 0 ? (aw[52] = ag, ad = ag) : ad = au, ay = ag + aj | 0, au = 640; ; ) { if ((0 | aw[au >> 2]) == (0 | ay)) { ak = au, G = 211; break } if (!(au = 0 | aw[au + 8 >> 2])) { ak = 640; break } } if (211 == (0 | G)) { if (!(8 & aw[au + 12 >> 2])) { aw[ak >> 2] = ag, an = au + 4 | 0, aw[an >> 2] = (0 | aw[an >> 2]) + aj, an = ag + 8 | 0, an = ag + (0 == (7 & an | 0) ? 0 : 0 - an & 7) | 0, au = ay + 8 | 0, au = ay + (0 == (7 & au | 0) ? 0 : 0 - au & 7) | 0, ax = an + ab | 0, af = au - an - ab | 0, aw[an + 4 >> 2] = 3 | ab; do { if ((0 | au) != (0 | at)) { if ((0 | au) == (0 | aw[53])) { O = (0 | aw[50]) + af | 0, aw[50] = O, aw[53] = ax, aw[ax + 4 >> 2] = 1 | O, aw[ax + O >> 2] = O; break } if (1 == (3 & (ak = 0 | aw[au + 4 >> 2]) | 0)) { at = -8 & ak, aj = ak >>> 3; au: do { if (ak >>> 0 >= 256) { ag = 0 | aw[au + 24 >> 2], ae = 0 | aw[au + 12 >> 2]; do { if ((0 | ae) == (0 | au)) { if (ay = au + 16 | 0, ae = ay + 4 | 0, ak = 0 | aw[ae >> 2]) { ay = ae } else { if (!(ak = 0 | aw[ay >> 2])) { H = 0; break } } for (; ; ) { if (ae = ak + 20 | 0, 0 | (aj = 0 | aw[ae >> 2])) { ak = aj, ay = ae } else { if (ae = ak + 16 | 0, !(aj = 0 | aw[ae >> 2])) { break } ak = aj, ay = ae } } if (!(ay >>> 0 < ad >>> 0)) { aw[ay >> 2] = 0, H = ak; break } } else { if (aj = 0 | aw[au + 8 >> 2], ak = aj + 12 | 0, ay = ae + 8 | 0, (0 | aw[ay >> 2]) == (0 | au)) { aw[ak >> 2] = ae, aw[ay >> 2] = aj, H = ae; break } } } while (0);if (!ag) { break } ak = 0 | aw[au + 28 >> 2], ay = 496 + (ak << 2) | 0; do { if ((0 | au) == (0 | aw[ay >> 2])) { if (aw[ay >> 2] = H, 0 | H) { break } aw[49] = aw[49] & ~(1 << ak); break au } if (ak = ag + 16 | 0, (0 | aw[ak >> 2]) == (0 | au) ? aw[ak >> 2] = H : aw[ag + 20 >> 2] = H, !H) { break au } } while (0);ae = 0 | aw[52], aw[H + 24 >> 2] = ag, ak = au + 16 | 0, ay = 0 | aw[ak >> 2]; do { if (0 | ay && !(ay >>> 0 < ae >>> 0)) { aw[H + 16 >> 2] = ay, aw[ay + 24 >> 2] = H; break } } while (0);if (!(ak = 0 | aw[ak + 4 >> 2])) { break } if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) { aw[H + 20 >> 2] = ak, aw[ak + 24 >> 2] = H; break } } else { ay = 0 | aw[au + 8 >> 2], ae = 0 | aw[au + 12 >> 2], ak = 232 + (aj << 1 << 2) | 0; do { if ((0 | ay) != (0 | ak) && (0 | aw[ay + 12 >> 2]) == (0 | au)) { break } } while (0);if ((0 | ae) == (0 | ay)) { aw[48] = aw[48] & ~(1 << aj); break } do { if ((0 | ae) == (0 | ak)) { V = ae + 8 | 0 } else { if (ak = ae + 8 | 0, (0 | aw[ak >> 2]) == (0 | au)) { V = ak; break } } } while (0);aw[ay + 12 >> 2] = ae, aw[V >> 2] = ay } } while (0);au = au + at | 0, af = at + af | 0 } if (au = au + 4 | 0, aw[au >> 2] = -2 & aw[au >> 2], aw[ax + 4 >> 2] = 1 | af, aw[ax + af >> 2] = af, au = af >>> 3, af >>> 0 < 256) { ay = 232 + (au << 1 << 2) | 0, ak = 0 | aw[48], au = 1 << au; do { if (ak & au) { if (au = ay + 8 | 0, (ak = 0 | aw[au >> 2]) >>> 0 >= (0 | aw[52]) >>> 0) { X = au, O = ak; break } } else { aw[48] = ak | au, X = ay + 8 | 0, O = ay } } while (0);aw[X >> 2] = ax, aw[O + 12 >> 2] = ax, aw[ax + 8 >> 2] = O, aw[ax + 12 >> 2] = ay; break } au = af >>> 8; do { if (au) { if (af >>> 0 > 16777215) { ay = 31; break } X = (au + 1048320 | 0) >>> 16 & 8, O = au << X, H = (O + 520192 | 0) >>> 16 & 4, O <<= H, ay = (O + 245760 | 0) >>> 16 & 2, ay = 14 - (H | X | ay) + (O << ay >>> 15) | 0, ay = af >>> (ay + 7 | 0) & 1 | ay << 1 } else { ay = 0 } } while (0);if (ae = 496 + (ay << 2) | 0, aw[ax + 28 >> 2] = ay, au = ax + 16 | 0, aw[au + 4 >> 2] = 0, aw[au >> 2] = 0, au = 0 | aw[49], ak = 1 << ay, !(au & ak)) { aw[49] = au | ak, aw[ae >> 2] = ax, aw[ax + 24 >> 2] = ae, aw[ax + 12 >> 2] = ax, aw[ax + 8 >> 2] = ax; break } for (aj = af << (31 == (0 | ay) ? 0 : 25 - (ay >>> 1) | 0), au = 0 | aw[ae >> 2]; ; ) { if ((-8 & aw[au + 4 >> 2] | 0) == (0 | af)) { ay = au, G = 281; break } if (ak = au + 16 + (aj >>> 31 << 2) | 0, !(ay = 0 | aw[ak >> 2])) { G = 278; break } aj <<= 1, au = ay } if (278 == (0 | G)) { if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) { aw[ak >> 2] = ax, aw[ax + 24 >> 2] = au, aw[ax + 12 >> 2] = ax, aw[ax + 8 >> 2] = ax; break } if (281 == (0 | G) && (au = ay + 8 | 0, ak = 0 | aw[au >> 2], O = 0 | aw[52], ak >>> 0 >= O >>> 0 & ay >>> 0 >= O >>> 0)) { aw[ak + 12 >> 2] = ax, aw[au >> 2] = ax, aw[ax + 8 >> 2] = ak, aw[ax + 12 >> 2] = ay, aw[ax + 24 >> 2] = 0; break } } } else { O = (0 | aw[51]) + af | 0, aw[51] = O, aw[54] = ax, aw[ax + 4 >> 2] = 1 | O } } while (0);return 0 | (O = an + 8 | 0) } ak = 640 } for (; ; ) { if (au = 0 | aw[ak >> 2], au >>> 0 <= at >>> 0 ? (az = au + (0 | aw[ak + 4 >> 2]) | 0) >>> 0 > at >>> 0 : 0) { ak = az; break } ak = 0 | aw[ak + 8 >> 2] } af = ak + -47 | 0, ay = af + 8 | 0, ay = af + (0 == (7 & ay | 0) ? 0 : 0 - ay & 7) | 0, af = at + 16 | 0, ay = ay >>> 0 < af >>> 0 ? at : ay, au = ay + 8 | 0, ae = ag + 8 | 0, ae = 0 == (7 & ae | 0) ? 0 : 0 - ae & 7, O = ag + ae | 0, ae = aj + -40 - ae | 0, aw[54] = O, aw[51] = ae, aw[O + 4 >> 2] = 1 | ae, aw[O + ae + 4 >> 2] = 40, aw[55] = aw[170], ae = ay + 4 | 0, aw[ae >> 2] = 27, aw[au >> 2] = aw[160], aw[au + 4 >> 2] = aw[161], aw[au + 8 >> 2] = aw[162], aw[au + 12 >> 2] = aw[163], aw[160] = ag, aw[161] = aj, aw[163] = 0, aw[162] = au, au = ay + 24 | 0; do { au = au + 4 | 0, aw[au >> 2] = 7 } while ((au + 4 | 0) >>> 0 < ak >>> 0);if ((0 | ay) != (0 | at)) { if (ag = ay - at | 0, aw[ae >> 2] = -2 & aw[ae >> 2], aw[at + 4 >> 2] = 1 | ag, aw[ay >> 2] = ag, au = ag >>> 3, ag >>> 0 < 256) { ay = 232 + (au << 1 << 2) | 0, ak = 0 | aw[48], au = 1 << au, ak & au ? (au = ay + 8 | 0, (ak = 0 | aw[au >> 2]) >>> 0 < (0 | aw[52]) >>> 0 || (N = au, P = ak)) : (aw[48] = ak | au, N = ay + 8 | 0, P = ay), aw[N >> 2] = at, aw[P + 12 >> 2] = at, aw[at + 8 >> 2] = P, aw[at + 12 >> 2] = ay; break } if (au = ag >>> 8, au ? ag >>> 0 > 16777215 ? ay = 31 : (X = (au + 1048320 | 0) >>> 16 & 8, O = au << X, H = (O + 520192 | 0) >>> 16 & 4, O <<= H, ay = (O + 245760 | 0) >>> 16 & 2, ay = 14 - (H | X | ay) + (O << ay >>> 15) | 0, ay = ag >>> (ay + 7 | 0) & 1 | ay << 1) : ay = 0, aj = 496 + (ay << 2) | 0, aw[at + 28 >> 2] = ay, aw[at + 20 >> 2] = 0, aw[af >> 2] = 0, au = 0 | aw[49], ak = 1 << ay, !(au & ak)) { aw[49] = au | ak, aw[aj >> 2] = at, aw[at + 24 >> 2] = aj, aw[at + 12 >> 2] = at, aw[at + 8 >> 2] = at; break } for (ae = ag << (31 == (0 | ay) ? 0 : 25 - (ay >>> 1) | 0), au = 0 | aw[aj >> 2]; ; ) { if ((-8 & aw[au + 4 >> 2] | 0) == (0 | ag)) { ay = au, G = 307; break } if (ak = au + 16 + (ae >>> 31 << 2) | 0, !(ay = 0 | aw[ak >> 2])) { G = 304; break } ae <<= 1, au = ay } if (304 == (0 | G)) { if (!(ak >>> 0 < (0 | aw[52]) >>> 0)) { aw[ak >> 2] = at, aw[at + 24 >> 2] = au, aw[at + 12 >> 2] = at, aw[at + 8 >> 2] = at; break } if (307 == (0 | G) && (au = ay + 8 | 0, ak = 0 | aw[au >> 2], O = 0 | aw[52], ak >>> 0 >= O >>> 0 & ay >>> 0 >= O >>> 0)) { aw[ak + 12 >> 2] = at, aw[au >> 2] = at, aw[at + 8 >> 2] = ak, aw[at + 12 >> 2] = ay, aw[at + 24 >> 2] = 0; break } } } } else { O = 0 | aw[52], 0 == (0 | O) | ag >>> 0 < O >>> 0 && (aw[52] = ag), aw[160] = ag, aw[161] = aj, aw[163] = 0, aw[57] = aw[166], aw[56] = -1, au = 0; do { O = 232 + (au << 1 << 2) | 0, aw[O + 12 >> 2] = O, aw[O + 8 >> 2] = O, au = au + 1 | 0 } while (32 != (0 | au));O = ag + 8 | 0, O = 0 == (7 & O | 0) ? 0 : 0 - O & 7, X = ag + O | 0, O = aj + -40 - O | 0, aw[54] = X, aw[51] = O, aw[X + 4 >> 2] = 1 | O, aw[X + O + 4 >> 2] = 40, aw[55] = aw[170] } } while (0);if ((au = 0 | aw[51]) >>> 0 > ab >>> 0) { return H = au - ab | 0, aw[51] = H, O = 0 | aw[54], X = O + ab | 0, aw[54] = X, aw[X + 4 >> 2] = 1 | H, aw[O + 4 >> 2] = 3 | ab, 0 | (O = O + 8 | 0) } } return 0 } ================================================ FILE: iqiyi.py ================================================ # 获取爱奇艺直播的真实流媒体地址。 # iqiyi.js是cmd5x加密函数 import json import re import time import urllib.parse import execjs import requests class IQiYi: """获取爱奇艺 m3u8 格式直播源 输入房间号,通常是数字,比如链接 https://gamelive.iqiyi.com/w/74429 中的 74429。 注意: 爱奇艺有部分直播是来自pps的,要打开房间看链接是否有跳转,有则用pps.py 爱奇艺直播依赖js环境,建议安装node.js。 Attributes: rid: 房间号 """ def __init__(self, rid): self.rid = rid self.s = requests.Session() def get_real_url(self): """ 里面iqiyi.js是个加盐的md5,execjs执行后获取cmd5x的返回值 Returns: m3u8格式播放地址 Raises: incorrect rid: 请确实是爱奇艺直播房间号:爱奇艺有部分直播是来自pps的,要打开房间看链接是否有跳转,有则用pps.py Could not find an available JavaScript runtime: 是否安装了js环境 """ res = self.s.get('https://m-gamelive.iqiyi.com/w/' + self.rid).text # 获取直播间的qipuId try: qipuid, = re.findall(r'"qipuId":(\d*?),"roomId', res) except ValueError: raise Exception('Incorrect rid.') callback = 'jsonp_' + str(int((time.time() * 1000))) + '_0000' params = { 'lp': qipuid, 'src': '01010031010000000000', 'rateVers': 'H5_QIYI', 'qd_v': 1, 'callback': callback } # ba传参iqiyi.js,返回vf ba = '/jp/live?' + urllib.parse.urlencode(params) with open('iqiyi.js', 'r') as f: content = f.read() try: cmd5x = execjs.compile(content) vf = cmd5x.call('cmd5x', ba) except RuntimeError: raise Exception('Could not find an available JavaScript runtime.') # 请求 response = self.s.get('https://live.video.iqiyi.com' + ba, params={'vf': vf}).text url_json = json.loads(re.findall(r'try{.*?\((.*)\);}catch\(e\){};', response)[0]) url = (url_json.get('data').get('streams'))[0].get('url') url = url.replace('hlslive.video.iqiyi.com', 'm3u8live.video.iqiyi.com') return url def get_real_url(rid): try: iqiyi = IQiYi(rid) return iqiyi.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入爱奇艺直播房间号:\n') print(get_real_url(r)) ================================================ FILE: ixigua.py ================================================ # 获取西瓜直播的真实流媒体地址。 import requests import re class IXiGua: def __init__(self, rid): self.rid = rid def get_real_url(self): try: headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:83.0) Gecko/20100101 Firefox/83.0' } room_url = 'https://live.ixigua.com/' + str(self.rid) response = requests.get(url=room_url, headers=headers).text real_url = re.findall(r'playInfo":([\s\S]*?),"authStatus', response)[0] real_url = re.sub(r'\\u002F', '/', real_url) except: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: xg = IXiGua(rid) return xg.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入西瓜直播房间号:\n') print(get_real_url(r)) ================================================ FILE: jd.py ================================================ # 京东直播:https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=1807004&position=0 import requests import json class JD: def __init__(self, rid): self.rid = rid def get_real_url(self): url = 'https://api.m.jd.com/client.action' params = { 'functionId': 'liveDetail', 'body': json.dumps({'id': self.rid, 'videoType': 1}, separators=(',', ':')), 'client': 'wh5' } with requests.Session() as s: res = s.get(url, params=params).json() data = res.get('data', 0) if data: status = data['status'] if status == 1: real_url = data['h5Pull'] return real_url else: print('未开播') real_url = '回放:' + data.get('playBack').get('videoUrl', 0) return real_url else: raise Exception('直播间不存在') def get_real_url(rid): try: jd = JD(rid) return jd.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入京东直播房间号:\n') print(get_real_url(r)) ================================================ FILE: kbs.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/22 8:02 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import hashlib import time from urllib.parse import parse_qsl, urlsplit import requests class KBS: """ - 腾讯体育直播,看比赛频道 https://kbs.sports.qq.com/ - 直播间地址类似:https://sports.qq.com/kbsweb/game.htm?mid=100006:2337840,需要其中的mid - 只能获取免费观看的直播间 - 请求参数params中的defn:蓝光fhd、超清shd、高清hd、标清sd,未登陆时最高获取超清,蓝光需VIP。 """ def __init__(self, rid): var = dict(parse_qsl(urlsplit(rid).query)) mid = var.get('mid') with requests.Session() as self.s: res = requests.get(f'https://matchweb.sports.qq.com/kbs/matchDetail?mid={mid}').json() self.vid = res['data']['liveId'] self.livepid = res['data']['programId'] def get_real_url(self): tt = int(time.time()) week = int(time.strftime('%w')) s = ('06fc1464', '4244ce1b', '77de31c5', 'e0149fa2', '60394ced', '2da639f0', 'c2f0cf9f') ha = f'{s[week - 1]}{self.vid}{tt}*#06#40201' ckey = hashlib.md5(ha.encode('utf-8')).hexdigest() params = { 'cmd': 2, 'cnlid': self.vid, 'pla': 0, 'stream': 2, 'system': 0, 'appVer': '3.0.0.142', 'encryptVer': f'7.{7 if week == 0 else week}', 'qq': 0, 'device': 'PC', 'guid': 'f56776a1fa52e9c8c4987bfecfbf0503', 'defn': 'shd', # shd默认超清 'host': 'qq.com', 'livepid': self.livepid, 'logintype': 1, 'vip_status': 1, 'livequeue': 1, 'fntick': tt, 'tm': tt, 'sdtfrom': 1107, 'platform': 40201, 'cKey': ckey, 'queueStatus': 0, 'sphttps': 1, 'authext': '{}', 'auth_ext': '{}', 'auth_from': 40001, # 'callback': 'txvlive_videoinfoget_2767135792', } res = self.s.get('https://infozb6.video.qq.com/', params=params).json() playurl = res.get('playurl', 0) if res['errinfo']: raise Exception('errinfo') else: return playurl def get_real_url(rid): try: kbs = KBS(rid) return kbs.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入腾讯体育直播间地址:\n') print(get_real_url(r)) ================================================ FILE: kk.py ================================================ # KK直播:http://www.kktv5.com/ import requests class KK: def __init__(self, rid): """ KK直播 Args: rid: 房间号 """ self.rid = rid self.s = requests.Session() def get_real_url(self): url = 'https://sapi.kktv1.com/meShow/entrance?parameter={}' parameter = {'FuncTag': 10005043, 'userId': f'{self.rid}', 'platform': 1, 'a': 1, 'c': 100101} res = self.s.get(url.format(parameter)).json() tagcode = res['TagCode'] if tagcode == '00000000': if res.get('liveType', 0) == 1: roomid = res['roomId'] parameter = {'FuncTag': 60001002, 'roomId': roomid, 'platform': 1, 'a': 1, 'c': 100101} res = self.s.get(url.format(parameter)).json() real_url = res['liveStream'] return real_url else: raise Exception('未开播') else: raise Exception('直播间不存在') def get_real_url(rid): try: kk = KK(rid) return kk.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入KK直播房间号:\n') print(get_real_url(r)) ================================================ FILE: kuaishou.py ================================================ # 获取快手直播的真实流媒体地址,默认输出最高画质 # https://live.kuaishou.com/u/KPL704668133 # 如获取失败,尝试修改 cookie 中的 did import json import re import requests class KuaiShou: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { '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', 'cookie': 'did=web_d563dca728d28b00336877723e0359ed'} with requests.Session() as s: res = s.get('https://m.gifshow.com/fw/live/{}'.format(self.rid), headers=headers) livestream = re.search(r'liveStream":(.*),"obfuseData', res.text) if livestream: livestream = json.loads(livestream.group(1)) *_, hlsplayurls = livestream['multiResolutionHlsPlayUrls'] urls, = hlsplayurls['urls'] url = urls['url'] return url else: raise Exception('直播间不存在或未开播') def get_real_url(rid): try: ks = KuaiShou(rid) return ks.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': # KPL704668133 r = input('请输入快手直播房间ID:\n') print(get_real_url(r)) ================================================ FILE: kugou.py ================================================ # 获取酷狗繁星直播的真实流媒体地址,默认最高码率。 import requests class KuGou: def __init__(self, rid): """ 酷狗繁星直播 Args: rid: 房间号 """ self.rid = rid self.s = requests.Session() self.BASE_URL = 'https://fx1.service.kugou.com/video/mo/live/pull/h5/v3/streamaddr' def get_real_url(self): params = { 'roomId': self.rid, 'platform': 18, 'version': 1000, 'streamType': '3-6', 'liveType': 1, 'ch': 'fx', 'ua': 'fx-mobile-h5', 'kugouId': 0, 'layout': 1 } try: res = self.s.get(self.BASE_URL, params=params).json() if res['code'] == 1: raise Exception(f'{res["msg"]},可能是房间号输入错误!') real_url_hls = res.get('data').get('horizontal')[0].get('httpshls')[0] except IndexError: try: url = f'https://fx1.service.kugou.com/biz/ChannelVServices/' \ f'RoomLiveService.RoomLiveService.getCurrentLiveStarForMob/{self.rid}' res = self.s.get(url).json() if res['code'] == 1: raise Exception(f'{res["msg"]},可能是房间号输入错误!') roomid = res['data']['roomId'] self.BASE_URL = 'https://fx2.service.kugou.com/video/pc/live/pull/mutiline/streamaddr' params = { 'std_rid': roomid, 'version': '1.0', 'streamType': '1-2-3-5-6', 'targetLiveTypes': '1-4-5-6', 'ua': 'fx-h5' } res = self.s.get(self.BASE_URL, params=params).json() real_url_hls = res.get('data').get('lines')[-1].get('streamProfiles')[-1]['httpsHls'][-1] except Exception: raise Exception('未找到') return real_url_hls def get_real_url(rid): try: kg = KuGou(rid) return kg.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入酷狗直播房间号:\n') print(get_real_url(r)) ================================================ FILE: kuwo.py ================================================ # 酷我聚星直播:http://jx.kuwo.cn/ import requests import re class KuWo: def __init__(self, rid): self.rid = rid self.BASE_URL = 'https://jxm0.kuwo.cn/video/mo/live/pull/h5/v3/streamaddr' self.s = requests.Session() def get_real_url(self): res = self.s.get(f'https://jx.kuwo.cn/{self.rid}').text roomid = re.search(r"roomId: '(\d*)'", res) if roomid: self.rid = roomid.group(1) else: raise Exception('未开播或房间号错误') params = { 'std_bid': 1, 'roomId': self.rid, 'platform': 405, 'version': 1000, 'streamType': '3-6', 'liveType': 1, 'ch': 'fx', 'ua': 'fx-mobile-h5', 'kugouId': 0, 'layout': 1, 'videoAppId': 10011, } res = self.s.get(self.BASE_URL, params=params).json() if res['data']['sid'] == -1: raise Exception('未开播或房间号错误') try: url = res['data']['horizontal'][0]['httpshls'][0] except (KeyError, IndexError): url = res['data']['vertical'][0]['httpshls'][0] return url def get_real_url(rid): try: kw = KuWo(rid) return kw.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入酷我聚星直播房间号:\n') print(get_real_url(r)) ================================================ FILE: laifeng.py ================================================ # 获取来疯直播的真实流媒体地址。 # 来疯直播就是优酷直播的个人主播频道,不同于优酷直播下的轮播台和体育直播。 # 来疯直播间链接形式:https://v.laifeng.com/8032155 import requests import re class LaiFeng: def __init__(self, rid): """ 来疯直播 Args: rid: 房间号 """ self.rid = rid self.s = requests.Session() def get_real_url(self): try: response_main = self.s.get(f'http://v.laifeng.com/{self.rid}/m').text stream_name = re.search(r"initAlias:'(.*)?'", response_main).group(1) real_url = {} for stream_format in ['HttpFlv', 'Hls']: request_url = f'https://lapi.lcloud.laifeng.com/Play?AppId=101&CallerVersion=2.0&StreamName' \ f'={stream_name}&Action=Schedule&Version=2.0&Format={stream_format}' response = self.s.get(request_url).json() real_url[stream_format] = response.get(stream_format)[0].get('Url') except Exception: raise Exception('该直播间不存在或未开播') return real_url def get_real_url(rid): try: lf = LaiFeng(rid) return lf.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入来疯直播房间号:\n') print(get_real_url(r)) ================================================ FILE: lehai.py ================================================ # 乐嗨直播:https://www.lehaitv.com/ from urllib.parse import urlencode from urllib.parse import unquote import requests import time import hashlib class LeHai: def __init__(self, rid): self.rid = rid def get_real_url(self): url = f'https://service.lehaitv.com/v2/room/{self.rid}/media/advanceInfoRoom' params = { '_st1': int(time.time() * 1e3), 'accessToken': 's7FUbTJ%2BjILrR7kicJUg8qr025ZVjd07DAnUQd8c7g%2Fo4OH9pdSX6w%3D%3D', 'tku': 3000006, } data = urlencode(params) + '1eha12h5' _ajaxData1 = hashlib.md5(data.encode('utf-8')).hexdigest() params['_ajaxData1'] = _ajaxData1 params['accessToken'] = unquote(params['accessToken']) with requests.Session() as s: res = s.get(url, params=params) if res.status_code == 200: res = res.json() statuscode = res['status']['statuscode'] if statuscode == '0': if res['data']['live_status'] == 1: real_url = res['data']['medial_url_app_for_h264'] return real_url else: raise Exception('未开播') else: raise Exception('房间不存在 或 权限检查错误') else: raise Exception('请求错误') def get_real_url(rid): try: lh = LeHai(rid) return lh.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入乐嗨直播房间号:\n') print(get_real_url(r)) ================================================ FILE: liveu.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/8/15 14:09 # @Project: my-spiders # @Author: wbt5 # @Blog: https://wbt5.com import requests class liveU: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: url = f'https://mobile.liveu.me/appgw/v2/watchstartweb?sessionid=&vid={self.rid}' res = s.get(url).json() play_url = res['retinfo']['play_url'] if res['retval'] == 'ok' else '不存在或未开播' return play_url def get_real_url(rid): try: url = liveU(rid) return url.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入liveU直播房间号:\n') print(get_real_url(r)) ================================================ FILE: longzhu.py ================================================ # 获取龙珠直播的真实流媒体地址,默认最高码率。 import requests import re class LongZhu: def __init__(self, rid): """ 龙珠直播,获取hls格式的播放地址 Args: rid: 直播房间号 """ self.rid = rid self.s = requests.Session() def get_real_url(self): try: res = self.s.get(f'http://star.longzhu.com/{self.rid}').text roomId = re.search(r'roomid":(\d+)', res).group(1) res = self.s.get(f'http://livestream.longzhu.com/live/getlivePlayurl?roomId={roomId}&utmSr=&platform=h5' f'&device=ios').json() real_url = res.get('playLines')[0].get('urls')[-1].get('securityUrl') except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: lz = LongZhu(rid) return lz.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入龙珠直播房间号:\n') print(get_real_url(r)) ================================================ FILE: look.py ================================================ # 获取网易云音乐旗下look直播的真实流媒体地址。 # look直播间链接形式:https://look.163.com/live?id=73694082 # 以下核心加密解密算法来自:https://github.com/Qinjiaxin/MusicBox/blob/b8f716d43d/MusicPlayer/apis/netEaseEncode.py # 分析过程可参看 https://github.com/Qinjiaxin/MusicBox/blob/b8f716d43d/doc/analysis/analyze_captured_data.md # 加密参数相关。 # 具体http://s3.music.126.net/sep/s/2/core.js?5d6f8e4d01b4103ec9f246a2ef70e6d1在这个js中可以查看。 # 好吧,其实不用分析这个js,在这个git中可以找到https://github.com/xiyouMc/ncmbot,不过他是for python2的。 # 针对pyton3做了修改。 import base64 import binascii import json import random import requests from Crypto.Cipher import AES modulus = '00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee34' \ '1f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e' \ '82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7' nonce = b'0CoJUm6Qyw8W8jud' pubKey = '010001' def aes_encrypt(text, seckey): pad = 16 - len(text) % 16 # aes加密需要byte类型。 # 因为调用两次,下面还要进行补充位数。 # 直接用try与if差不多。 try: text = text.decode() except Exception as e: print(e) text = text + pad * chr(pad) try: text = text.encode() except Exception as e: print(e) encryptor = AES.new(seckey, 2, bytes('0102030405060708', 'utf-8')) ciphertext = encryptor.encrypt(text) ciphertext = base64.b64encode(ciphertext) return ciphertext def create_secret_key(size): # 2中 os.urandom返回是个字符串。3中变成bytes。 # 不过加密的目的是需要一个字符串。 # 因为密钥之后会被加密到rsa中一起发送出去。 # 所以即使是个固定的密钥也是可以的。 # return (''.join(map(lambda xx: (hex(ord(xx))[2:]), os.urandom(size))))[0:16] return bytes(''.join(random.sample('1234567890qwertyuipasdfghjklzxcvbnm', size)), 'utf-8') def rsa_encrypt(text, pub_key, mod): text = text[::-1] # 3中将字符串转成hex的函数变成了binascii.hexlify, 2中可以直接 str.encode('hex') rs = int(binascii.hexlify(text), 16) ** int(pub_key, 16) % int(mod, 16) return format(rs, 'x').zfill(256) def encrypted_request(text): # 这边是加密过程。 text = json.dumps(text) sec_key = create_secret_key(16) enc_text = aes_encrypt(aes_encrypt(text, nonce), sec_key) enc_sec_key = rsa_encrypt(sec_key, pubKey, modulus) # 在那个js中也可以找到。 # params加密后是个byte,解下码。 return {'params': enc_text.decode(), 'encSecKey': enc_sec_key} class Look: def __init__(self, rid): self.rid = rid def get_real_url(self): try: request_data = encrypted_request({"liveRoomNo": self.rid}) response = requests.post(url='https://api.look.163.com/weapi/livestream/room/get/v3', data=request_data) real_url = response.json()['data']['roomInfo']['liveUrl'] except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: look = Look(rid) return look.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入Look直播房间号:\n') print(get_real_url(r)) ================================================ FILE: maoer.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/1 13:03 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import json import requests class MAOER: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 ' } url = 'https://fm.missevan.com/api/v2/live/{}'.format(self.rid) with requests.Session() as s: res = s.get(url, headers=headers).json() try: code = res['code'] if code != 0: return res['info'] else: channel = res['info']['room']['channel'] return channel except json.decoder.JSONDecodeError: return '输入错误' def get_real_url(rid): try: mr = MAOER(rid) return mr.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入猫耳直播房间号:\n') print(get_real_url(r)) ================================================ FILE: migu.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/11/6 10:51 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import requests from urllib import parse class MiGu: """ 获取咪咕体育直播的流媒体地址 直播列表:https://www.miguvideo.com/mgs/website/prd/sportMatchDetail.html 直播间地址形式:https://www.miguvideo.com/mgs/website/prd/sportLive.html?mgdbId=120000173758 mgdbId 120000173758即为房间号 """ def __init__(self, rid, rate=3): """ Args: rate:估计是清晰度,默认rate=3是高清 rid:房间号,如 120000173758 """ self.rid = rid self.rate = rate def get_real_url(self): """ 先获取contId Returns: url """ headers = { 'appId': 'miguvideo', 'clientId': '', 'SDKCEId': '', 'terminalId': 'www', 'userId': '', 'userToken': '', 'X-UP-CLIENT-CHANNEL-ID': '', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/95.0.4638.69 Safari/537.36', 'Referer': 'https://www.miguvideo.com/', } url = 'https://app-sc.miguvideo.com/vms-match/v3/staticcache/basic/basic-data/{}'.format(self.rid) with requests.Session() as session: res = session.get(url, headers=headers).json() try: contid = res['body']['pId'] url = f'https://webapi.miguvideo.com/gateway/playurl/v3/play/playurl?contId={contid}&rateType={self.rate}' res = session.get(url, headers=headers).json() try: playurl = res['body']['urlInfo']['url'] real_url = self.calcu(playurl) return real_url except KeyError: return '未获取到url,可能参数错误!' except KeyError: return '未获取到contId' @staticmethod def calcu(pre_url): """ 计算ddCalcu,原始过程在pcPlayer.js的9432行到9460行。 这里直接用python代码还原,其实可以简化。 Args: pre_url:playurl请求返回的url用来拼接计算ddCalcu Returns: real_url:添加ddCalcu后的播放地址 """ params = dict(parse.parse_qsl(pre_url.split('?')[-1])) t = 'eeeeeeeee' r = str(params['timestamp']) n = str(params['ProgramID']) a = params['Channel_ID'] o = params['puData'] # s = '2624' # js里是遍历s,这里直接写死 u = t[2] or 'e' ll = r[6] or 't' c = n[2] or "c" f = a[len(a) - 4] or 'n' d = o h = [] for p in range(0, int(len(d) / 2)): h.append(d[len(d) - p - 1]) if p < len(d) - p - 1: h.append(o[p]) x = { 1: u, 2: ll, 3: c, 4: f } h.append(x[p]) if p in [1, 2, 3, 4] else '' v = ''.join(h) real_url = pre_url + '&ddCalcu=' + v return real_url def get_real_url(rid): try: mg = MiGu(rid) return mg.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': rr = input('请输入咪咕直播间号:\n') print(get_real_url(rr)) ================================================ FILE: now.py ================================================ # 获取NOW直播的真实流媒体地址。 import requests class Now: def __init__(self, rid): self.rid = rid def get_real_url(self): try: room_url = f'https://now.qq.com/cgi-bin/now/web/room/get_live_room_url?room_id={self.rid}&platform=8' response = requests.get(url=room_url).json() result = response.get('result') real_url = { 'raw_hls_url': result.get('raw_hls_url', 0), 'raw_rtmp_url': result.get('raw_rtmp_url', 0), 'raw_flv_url': result.get('raw_flv_url', 0) } except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: now = Now(rid) return now.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入NOW直播间号:\n') print(get_real_url(r)) ================================================ FILE: pps.py ================================================ # 获取PPS奇秀直播的真实流媒体地址。 import requests import re import time class PPS: def __init__(self, rid): self.rid = rid self.BASE_URL = 'https://m-x.pps.tv/api/stream/getH5' self.s = requests.Session() def get_real_url(self): headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 'Referer': 'https://m-x.pps.tv/' } tt = int(time.time() * 1000) try: res = self.s.get(f'https://m-x.pps.tv/room/{self.rid}', headers=headers).text anchor_id = re.findall(r'anchor_id":"(\d*)', res)[0] params = { 'qd_tm': tt, 'typeId': 1, 'platform': 7, 'vid': 0, 'qd_vip': 0, 'qd_uid': anchor_id, 'qd_ip': '114.114.114.114', 'qd_vipres': 0, 'qd_src': 'h5_xiu', 'qd_tvid': 0, 'callback': '', } res = self.s.get(self.BASE_URL, headers=headers, params=params).text real_url = re.findall(r'"hls":"(.*)","rate_list', res)[0] except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: pps = PPS(rid) return pps.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入奇秀直播房间号:\n') print(get_real_url(r)) ================================================ FILE: ppsport.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/4 15:11 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import base64 import binascii from urllib.parse import parse_qsl, urlsplit, urlencode import requests from Crypto.Cipher import AES, DES3 from Crypto.Cipher import PKCS1_v1_5 from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA def des_encrypt(text, key, iv): """ DES加密 """ key = binascii.a2b_hex(key) iv = binascii.a2b_hex(iv) pad = 8 - len(text) % 8 text = text + pad * chr(pad) text = text.encode() cipher = DES3.new(key, DES3.MODE_CBC, iv) encrypt_bytes = cipher.encrypt(text) return base64.b64encode(encrypt_bytes).decode('utf-8') def rsa_encrypt(text): """ RSA加密 :param text: :return: """ pub_key = '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqe6XLQF2JmXWgfh09t8TTZsOb6bnj' \ '+duiWw4G7pd5Uo1/DN7Xij3Tys9E7XBX0gdXKYI9j+6Fr45bM28fzl4AxUxnhzmbExRt1NJarDGMKo49ViRg1VbL+Wh9kRi' \ '+rAxBisdRiP2JEAL+Awqu80chZxxdyoI1k3fSLoZsv/PGkwolE71qsEM4BO1J9RWNp0wlNGqgR' \ '+bTwLKkoe7oiZaKaMsSBWNIBDkwgGKFJZzXMXMnqGsDmfbdi32j6hW9DdrxjCx' \ '/i9Nzahd1TWVnw9O1AHL5PD5kM3HzqkAewBu38sZxw8DSGYqG0fgVAQtiLHhlD/19F4NKxqL8IVCinMBHQIDAQAB\n-----END ' \ 'PUBLIC KEY----- ' pub_key = RSA.importKey(pub_key) cipher = PKCS1_v1_5.new(pub_key) rsa_text = base64.b64encode(cipher.encrypt(bytes(text.encode("utf8")))) return rsa_text.decode('utf-8') def encrypt(params): """ encrypt_params是DES3加密,cipher是RSA加密 :param params: :return: """ key = 'DB30EB9226014FEC2A04C6A7BE47F22853B6621BD6989D83' iv = '6795646FD1F8CC95' encrypt_params = des_encrypt(urlencode(params, safe=','), key, iv) cipher = rsa_encrypt(f'{key},{iv}') en_params = { 'cipher': cipher, 'encryptParams': encrypt_params, 'vvId': '295b5e4a-4a77-442a-8594-36c47c87d6c5', # 'format': 'jsonp' } return en_params def aes_decrypt(text, key): """ aes解密,ECB模式,key先hash :param text:密文 :param key:key :return: """ h = SHA256.new() h.update(key.encode()) key = h.hexdigest() key = binascii.a2b_hex(key) cipher = AES.new(key, AES.MODE_ECB) text = binascii.a2b_hex(text) decrypt_key = cipher.decrypt(text) return binascii.b2a_hex(decrypt_key).decode() class PPSport: """ 链接样式:http://sports.pptv.com/sportslive/pg_h5live?sectionid=184978 - liveFlag=1 正在直播 - liveFlag=2 没有直播,有录像集锦 - liveFlag 为空,没有录像 非VIP最高获取1280P """ def __init__(self, rid): # 拆分sectionid var = dict(parse_qsl(urlsplit(rid).query)) sectionid = var.get('sectionid') if sectionid: self.sectionid = sectionid else: raise Exception('Invalid link!') # 获取cid with requests.Session() as self.s: res = self.s.get(f'http://sportlive.suning.com/slsp-web/cms/competitionschedule/v1/detail/section.do' f'?sectionid={sectionid}').json() self.liveflag = res['data'].get('liveFlag') if self.liveflag == '1': # 正在直播 self.cid = res['data']['sectionInfo']['lives'][0]['cid'] elif self.liveflag == '2': # 录像 try: self.cid = res['data']['sectionInfo']['lives'][0]['afterCid'] except KeyError: # 没有录像 raise Exception('No streaming!') else: raise Exception('liveflag error!') def get_real_url(self): """ PPSport原网页中会把下面的params加密后再发送请求,用上面的encrypt,这里请求参数不加密也可以 :return:url """ params = { 'type': 'mhpptv', 'appId': 'pptv.web.h5', 'appPlt': 'web', 'appVer': '1.0.4', 'channel': 'sn.cultural', 'sdkVer': '1.5.0', 'cid': self.cid, 'allowFt': '0,1,2,3', 'rf': 0, 'ppi': '302c3530', 'o': 0, 'ahl_ver': 1, 'ahl_random': '374b7d5d453b2c4d2e2e327452434168', 'ahl_signa': '552aed5c0f2d2e561cd55991925ae817add78ceb86ede3ecac08dd4df6a31f78', 'version': 1, 'streamFormat': 1, 'videoFormat': 'm3u8', 'vvId': '295b5e4a-4a77-442a-8594-36c47c87d6c5', } # params = encrypt(params) headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/90.0.4430.93 Safari/537.36 ', } res = self.s.get('http://oneplay.api.pptv.com/ups-service/play', headers=headers, params=params) res = res.json() if res.get('code', 1) == 0: if self.liveflag == '1': # 正在直播 vod2 = res['data']['program']['media']['resource']['stream']['live2'] else: # 录像集锦 vod2 = res['data']['program']['media']['resource']['vod2'] delay = vod2.get('delay') interval = vod2.get('interval') item = vod2['item'][-1] dt = item['dt'] rid = item['rid'].split('.')[0] if self.liveflag == '1': h = dt['sh']['content'] + dt['st'] + dt['bh']['content'] + dt['iv'] + 'V8oo0Or1f047NaiMTxK123LMFuINTNeI' else: h = dt['sh'] + dt['st'] + dt['id'] + dt['bh'] + dt['iv'] + 'V8oo0Or1f047NaiMTxK123LMFuINTNeI' key = dt['key']['content'] key, n = key.split('-', 1) # 解密获取k k = aes_decrypt(key, h) + '-' + n k = { 'h5vod.ver': '2.1.5', 'k': k, 'vvid': '295b5e4a-4a77-442a-8594-36c47c87d6c5', 'type': 'mhpptv', 'o': 0, 'sv': '4.1.18', } url = f"http://{dt['bh']['content']}/live/{interval}/{delay}/{rid}.m3u8?playback=0&{urlencode(k)}" \ if self.liveflag == '1' else f"http://{dt['bh']}/{rid}.m3u8?fpp.ver=1.0.0&{urlencode(k)}" return url else: raise Exception('Invalid parameters') def get_real_url(rid): try: pps = PPSport(rid) return pps.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入PP体育直播间地址:\n') print(get_real_url(r)) ================================================ FILE: qf.py ================================================ # 获取56千帆直播的真实流媒体地址。 # 千帆直播直播间链接形式:https://qf.56.com/520686 import requests import re class QF: def __init__(self, rid): """ 搜狐千帆直播可以直接在网页源码里找到播放地址 Args: rid: 数字直播间号 """ self.rid = rid self.s = requests.Session() def get_real_url(self): try: res = self.s.get(f'https://qf.56.com/{self.rid}').text flvurl = re.search(r"flvUrl:'(.*)?'", res).group(1) if 'flv' in flvurl: real_url = flvurl else: res = self.s.get(flvurl).json() real_url = res['url'] except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: qf = QF(rid) return qf.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入千帆直播房间号:\n') print(get_real_url(r)) ================================================ FILE: qie.py ================================================ # 企鹅体育:https://live.qq.com/directory/all import requests import re class ESport: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: res = s.get(f'https://m.live.qq.com/{self.rid}') show_status = re.search(r'"show_status":"(\d)"', res.text) if show_status: if show_status.group(1) == '1': hls_url = re.search(r'"hls_url":"(.*)","use_p2p"', res.text).group(1) return hls_url else: raise Exception('未开播') else: raise Exception('直播间不存在') def get_real_url(rid): try: es = ESport(rid) return es.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入企鹅体育直播房间号:\n') print(get_real_url(r)) ================================================ FILE: renren.py ================================================ # 人人直播:http://zhibo.renren.com/ import requests import re class RenRen: def __init__(self, rid): """ 直播间地址形式:http://activity.renren.com/live/liveroom/970302934_21348 rid即970302934_21348 Args: rid:房间号 """ self.rid = rid self.s = requests.Session() def get_real_url(self): res = self.s.get(f'http://activity.renren.com/live/liveroom/{self.rid}').text try: s = re.search(r'playUrl":"(.*?)"', res) play_url = s.group(1) return play_url except Exception: raise Exception('解析错误') def get_real_url(rid): try: rr = RenRen(rid) return rr.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入人人直播房间号:\n') print(get_real_url(r)) ================================================ FILE: requirements.txt ================================================ aiohttp==3.7.4 async-timeout==3.0.1 attrs==20.2.0 certifi==2020.6.20 chardet==3.0.4 idna==2.10 multidict==4.7.6 protobuf==3.12.2 pycryptodome==3.9.8 PyExecJS==1.5.1 requests==2.26.0 six==1.15.0 typing-extensions==3.7.4.3 urllib3==1.26.5 yarl==1.5.1 ================================================ FILE: showself.py ================================================ # 秀色直播:https://www.showself.com/ from urllib.parse import urlencode import requests import time import hashlib class ShowSelf: def __init__(self, rid): self.rid = rid self.headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/95.0.4638.69 Safari/537.36 ' } self.s = requests.Session() def get_real_url(self): res = self.s.get('https://service.showself.com/v2/custuser/visitor', headers=self.headers).json() uid = res['data']['uid'] accesstoken = sessionid = res['data']['sessionid'] params = { 'accessToken': accesstoken, 'tku': uid, '_st1': int(time.time() * 1000) } payload = { 'groupid': '999', 'roomid': self.rid, 'sessionid': sessionid, 'sessionId': sessionid } # 合并两个字典 data = dict(params, **payload) data = f'{urlencode(sorted(data.items(), key=lambda d: d[0]))}sh0wselfh5' _ajaxData1 = hashlib.md5(data.encode('utf-8')).hexdigest() payload['_ajaxData1'] = _ajaxData1 url = f'https://service.showself.com/v2/rooms/{self.rid}/members?{urlencode(params)}' res = self.s.post(url, json=payload, headers=self.headers) if res.status_code == 200: res = res.json() statuscode = res['status']['statuscode'] if statuscode == '0': if res['data']['roomInfo']['live_status'] == '1': anchor, = res['data']['roomInfo']['anchor'] real_url = anchor['media_url'] return real_url else: raise Exception('未开播') else: raise Exception('房间不存在') else: raise Exception('参数错误') def get_real_url(rid): try: ss = ShowSelf(rid) return ss.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入秀色直播房间号:\n') print(get_real_url(r)) ================================================ FILE: sports_iqiyi.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/6/19 20:39 # @Project: my-spiders # @Author: wbt5 # @Blog: https://wbt5.com import binascii import hashlib import json import re import time from urllib.parse import urlencode import execjs import requests class sIQiYi: def __init__(self, rid): """ 收费直播间、未开播直播间、已结束直播间获取到的地址均无法播放; Args: rid: 这里传入完整的直播间地址 """ url = rid self.rid = url.split('/')[-1] self.s = requests.Session() def decodeurl(self): """ 传入url地址,截取url中的直播间id 字符串lgqipu倒序后转为十进制数,作为qpid解码的传参 Returns: qpid """ o = 'lgqipu' o = int(binascii.hexlify(o[::-1].encode()), 16) s = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' a = 0 rr = enumerate(self.rid) for i, _ in rr: a += s.index(_) * pow(36, len(self.rid) - (i + 1)) a = f'{a:b}' n = f'{o:b}' x = len(a) y = len(n) if x > y: i = a[:x - y] a = a[x - y:] else: i = n[:y - x] n = n[y - x:] for rs, ele in enumerate(a): if ele == n[rs]: i += '0' else: i += '1' qpid = int(i, 2) return qpid def get_real_url(self): """ 里面iqiyi.js是个加盐的md5,execjs执行后获取cmd5x的返回值 Returns: m3u8格式播放地址 Raises: Could not find an available JavaScript runtime: 是否安装了js环境 """ qpid = self.decodeurl() uid = 'ba4fe551bd889d73f3d321d2fadc6130' ve = hashlib.md5(f'{qpid}function getTime() {{ [native code] }}{uid}'.encode('utf-8')).hexdigest() v = { 'lp': qpid, 'src': '01014351010000000000', 'ptid': '02037251010000000000', 'uid': '', 'rateVers': 'H5_QIYI', 'k_uid': uid, 'qdx': 'n', 'qdv': 3, 'dfp': '', 've': ve, 'v': 1, 'k_err_retries': 0, 'tm': int(time.time()), 'k_ft4': 17179869185, 'k_ft1': 141287244169216, 'k_ft5': 1, 'qd_v': 1, 'qdy': 'a', 'qds': 0, # 'callback': 'Q3d080ff19d8f233acb05683bf38e3a15', # 'vf': 'f0b986f100ae81fff8e8f8f96053e815', } k = '/jp/live?' + urlencode(v) cb = hashlib.md5(k.encode('utf-8')).hexdigest() k = f'{k}&callback=Q{cb}' # 生成vf with open('iqiyi.js', 'r') as f: content = f.read() try: cmd5x = execjs.compile(content) vf = cmd5x.call('cmd5x', k) except RuntimeError: raise Exception('Could not find an available JavaScript runtime.') # 请求url url = f'https://live.video.iqiyi.com{k}&vf={vf}' res = self.s.get(url).text data = re.search(r'try{\w{33}\(([\w\W]+)\s\);}catch\(e\){};', res).group(1) data = json.loads(data) if data['code'] == 'A00004': raise Exception('直播间地址错误!') elif data['code'] == 'A00000': try: url = data['data']['streams'][-1]['url'] except IndexError: raise Exception('可能直播未开始直播或为付费直播!') else: raise Exception('无法定位错误原因,可提交issue!') return url def get_real_url(rid): try: siqiyi = sIQiYi(rid) return siqiyi.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入爱奇艺体育直播间完整地址地址,注意只能获取免费直播:\n') # https://sports.iqiyi.com/resource/pcw/live/gwbgbfbgc3 print(get_real_url(r)) ================================================ FILE: tiktok.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/2 23:23 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import re import requests class TikTok: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', } res = requests.get(self.rid, headers=headers).text url = re.search(r'"LiveUrl":"(.*?m3u8)",', res) if url: return url.group(1) else: raise Exception('link invalid') def get_real_url(rid): try: tt = TikTok(rid) return tt.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': # https://vm.tiktok.com/ZMe45tomE r = input('请输入 TikTok 分享链接:\n') print(get_real_url(r)) ================================================ FILE: tuho.py ================================================ # 星光直播:https://www.tuho.tv/28545037 import requests import re class TuHo: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: res = s.get(f'https://www.tuho.tv/{self.rid}').text flv = re.search(r'videoPlayFlv":"(https[\s\S]+?flv)', res) if flv: status = re.search(r'isPlaying\s:\s(\w+),', res).group(1) if status == 'true': real_url = flv.group(1).replace('\\', '') return real_url else: raise Exception('未开播') else: raise Exception('直播间不存在') def get_real_url(rid): try: th = TuHo(rid) return th.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入星光直播房间号:\n') print(get_real_url(r)) ================================================ FILE: twitch.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/2 16:20 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import json import re from urllib.parse import urlencode # twitch 直播需要科学上网 import requests class Twitch: def __init__(self, rid): # rid = channel_name self.rid = rid with requests.Session() as self.s: pass def get_client_id(self): try: res = self.s.get(f'https://www.twitch.tv/{self.rid}').text client_id = re.search(r'clientId="(.*?)"', res).group(1) return client_id except requests.exceptions.ConnectionError: raise Exception('ConnectionError') def get_sig_token(self): data = { "operationName": "PlaybackAccessToken_Template", "query": "query PlaybackAccessToken_Template($login: String!, $isLive: Boolean!, $vodID: ID!, " "$isVod: Boolean!, $playerType: String!) { streamPlaybackAccessToken(channelName: $login, " "params: {platform: \"web\", playerBackend: \"mediaplayer\", playerType: $playerType}) @include(" "if: $isLive) { value signature __typename } videoPlaybackAccessToken(id: $vodID, " "params: {platform: \"web\", playerBackend: \"mediaplayer\", playerType: $playerType}) @include(" "if: $isVod) { value signature __typename }}", "variables": { "isLive": True, "login": self.rid, "isVod": False, "vodID": "", "playerType": "site" } } headers = { 'Client-ID': self.get_client_id(), 'Referer': 'https://www.twitch.tv/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/90.0.4430.93 Safari/537.36', } res = self.s.post('https://gql.twitch.tv/gql', headers=headers, data=json.dumps(data)).json() try: token, signature, _ = res['data']['streamPlaybackAccessToken'].values() except AttributeError: raise Exception("Channel does not exist") return signature, token def get_real_url(self): signature, token = self.get_sig_token() params = { 'allow_source': 'true', 'dt': 2, 'fast_bread': 'true', 'player_backend': 'mediaplayer', 'playlist_include_framerate': 'true', 'reassignments_supported': 'true', 'sig': signature, 'supported_codecs': 'vp09,avc1', 'token': token, 'cdm': 'wv', 'player_version': '1.4.0', } url = f'https://usher.ttvnw.net/api/channel/hls/{self.rid}.m3u8?{urlencode(params)}' return url def get_real_url(rid): try: tw = Twitch(rid) return tw.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入 twitch 房间名:\n') print(get_real_url(r)) ================================================ FILE: v6cn.py ================================================ # 获取六间房直播的真实流媒体地址。 import requests import re class V6CN: def __init__(self, rid): self.rid = rid def get_real_url(self): try: response = requests.get(f'https://v.6.cn/{self.rid}').text result = re.findall(r'"flvtitle":"v(\d*?)-(\d*?)"', response)[0] uid = result[0] flvtitle = 'v{}-{}'.format(*result) response = requests.get(f'https://rio.6rooms.com/live/?s={uid}').text hip = 'https://' + re.search(r'(.*\.com).*?', response).group(1) real_url = [f'{hip}/{flvtitle}/palylist.m3u8', f'{hip}/httpflv/{flvtitle}'] except Exception: raise Exception('直播间不存在或未开播') return real_url def get_real_url(rid): try: v6cn = V6CN(rid) return v6cn.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入六间房直播房间号:\n') print(get_real_url(r)) ================================================ FILE: wali.py ================================================ # 小米直播:https://live.wali.com/fe import requests class WaLi: def __init__(self, rid): self.rid = rid def get_real_url(self): zuid = self.rid.split('_')[0] with requests.Session() as s: res = s.get(f'https://s.zb.mi.com/get_liveinfo?lid={self.rid}&zuid={zuid}').json() status = res['data']['status'] if status == 1: flv = res['data']['video']['flv'] return flv.replace('http', 'https') else: raise Exception('直播间不存在或未开播') def get_real_url(rid): try: wali = WaLi(rid) return wali.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入小米直播房间号:\n') print(get_real_url(r)) ================================================ FILE: woxiu.py ================================================ # 我秀直播:https://www.woxiu.com/ import requests class WoXiu: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 ' } url = f'https://m.woxiu.com/index.php?action=M/Live&do=LiveInfo&room_id={self.rid}' with requests.Session() as s: res = s.get(url, headers=headers) try: res = res.json() except Exception: raise Exception('直播间不存在') status = res['online'] if status: live_stream = res['live_stream'] return live_stream else: raise Exception('未开播') def get_real_url(rid): try: wx = WoXiu(rid) return wx.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入我秀直播房间号:\n') print(get_real_url(r)) ================================================ FILE: xunlei.py ================================================ # 迅雷直播:https://live.xunlei.com/global/index.html?id=0 import requests import hashlib import time from urllib.parse import urlencode class XunLei: def __init__(self, rid): self.rid = rid def get_real_url(self): url = 'https://biz-live-ssl.xunlei.com//caller' headers = { 'cookie': 'appid=1002' } _t = int(time.time() * 1000) u = '1002' f = '&*%$7987321GKwq' params = { '_t': _t, 'a': 'play', 'c': 'room', 'hid': 'h5-e70560ea31cc17099395c15595bdcaa1', 'uuid': self.rid, } data = urlencode(params) p = hashlib.md5(f'{u}{data}{f}'.encode('utf-8')).hexdigest() params['sign'] = p with requests.Session() as s: res = s.get(url, params=params, headers=headers).json() if res['result'] == 0: play_status = res['data']['play_status'] if play_status == 1: real_url = res['data']['data']['stream_pull_https'] return real_url else: raise Exception('未开播') else: raise Exception('直播间可能不存在') def get_real_url(rid): try: xl = XunLei(rid) return xl.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入迅雷直播房间号:\n') print(get_real_url(r)) ================================================ FILE: yangshipin.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/3 12:28 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com # CCTV-1: https://m.yangshipin.cn/video?type=1&vid=2000210103&pid=600001859 # 需要替换 headers 中登陆的 cookie # 目前网页版链接有效时间很短,且每个IP每天的请求数量有限制 # APP版本的链接放时间更长,但需要反编译获取ckey生成方式,以后再更新。 import binascii import ctypes import time import uuid from urllib.parse import parse_qs import requests from Crypto.Cipher import AES def aes_encrypt(text): """ AES加密 """ key = binascii.a2b_hex('4E2918885FD98109869D14E0231A0BF4') iv = binascii.a2b_hex('16B17E519DDD0CE5B79D7A63A4DD801C') pad = 16 - len(text) % 16 text = text + pad * chr(pad) text = text.encode() cipher = AES.new(key, AES.MODE_CBC, iv) encrypt_bytes = cipher.encrypt(text) return binascii.b2a_hex(encrypt_bytes).decode() class YangShiPin: def __init__(self, rid): var = parse_qs(rid) vid, = var['vid'] pid, = var['pid'] platform = 4330701 guid = 'ko7djb70_vbjvrg5gcm' txvlive_version = '3.0.37' tt = int(time.time()) jc = 'mg3c3b04ba' wu = f'|{vid}|{tt}|{jc}|{txvlive_version}|{guid}|{platform}|https://m.yangshipin.cn/|mozilla/5.0 (iphone; ' \ f'cpu||Mozilla|Netscape|Win32| ' u = 0 for i in wu: _char = ord(i) u = (u << 5) - u + _char u &= u & 0xffffffff bu = ctypes.c_int32(u).value xu = f'|{bu}{wu}' # ckey是个aes加密,CBC模式,pkcs7填充 ckey = ('--01' + aes_encrypt(xu)).upper() self.params = { 'cmd': 2, 'cnlid': vid, 'pla': 0, 'stream': 2, 'system': 1, 'appVer': '3.0.37', 'encryptVer': '8.1', 'qq': 0, 'device': 'PC', 'guid': 'ko7djb70_vbjvrg5gcm', 'defn': 'auto', 'host': 'yangshipin.cn', 'livepid': pid, 'logintype': 1, 'vip_status': 1, 'livequeue': 1, 'fntick': tt, 'tm': tt, 'sdtfrom': 113, 'platform': platform, 'cKey': ckey, 'queueStatus': 0, 'uhd_flag': 4, 'flowid': uuid.uuid4().hex, 'sphttps': 1, # 'callback': 'txvlive_videoinfoget_9046016361', } def get_real_url(self): headers = { 'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, ' 'like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', 'referer': 'https://m.yangshipin.cn/', 'cookie': '' } res = requests.get('https://liveinfo.yangshipin.cn/', headers=headers, params=self.params).json() url = res.get('playurl', 0) if url: return url else: return res def get_real_url(rid): try: ysp = YangShiPin(rid) return ysp.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('显示“无登录信息”,则需要填充cookie。请输入央视频地址:\n') print(get_real_url(r)) ================================================ FILE: yizhibo.py ================================================ # 获取一直播的真实流媒体地址。 import requests import re class YiZhiBo: def __init__(self, rid): """ 一直播需要传入直播间的完整地址 Args: rid:完整地址 """ self.rid = rid self.s = requests.Session() def get_real_url(self): try: res = self.s.get(self.rid).text play_url, status_code = re.findall(r'play_url:"(.*?)"[\s\S]*status:(\d+),', res)[0] if status_code == '10': return play_url else: raise Exception('未开播') except Exception: raise Exception('获取错误') def get_real_url(rid): try: yzb = YiZhiBo(rid) return yzb.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入一直播房间地址:\n') print(get_real_url(r)) ================================================ FILE: youku.py ================================================ # 获取@优酷轮播台@的真实流媒体地址。 # 优酷轮播台是优酷直播live.youku.com下的一个子栏目,轮播一些经典电影电视剧,个人感觉要比其他直播平台影视区的画质要好, # 而且没有平台水印和主播自己贴的乱七八糟的字幕遮挡。 # liveId 是如下形式直播间链接: # “https://vku.youku.com/live/ilproom?spm=a2hcb.20025885.m_16249_c_59932.d_11&id=8019610&scm=20140670.rcmd.16249.live_8019610”中的8019610字段。 import requests import time import hashlib import json class YouKu: def __init__(self, rid): """ 获取优酷轮播台的流媒体地址 Args: rid: 直播间url中id=8019610,其中id即为房间号 """ self.rid = rid self.s = requests.Session() def get_real_url(self): try: tt = str(int(time.time() * 1000)) data = json.dumps({'liveId': self.rid, 'app': 'Pc'}, separators=(',', ':')) url = 'https://acs.youku.com/h5/mtop.youku.live.com.livefullinfo/1.0/?appKey=24679788' cookies = self.s.get(url).cookies token = cookies.get_dict().get('_m_h5_tk')[0:32] sign = hashlib.md5(f'{token}&{tt}&24679788&{data}'.encode('utf-8')).hexdigest() params = { 't': tt, 'sign': sign, 'data': data } response = self.s.get(url, params=params).json() streamname = response.get('data').get('data').get('stream')[0].get('streamName') real_url = f'https://lvo-live.youku.com/vod2live/{streamname}_mp4hd2v3.m3u8?&expire=21600&psid=1&ups_ts=' \ f'{int(time.time())}&vkey= ' except Exception: raise Exception('请求错误') return real_url def get_real_url(rid): try: yk = YouKu(rid) return yk.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入优酷轮播台房间号:\n') print(get_real_url(r)) ================================================ FILE: yuanbobo.py ================================================ # 热猫直播:https://zhibo.yuanbobo.com/ import requests import re class YuanBoBo: def __init__(self, rid): self.rid = rid def get_real_url(self): with requests.Session() as s: res = s.get(f'https://zhibo.yuanbobo.com/{self.rid}').text stream_id = re.search(r"stream_id:\s+'(\d+)'", res) if stream_id: status = re.search(r"status:\s+'(\d)'", res).group(1) if status == '1': real_url = f'https://tliveplay.yuanbobo.com/live/{stream_id.group(1)}.m3u8' return real_url else: raise Exception('未开播') else: raise Exception('直播间不存在') def get_real_url(rid): try: th = YuanBoBo(rid) return th.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入热猫直播房间号:\n') print(get_real_url(r)) ================================================ FILE: yy.py ================================================ # 获取YY直播的真实流媒体地址。https://www.yy.com/1349606469 # 默认获取最高画质 import requests import re import json class YY: def __init__(self, rid): self.rid = rid def get_real_url(self): headers = { 'referer': f'https://wap.yy.com/mobileweb/{self.rid}', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/95.0.4638.69 Safari/537.36 ' } room_url = f'https://interface.yy.com/hls/new/get/{self.rid}/{self.rid}/1200?source=wapyy&callback=' with requests.Session() as s: res = s.get(room_url, headers=headers) if res.status_code == 200: data = json.loads(res.text[1:-1]) if data.get('hls', 0): xa = data['audio'] xv = data['video'] xv = re.sub(r'_0_\d+_0', '_0_0_0', xv) url = f'https://interface.yy.com/hls/get/stream/15013/{xv}/15013/{xa}?source=h5player&type=m3u8' res = s.get(url).json() real_url = res['hls'] return real_url else: raise Exception('未开播') else: raise Exception('直播间不存在') def get_real_url(rid): try: yy = YY(rid) return yy.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('输入YY直播房间号:\n') print(get_real_url(r)) ================================================ FILE: zhanqi.py ================================================ # 获取战旗直播(战旗TV)的真实流媒体地址。https://www.zhanqi.tv/lives # 默认最高画质 import json import re import requests class ZhanQi: def __init__(self, rid): """ 战旗直播间有两种:一种是普通直播间号为数字或字幕;另一种是官方的主题直播间,链接带topic。 所以先判断一次后从网页源代码里获取数字直播间号 Args: rid:直播间链接,从网页源码里获取真实数字rid """ self.s = requests.Session() res = self.s.get(rid).text self.rid = re.search(r'"code":"(\d+)"', res).group(1) def get_real_url(self): res = self.s.get(f'https://m.zhanqi.tv/api/static/v2.1/room/domain/{self.rid}.json') try: res = res.json() videoid = res['data']['videoId'] status = res['data']['status'] except (KeyError, json.decoder.JSONDecodeError): raise Exception('Incorrect rid') if status == '4': # 获取gid res = self.s.get('https://www.zhanqi.tv/api/public/room.viewer') try: res = res.json() gid = res['data']['gid'] except KeyError: raise Exception('Getting gid incorrectly') # 获取cdn_host res = self.s.get('https://umc.danuoyi.alicdn.com/dns_resolve_https?app=zqlive&host_key=alhdl-cdn.zhanqi.tv') cdn_host, *_ = res.json().get('redirect_domain') # 获取chain_key data = { 'stream': f'{videoid}.flv', 'cdnKey': 202, 'platform': 128, } headers = { 'cookie': f'gid={gid}', } res = self.s.post('https://www.zhanqi.tv/api/public/burglar/chain', data=data, headers=headers).json() chain_key = res['data']['key'] url = f'https://{cdn_host}/alhdl-cdn.zhanqi.tv/zqlive/{videoid}.flv?{chain_key}&playNum=68072487067' \ f'&gId={gid}&ipFrom=1&clientIp=&fhost=h5&platform=128' return url else: raise Exception('No streaming') def get_real_url(rid): try: zq = ZhanQi(rid) return zq.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': # 直播间链接类似:https://www.zhanqi.tv/topic/owl 或 https://www.zhanqi.tv/152600919 r = input('输入战旗直播间的链接:\n') print(get_real_url(r)) ================================================ FILE: zhibotv.py ================================================ # -*- coding: utf-8 -*- # @Time: 2021/5/13 20:27 # @Project: real-url # @Author: wbt5 # @Blog: https://wbt5.com import requests class ZhiBotv: def __init__(self, rid): """ 中国体育&新传宽频,直播间地址如:https://v.zhibo.tv/10007 Args: rid:房间号 """ self.rid = rid self.params = { 'token': '', 'roomId': self.rid, 'angleId': '', 'lineId': '', 'definition': 'hd', 'statistics': 'pc|web|1.0.0|0|0|0|local|5.0.1', } self.BASE_URL = 'https://rest.zhibo.tv/room/get-pull-stream-info-v430' self.HEADERS = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/95.0.4638.69 Safari/537.36 ', 'Referer': 'https://www.zhibo.tv/live/' } def get_real_url(self): """ no streaming 没开播; non-existent rid 房间号不存在; :return: url """ with requests.Session() as s: res = s.get(self.BASE_URL, params=self.params, headers=self.HEADERS).json() if 'hlsHUrl' in res['data']: url = res['data'].get('hlsHUrl') if url: return url else: raise Exception('no streaming') else: raise Exception('non-existent rid') def get_real_url(rid): try: zbtv = ZhiBotv(rid) return zbtv.get_real_url() except Exception as e: print('Exception:', e) return False if __name__ == '__main__': r = input('请输入中国体育房间号:\n') print(get_real_url(r))