diff --git a/Demo/v926_leave.txt b/Demo/v926_leave.txt new file mode 100644 index 0000000..4c7d69c --- /dev/null +++ b/Demo/v926_leave.txt @@ -0,0 +1,364 @@ +1 { + 1: "WebcastControlMessage" + 2 { + 1 { + 1: "WebcastControlMessage" + 2: 6902672961476774663 + 3: 6902629276546566925 + 4: 1607153789195 + 6: 1 + } + 2: 3 + } + 3: 6902672961476774663 +} +1 { + 1: "WebcastMemberMessage" + 2 { + 1 { + 1: "WebcastMemberMessage" + 2: 6902672961728662285 + 3: 6902629276546566925 + 6: 1 + 8 { + 1: "live_room_enter_toast" + 2: "{0:user} \346\235\245\344\272\206{1:string}" + 3 { + 1: "#de000000" + 4: 400 + } + 4 { + 1: 11 + 2 { + 1: "#61000000" + 4: 400 + } + 21 { + 1 { + 1: 2638466963214383 + 2: 1520817 + 3: "\350\213\261\345\256\207girl" + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/a15266741ef770c810e18e5e6d073da9~300x300.image" + } + 21 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + 22 { + 1: 60 + 2: 120 + } + 23 { + 6: 3 + 19 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + } + 24 { + 1 { + 4 { + 1: "\010\000\022\000" + } + } + } + 32: "" + 38: "1520817" + 46: "MS4wLjABAAAATNQnQSVI6ePiovK48LHJHvefLO_4RAmla1Hkn0GYTWc8oE5u0a0VZnmPM3VKnaSh" + 54: 3 + 61 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + } + } + } + } + 9: 1 + 10: 1 + 11: 42000 + } + 2 { + 1: 2638466963214383 + 2: 1520817 + 3: "\350\213\261\345\256\207girl" + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/a15266741ef770c810e18e5e6d073da9~300x300.image" + } + 21 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + 22 { + 1: 60 + 2: 120 + } + 23 { + 6: 3 + 19 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + } + 24 { + 1 { + 4 { + 1 { + 1: 0 + 2: "" + } + } + } + } + 32: "" + 38: "1520817" + 46: "MS4wLjABAAAATNQnQSVI6ePiovK48LHJHvefLO_4RAmla1Hkn0GYTWc8oE5u0a0VZnmPM3VKnaSh" + 54: 3 + 61 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + } + 3: 31 + 10: 1 + 14: "0\344\272\272" + 18 { + 1: "live_room_enter_toast" + 2: "{0:user} \346\235\245\344\272\206{1:string}" + 3 { + 1: "#de000000" + 4: 400 + } + 4 { + 1: 11 + 2 { + 1: "#61000000" + 4: 400 + } + 21 { + 1 { + 1: 2638466963214383 + 2: 1520817 + 3: "\350\213\261\345\256\207girl" + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/a15266741ef770c810e18e5e6d073da9~300x300.image" + } + 21 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + 22 { + 1: 60 + 2: 120 + } + 23 { + 6: 3 + 19 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + } + 24 { + 1 { + 4 { + 1 { + 1: 0 + 2: "" + } + } + } + } + 32: "" + 38: "1520817" + 46: "MS4wLjABAAAATNQnQSVI6ePiovK48LHJHvefLO_4RAmla1Hkn0GYTWc8oE5u0a0VZnmPM3VKnaSh" + 54: 3 + 61 { + 1: "http://p1-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-xgcdn.byteimg.com/img/webcast/3_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/3_xigua_honor_level.png" + 3: 16 + 4: 30 + 6: 1 + 7: "sslocal://webcast_webview?url=https%3A%2F%2Fwebcast.ixigua.com%2Ffalcon%2Fwebcast_xigua%2Fpage%2Fhonor_level%2Fuser%2Findex.html&type=fullscreen&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast" + } + } + } + } + } + } + 3: 6902672961728662285 +} +1 { + 1: "WebcastMemberMessage" + 2 { + 1 { + 1: "WebcastMemberMessage" + 2: 6902672961866681091 + 3: 6902629276546566925 + 6: 1 + 8 { + 1: "live_room_enter_toast" + 2: "{0:user} \346\235\245\344\272\206{1:string}" + 3 { + 1: "#de000000" + 4: 400 + } + 4 { + 1: 11 + 2 { + 1: "#61000000" + 4: 400 + } + 21 { + 1 { + 1: 1015537608169303 + 3: "\347\224\250\346\210\267525366763846" + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3791/5070639578~120x256.image" + } + 22 { + 1: 31 + } + 23 { + 19: "" + } + 24 { + 1 { + 4 { + 1: "\010\000\022\000" + } + } + } + 32: "" + 38: "0" + 46: "MS4wLjABAAAAXDp4yUHFF_sA3Uf9T4OPkW0dk-9SUYxbFNFrs7CcyhAcjYzdsYFYE5vuUdaHbo9R" + 54: 3 + } + } + } + } + 9: 1 + 10: 1 + 11: 42000 + } + 2 { + 1: 1015537608169303 + 3: "\347\224\250\346\210\267525366763846" + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3791/5070639578~120x256.image" + } + 22 { + 1: 31 + } + 23 { + 19: "" + } + 24 { + 1 { + 4 { + 1 { + 1: 0 + 2: "" + } + } + } + } + 32: "" + 38: "0" + 46: "MS4wLjABAAAAXDp4yUHFF_sA3Uf9T4OPkW0dk-9SUYxbFNFrs7CcyhAcjYzdsYFYE5vuUdaHbo9R" + 54: 3 + } + 10: 1 + 14: "0\344\272\272" + 18 { + 1: "live_room_enter_toast" + 2: "{0:user} \346\235\245\344\272\206{1:string}" + 3 { + 1: "#de000000" + 4: 400 + } + 4 { + 1: 11 + 2 { + 1: "#61000000" + 4: 400 + } + 21 { + 1 { + 1: 1015537608169303 + 3: "\347\224\250\346\210\267525366763846" + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3791/5070639578~120x256.image" + } + 22 { + 1: 31 + } + 23 { + 19: "" + } + 24 { + 1 { + 4 { + 1 { + 1: 0 + 2: "" + } + } + } + } + 32: "" + 38: "0" + 46: "MS4wLjABAAAAXDp4yUHFF_sA3Uf9T4OPkW0dk-9SUYxbFNFrs7CcyhAcjYzdsYFYE5vuUdaHbo9R" + 54: 3 + } + } + } + } + } + 3: 6902672961866681091 +} +2: "1607153789923_6902672963397497753_6902669995575083008_1" +3: 1000 +4: 1607153789923 +5: "fetch_time:1607153789923|start_time:0|fetch_id:6902672959102530453|flag:0|seq:2684|next_cursor:1607153789923_6902672963397497753_6902669995575083008_1" diff --git a/api.py b/api.py index d7131ce..c4f92a5 100644 --- a/api.py +++ b/api.py @@ -398,6 +398,9 @@ class XiGuaLiveApi: elif _each.method == "WebcastChatMessage": _chat = Chat(_each.raw) self.onChat(_chat) + elif _each.method == "WebcastControlMessage": + # 下播的时候会有个这个 + self.onLeave(None) elif _each.method == "WebcastSocialMessage": _socialMessage = SocialMessage() _socialMessage.ParseFromString(_each.raw)