diff --git a/Demo/242_.txt b/Demo/242_.txt new file mode 100644 index 0000000..90eefb4 Binary files /dev/null and b/Demo/242_.txt differ diff --git a/Demo/v926.txt b/Demo/v926.txt new file mode 100644 index 0000000..12953eb --- /dev/null +++ b/Demo/v926.txt @@ -0,0 +1,1036 @@ +1 { + 1: "WebcastRoomUserSeqMessage" + 2 { + 1 { + 1: "WebcastRoomUserSeqMessage" + 2: 6902660236239770637 + 3: 6902629276546566925 + 4: 1607150826387 + } + 2 { + 1: 1984 + 2 { + 1: 79502271546 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/803c29f47c86cdbd45c07906580e4d3c~300x300.image" + } + 23: "" + 54: 3 + } + 3: 1 + } + 2 { + 1: 427 + 2 { + 1: 108051433370 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/697760dde8254972bf55e41cab7d1a1c~120x256.image" + } + 23: "" + 54: 3 + } + 3: 2 + } + 2 { + 1: 30 + 2 { + 1: 3783061794 + 9 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/user-avatar/b55b4396750d61791d9f5e0e1af0bafb~300x300.image" + } + 23: "" + 54: 3 + } + 3: 3 + } + 2 { + 1: 2 + 2 { + 1: 59362305369 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/user-avatar/022cda211559abca5bf59b18031e1209~300x300.image" + } + 23: "" + 54: 3 + } + 3: 4 + } + 2 { + 2 { + 1: 95804246658 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3795/3047680722~120x256.image" + } + 23: "" + 54: 3 + } + 3: 5 + } + 2 { + 2 { + 1: 94914478549 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/7b93001a3c7896535ae8~120x256.image" + } + 23: "" + 54: 3 + } + 3: 6 + } + 2 { + 2 { + 1: 94477539828 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3795/3047680722~120x256.image" + } + 23: "" + 54: 3 + } + 3: 7 + } + 2 { + 2 { + 1: 93179941412 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/bd656c13c6f14ffb8127ddcf8c8cb21f~120x256.image" + } + 23: "" + 54: 3 + } + 3: 8 + } + 2 { + 2 { + 1: 905589935842622 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/motor-img/127a85fa40547a48e679119bcb473735~120x256.image" + } + 23: "" + 54: 3 + } + 3: 9 + } + 2 { + 2 { + 1: 839660494435310 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/8a74cae3606b4966bc7f56aff2caa1a7~120x256.image" + } + 23: "" + 54: 3 + } + 3: 10 + } + 2 { + 2 { + 1: 83543874787 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3795/3044413937~120x256.image" + } + 23: "" + 54: 3 + } + 3: 11 + } + 2 { + 2 { + 1: 78538254685 + 9 { + 1: "https://p3-xg.bytecdn.cn/thumb/71a500152bcac78245a5" + 2: "71a500152bcac78245a5" + } + 23: "" + 54: 3 + } + 3: 12 + } + 2 { + 2 { + 1: 71150599834 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/mosaic-legacy/6588000ac14dceb38964~120x256.image" + } + 23: "" + 54: 3 + } + 3: 13 + } + 2 { + 2 { + 1: 70010562170272 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/1247d69918894d50a680ef2ee4e01261~120x256.image" + } + 23: "" + 54: 3 + } + 3: 14 + } + 2 { + 2 { + 1: 69957399851 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3795/3033762272~120x256.image" + } + 23: "" + 54: 3 + } + 3: 15 + } + 2 { + 2 { + 1: 6915268761 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3795/3033762272~120x256.image" + } + 23: "" + 54: 3 + } + 3: 16 + } + 2 { + 2 { + 1: 65755991705 + 9 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/pgc-image/3d4843d334484ad8b8bc689df1e961fc~120x256.image" + } + 23: "" + 54: 3 + } + 3: 17 + } + 2 { + 2 { + 1: 64056133129 + 9 { + 1: "https://sf1-ttcdn-tos.pstatp.com/img/mosaic-legacy/3793/3131589739~120x256.image" + } + 23: "" + 54: 3 + } + 3: 18 + } + 2 { + 2 { + 1: 63816359213 + 2: 1126408 + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/pgc-image/d5861d20b69644bfbd213158a223ca2d~120x256.image" + } + 23: "" + 54: 3 + } + 3: 19 + } + 2 { + 2 { + 1: 60607255009 + 9 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/user-avatar/9bd822870a9269ea2e0e8b25ecaa17f7~300x300.image" + } + 23: "" + 54: 3 + } + 3: 20 + } + 3: 66 + 4: "66\344\272\272" + 6: 66 + 7: 18446744073709551615 + } + 3: 6902660236239770637 +} +1 { + 1: "LinkMicMethod" + 2 { + 1 { + 1: "LinkMicMethod" + 2: 6902659513002937096 + 3: 6902629276546566925 + 4: 1607150826525 + } + 2: 202 + 8: 6902638311677233933 + 17 { + 1: 166 + 2: 4494412618925467 + 3: 15 + } + 17 { + 1: 100 + 2: 61788610240 + 3: 4 + } + } + 3: 6902659513002937096 +} +1 { + 1: "WebcastLinkMicMethod" + 2 { + 1 { + 1: "WebcastLinkMicMethod" + 2: 6902659513002953480 + 3: 6902629276546566925 + 4: 1607150826549 + } + 2: 202 + 8: 6902638311677233933 + 17 { + 1: 166 + 2: 4494412618925467 + 3: 15 + } + 17 { + 1: 100 + 2: 61788610240 + 3: 4 + } + } + 3: 6902659513002953480 +} +1 { + 1: "WebcastLinkMicArmiesMethod" + 2 { + 1 { + 1: "WebcastLinkMicArmiesMethod" + 2: 6902659513002969864 + 3: 6902629276546566925 + 4: 1607150826568 + } + 2 { + 1: 4494412618925467 + 2 { + 1 { + 1: 98009868569 + 2: 166 + 3: "\345\215\201\345\271\264\346\272\253\345\246\202\347\216\211" + 4 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/user-avatar/db759b964ee48808b6917e708a4ca3f2~300x300.image" + } + } + } + } + 2 { + 1: 61788610240 + 2 { + 1 { + 1: 108051433370 + 2: 100 + 3: "AK\345\216\213\344\270\215\344\275\217" + 4 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/697760dde8254972bf55e41cab7d1a1c~120x256.image" + } + } + } + } + 3 { + 1 { + 1: 108051433370 + 2: 100 + 3: "AK\345\216\213\344\270\215\344\275\217" + 4 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/697760dde8254972bf55e41cab7d1a1c~120x256.image" + } + } + } + 3 { + 1 { + 1: 98009868569 + 2: 166 + 3: "\345\215\201\345\271\264\346\272\253\345\246\202\347\216\211" + 4 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/user-avatar/db759b964ee48808b6917e708a4ca3f2~300x300.image" + } + } + } + } + 3: 6902659513002969864 +} +1 { + 1: "WebcastGiftMessage" + 2 { + 1 { + 1: "WebcastGiftMessage" + 2: 6902656139473996551 + 3: 6902629276546566925 + 4: 1607150826640 + 6: 1 + 7: "\346\256\212\345\226\275:\351\200\201\347\273\231\344\270\273\346\222\255 1\344\270\252\344\273\231\345\245\263\346\243\222" + 8 { + 1: "webcast_aweme_gift_send_message" + 2: "{0:user} \351\200\201\345\207\272{1:gift} {2:string}" + 3 { + 1: "#ffff9d5c" + 4: 400 + } + 4 { + 1: 11 + 2 { + 1: "#ffffd600" + 4: 400 + } + 21 { + 1 { + 1: 79502271546 + 3: "\346\256\212\345\226\275" + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/803c29f47c86cdbd45c07906580e4d3c~300x300.image" + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/31_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" + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_8.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 8 + } + } + 22 { + 1: 5 + 2: 13 + } + 23 { + 6: 31 + 19 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/31_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 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: 8 + 3: 1 + 4 { + 1: "\010\002\022\337\001\nYhttp://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image\nYhttp://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image\022\"webcast/xigua_fansclub_medal_8.png\0300 \226\001" + 2: "\345\247\232\345\247\232\347\220\263" + } + 6: 61788610240 + } + } + 32 { + 2: 1 + } + 38: "0" + 46: "MS4wLjABAAAAqmdx9h_Segy3z6GzB1laIXgZOeuoGId021Qy7zcRrAI" + 54: 3 + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/31_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" + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_8.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 8 + } + } + } + } + } + 4 { + 1: 12 + 22 { + 1: 884 + 2 { + 1: "live_gift_884" + 2: "\344\273\231\345\245\263\346\243\222" + } + } + } + 4 { + 1: 1 + 2 { + 1: "#ffff9d5c" + 4: 400 + } + 11 { + 15: 49 + } + } + } + 11: 31000 + } + 2: 884 + 3: 4058224 + 4: 1 + 5: 1 + 6: 1 + 7 { + 1: 79502271546 + 3: "\346\256\212\345\226\275" + 9 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/803c29f47c86cdbd45c07906580e4d3c~300x300.image" + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/31_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" + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_8.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 8 + } + } + 22 { + 1: 5 + 2: 13 + } + 23 { + 6: 31 + 19 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/31_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 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: 8 + 3: 1 + 4 { + 1 { + 1: 2 + 2 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_8.png" + 3: 48 + 4: 150 + } + } + 2: "\345\247\232\345\247\232\347\220\263" + } + 6: 61788610240 + } + } + 32 { + 2: 1 + } + 38: "0" + 46: "MS4wLjABAAAAqmdx9h_Segy3z6GzB1laIXgZOeuoGId021Qy7zcRrAI" + 54: 3 + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/31_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/31_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" + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_8.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_8.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 8 + } + } + } + 12: 145200 + 13: 9081 + 14 { + 1: "\377\377\377\377\377\377\377\377\377\001\377\377\377\377\377\377\377\377\377\001\310\001\226\001" + 2: 1 + 3: 3 + } + 15 { + 1 { + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/cee39b70eb2c617083e7ab908779562f~tplv-obj.png" + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/cee39b70eb2c617083e7ab908779562f~tplv-obj.png" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/cee39b70eb2c617083e7ab908779562f~tplv-obj.png" + 2: "webcast/cee39b70eb2c617083e7ab908779562f" + 5: "#FFF1EB" + } + 2: "\351\200\201\345\207\272\344\273\231\345\245\263\346\243\222" + 5: 884 + 11: 2 + 12: 166 + 13: 1 + 14: 846 + 16: "\344\273\231\345\245\263\346\243\222" + 21 { + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/cee39b70eb2c617083e7ab908779562f~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/cee39b70eb2c617083e7ab908779562f~tplv-obj.png" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/cee39b70eb2c617083e7ab908779562f~tplv-obj.png" + 2: "webcast/cee39b70eb2c617083e7ab908779562f" + 5: "#A3967C" + } + 38: 32 + } + 17: 4 + 18 { + 1 { + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/userlabel_regular_chat.png~tplv-obj.image" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/userlabel_regular_chat.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/userlabel_regular_chat.png~tplv-obj.image" + 2: "webcast/userlabel_regular_chat.png" + 5: "#E0BCD4" + } + 2: 218400 + } + 19: "" + } + 3: 6902656139473996551 +} +1 { + 1: "LinkMicMethod" + 2 { + 1 { + 1: "LinkMicMethod" + 2: 6902659570053843715 + 3: 6902629276546566925 + 4: 1607150826661 + } + 2: 202 + 8: 6902638311677233933 + 17 { + 1: 166 + 2: 4494412618925467 + 3: 15 + } + 17 { + 1: 266 + 2: 61788610240 + 3: 4 + } + } + 3: 6902659570053843715 +} +1 { + 1: "WebcastSunDailyRankMessage" + 2 { + 1 { + 1: "WebcastSunDailyRankMessage" + 2: 6902660235970991111 + 3: 6902629276546566925 + 4: 1607150826682 + 6: 1 + } + 2: "\345\260\217\346\227\266\346\246\234\347\254\25464\345\220\215" + 5: 1 + 8: "2" + 10: 64 + 11: "64\345\220\215\n\345\260\217\346\227\266\346\246\234" + 17: 1607148000 + 18: 774 + } + 3: 6902660235970991111 +} +1 { + 1: "WebcastLinkMicMethod" + 2 { + 1 { + 1: "WebcastLinkMicMethod" + 2: 6902659570053860099 + 3: 6902629276546566925 + 4: 1607150826682 + } + 2: 202 + 8: 6902638311677233933 + 17 { + 1: 166 + 2: 4494412618925467 + 3: 15 + } + 17 { + 1: 266 + 2: 61788610240 + 3: 4 + } + } + 3: 6902659570053860099 +} +1 { + 1: "WebcastSunDailyRankMessage" + 2 { + 1 { + 1: "WebcastSunDailyRankMessage" + 2: 6902660235970974727 + 3: 6902629276546566925 + 4: 1607150826681 + 6: 1 + } + 2: "\345\260\217\346\227\266\346\246\234\350\267\235\344\270\212\344\270\200\345\220\21515\346\230\237\345\205\211" + 3: 5 + 4: "\345\260\217\346\227\266\346\246\234\347\254\25464\345\220\215" + 5: 6 + 8: "1" + 10: 64 + 13: 1 + 17: 1607148000 + 18: 774 + } + 3: 6902660235970974727 +} +1 { + 1: "WebcastLinkMicArmiesMethod" + 2 { + 1 { + 1: "WebcastLinkMicArmiesMethod" + 2: 6902659570053925635 + 3: 6902629276546566925 + 4: 1607150826756 + } + 2 { + 1: 4494412618925467 + 2 { + 1 { + 1: 98009868569 + 2: 166 + 3: "\345\215\201\345\271\264\346\272\253\345\246\202\347\216\211" + 4 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/user-avatar/db759b964ee48808b6917e708a4ca3f2~300x300.image" + } + } + } + } + 2 { + 1: 61788610240 + 2 { + 1 { + 1: 79502271546 + 2: 166 + 3: "\346\256\212\345\226\275" + 4 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/803c29f47c86cdbd45c07906580e4d3c~300x300.image" + } + } + 1 { + 1: 108051433370 + 2: 100 + 3: "AK\345\216\213\344\270\215\344\275\217" + 4 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/697760dde8254972bf55e41cab7d1a1c~120x256.image" + } + } + } + } + 3 { + 1 { + 1: 79502271546 + 2: 166 + 3: "\346\256\212\345\226\275" + 4 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/user-avatar/803c29f47c86cdbd45c07906580e4d3c~300x300.image" + } + } + 1 { + 1: 108051433370 + 2: 100 + 3: "AK\345\216\213\344\270\215\344\275\217" + 4 { + 1: "https://sf3-ttcdn-tos.pstatp.com/img/tos-cn-i-0022/697760dde8254972bf55e41cab7d1a1c~120x256.image" + } + } + } + 3 { + 1 { + 1: 98009868569 + 2: 166 + 3: "\345\215\201\345\271\264\346\272\253\345\246\202\347\216\211" + 4 { + 1: "https://sf6-ttcdn-tos.pstatp.com/img/user-avatar/db759b964ee48808b6917e708a4ca3f2~300x300.image" + } + } + } + } + 3: 6902659570053925635 +} +1 { + 1: "WebcastMemberMessage" + 2 { + 1 { + 1: "WebcastMemberMessage" + 2: 6902660236532992772 + 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: 107713382089 + 3: "\351\235\222\346\230\245\345\271\264\345\215\2165263" + 4: 1 + 9 { + 1: "https://p1.pstatp.com/thumb/da660002a98947d1dc7c" + 2: "da660002a98947d1dc7c" + } + 21 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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 { + 2: 6 + } + 23 { + 6: 10 + 19 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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: "0" + 46: "MS4wLjABAAAASLx8I_7A2xxPegu6MY0VsPxtBP-kpfFxZHDTQOJKV_w" + 54: 3 + 61 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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: 107713382089 + 3: "\351\235\222\346\230\245\345\271\264\345\215\2165263" + 4: 1 + 9 { + 1: "https://p1.pstatp.com/thumb/da660002a98947d1dc7c" + 2: "da660002a98947d1dc7c" + } + 21 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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 { + 2: 6 + } + 23 { + 6: 10 + 19 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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: "0" + 46: "MS4wLjABAAAASLx8I_7A2xxPegu6MY0VsPxtBP-kpfFxZHDTQOJKV_w" + 54: 3 + 61 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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: 66 + 10: 1 + 14: "66\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: 107713382089 + 3: "\351\235\222\346\230\245\345\271\264\345\215\2165263" + 4: 1 + 9 { + 1: "https://p1.pstatp.com/thumb/da660002a98947d1dc7c" + 2: "da660002a98947d1dc7c" + } + 21 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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 { + 2: 6 + } + 23 { + 6: 10 + 19 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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: "0" + 46: "MS4wLjABAAAASLx8I_7A2xxPegu6MY0VsPxtBP-kpfFxZHDTQOJKV_w" + 54: 3 + 61 { + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/10_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/10_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: 6902660236532992772 +} +2: "1607150827486_6902660237409396116_1_1" +3: 1000 +4: 1607150827486 +5: "fetch_time:1607150827486|start_time:0|fetch_id:6902660237409396104|flag:0|seq:87|next_cursor:1607150827486_6902660237409396116_1_1" diff --git a/Demo/v926_fg.txt b/Demo/v926_fg.txt new file mode 100644 index 0000000..fa8ad9d --- /dev/null +++ b/Demo/v926_fg.txt @@ -0,0 +1,256 @@ +1 { + 1: "WebcastChatMessage" + 2 { + 1 { + 1: "WebcastChatMessage" + 2: 6902669212519992068 + 3: 6902629276546566925 + 6: 1 + 8 { + 1: "webcast_chat_display_text" + 2: "{0:user}{1:string}" + 3 { + 1: "#ff36c0cf" + 4: 400 + } + 4 { + 1: 11 + 2 { + 1: "#60000000" + 4: 400 + } + 21 { + 1 { + 1: 5518138898 + 3: "\345\247\232\345\247\232\347\220\263\347\232\2042\345\247\220\345\244\253" + 4: 1 + 9 { + 1: "https://p1-dy.bytexservice.com/img/user-avatar/deb96a5e7e07f60a613531670a570736~300x300.image" + } + 21 { + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/25_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&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast&type=fullscreen" + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_15.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 15 + } + } + 22 { + 1: 13 + 2: 86 + 3: 2 + } + 23 { + 6: 25 + 19 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/25_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&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast&type=fullscreen" + } + } + 24 { + 1 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: 15 + 3: 1 + 4 { + 1: "\010\002\022\342\001\nZhttp://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image\nZhttp://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image\022#webcast/xigua_fansclub_medal_15.png\0300 \226\001" + 2: "\345\247\232\345\247\232\347\220\263" + } + 6: 61788610240 + } + } + 32 { + 2: 1 + } + 38: "0" + 46: "MS4wLjABAAAAKkWCgUKAN3GtNdQ0jqr8zAt3KtIc9kAc1GaJ32VcH3E" + 54: 3 + 61 { + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/25_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&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast&type=fullscreen" + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_15.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 15 + } + } + } + 2: 1 + } + } + 4 { + 1: 1 + 11: "@\345\247\232\345\256\266\344\272\214\345\247\221\345\207\211 \346\210\221\345\211\215\345\244\251\346\235\245\346\267\261\345\234\263\344\272\206" + } + } + 11: 31003 + } + 2 { + 1: 5518138898 + 3: "\345\247\232\345\247\232\347\220\263\347\232\2042\345\247\220\345\244\253" + 4: 1 + 9 { + 1: "https://p1-dy.bytexservice.com/img/user-avatar/deb96a5e7e07f60a613531670a570736~300x300.image" + } + 21 { + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/25_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&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast&type=fullscreen" + } + 21 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_15.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 15 + } + } + 22 { + 1: 13 + 2: 86 + 3: 2 + } + 23 { + 6: 25 + 19 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/25_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&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast&type=fullscreen" + } + } + 24 { + 1 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: 15 + 3: 1 + 4 { + 1 { + 1: 2 + 2 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_15.png" + 3: 48 + 4: 150 + } + } + 2: "\345\247\232\345\247\232\347\220\263" + } + 6: 61788610240 + } + } + 32 { + 2: 1 + } + 38: "0" + 46: "MS4wLjABAAAAKkWCgUKAN3GtNdQ0jqr8zAt3KtIc9kAc1GaJ32VcH3E" + 54: 3 + 61 { + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_admin_badge_v2.png~tplv-obj.image" + 2: "webcast/xigua_admin_badge_v2.png" + 3: 16 + 4: 28 + 6: 3 + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 1: "http://p9-webcast-ttcdn.byteimg.com/img/webcast/25_xigua_honor_level.png~tplv-obj.png" + 2: "webcast/25_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&hide_nav_bar=1&hide_status_bar=0&__live_platform__=webcast&type=fullscreen" + } + 61 { + 1: "http://p1-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/xigua_fansclub_medal_15.png~tplv-obj.image" + 2: "webcast/xigua_fansclub_medal_15.png" + 6: 7 + 8 { + 1: "\345\247\232\345\247\232\347\220\263" + 2: "#FFFFFF" + 3: 15 + } + } + } + 3: "@\345\247\232\345\256\266\344\272\214\345\247\221\345\207\211 \346\210\221\345\211\215\345\244\251\346\235\245\346\267\261\345\234\263\344\272\206" + 9 { + 1 { + 1: "http://p3-webcast-ttcdn.byteimg.com/img/webcast/userlabel_regular_chat.png~tplv-obj.image" + 1: "http://p6-webcast-ttcdn.byteimg.com/img/webcast/userlabel_regular_chat.png~tplv-obj.image" + 2: "webcast/userlabel_regular_chat.png" + 5: "#E0BCD4" + } + 2: 11 + } + } + 3: 6902669212519992068 +} +2: "1607153101490_6902670004165030044_6902669995575083008_1" +3: 1000 +4: 1607153101490 +5: "fetch_time:1607153101490|start_time:0|fetch_id:6902670004165030042|flag:0|seq:2080|next_cursor:1607153101490_6902670004165030044_6902669995575083008_1" diff --git a/README.md b/README.md index 40639fb..545aa97 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ### 西瓜直播弹幕接口```api.py``` -> - 基于安卓9.1.8 +> - 基于安卓9.2.6 ### 西瓜直播弹幕助手--礼物端```WinMain.py``` diff --git a/Struct/Gift.py b/Struct/Gift.py index 21cc0d0..e154c99 100644 --- a/Struct/Gift.py +++ b/Struct/Gift.py @@ -4,13 +4,11 @@ from XiguaMessage_pb2 import GiftMessage class Gift: - roomID = 0 giftList = {} def __init__(self, json=None): self.ID = 0 self.count = 0 - self.amount = 0 self.user = None self.isFinished = False self.backupName = None @@ -31,10 +29,6 @@ class Gift: def parse(self, json): self.user = User(json) - if "common" in json and json["common"] is not None: - if Gift.roomID != int(json["common"]["room_id"]): - Gift.roomID = int(json["common"]["room_id"]) - self.update() if "extra" in json and json["extra"] is not None: if "present_info" in json["extra"] and json["extra"]['present_info'] is not None: self.ID = int(json["extra"]['present_info']['id']) @@ -42,21 +36,6 @@ class Gift: elif "present_end_info" in json["extra"] and json["extra"]['present_end_info'] is not None: self.ID = int(json["extra"]['present_end_info']['id']) self.count = json["extra"]['present_end_info']['count'] - if self.ID != 0 and self.ID in self.giftList: - self.amount = self.giftList[self.ID]['diamond_count'] * self.count - else: - self.update() - - @classmethod - def update(cls): - p = requests.get("https://i.snssdk.com/videolive/gift/get_gift_list?room_id={roomID}" - "&version_code=800&device_platform=android".format(roomID=Gift.roomID)) - d = p.json() - if "gift_info" not in d: - print("错误:礼物更新失败") - else: - for i in d["gift_info"]: - cls.addGift(i) def isAnimate(self): if self.ID != 0 and self.ID in self.giftList: diff --git a/WinMain.py b/WinMain.py index 06aa169..6f1ff72 100644 --- a/WinMain.py +++ b/WinMain.py @@ -196,7 +196,7 @@ if __name__ == "__main__": name = sys.argv[1] resetColor() print("西瓜直播礼物助手 by JerryYan") - print("接口版本9.1.8") + print("接口版本9.2.6") print("搜索【", name, "】", end="\t", flush=True) api = WinMain(name) if not api.isValidUser: diff --git a/api.py b/api.py index 0939651..d7131ce 100644 --- a/api.py +++ b/api.py @@ -5,7 +5,6 @@ from Struct.MemberMsg import MemberMsg from Struct.User import User from Struct.Gift import Gift from Struct.Chat import Chat -from Struct.Lottery import Lottery import requests import time from datetime import datetime, timedelta @@ -14,13 +13,13 @@ from XiguaMessage_pb2 import FansClubMessage, SocialMessage DEBUG = False COMMON_GET_PARAM = ( - "&iid=844059075938396&device_id=71008241150&channel=xiaomi&aid=32&app_name=video_article&version_code=918" - "&version_name=9.1.8&device_platform=android&ab_version=668852,668853,668858,668851,668859,668856,668855," + "&iid=844059075938396&device_id=71008241150&channel=xiaomi&aid=32&app_name=video_article&version_code=926" + "&version_name=9.2.6&device_platform=android&ab_version=668852,668853,668858,668851,668859,668856,668855," "668854,1477978,994679,2186472,1477978,1189797,1635895,1631832,994822,900042,956074,1143356,1046292,1481027," "929436,994679,1419059,1073579,668854,1143441,668852,668853,941090,668858,668851,668859,668856,1639440,1630487&" "device_typeMI+9&device_type=MI 9&device_brand=Xiaomi&language=zh" - "&os_api=29&os_version=10&openudid=4aeb1e2b627697be&manifest_version_code=518&update_version_code=91806" - "&_rticket={TIMESTAMP:.0f}&_rticket={TIMESTAMP:.0f}&cdid_ts={TIMESTAMP:.0f}&fp=a_fake_fp&tma_jssdk_version=1790001" + "&os_api=29&os_version=10&openudid=4aeb1e2b627697be&manifest_version_code=518&update_version_code=92609" + "&_rticket={TIMESTAMP:.0f}&_rticket={TIMESTAMP:.0f}&cdid_ts={TIMESTAMP:.0f}&fp=a_fake_fp&tma_jssdk_version=1830001" "&rom_version=miui_V12_V12.0.5.0.QFACNXM&oaid=693ea85657ef38ca" "&cdid=ed4295e8-5d9a-4cb9-b2a2-04009a3baa2d&oaid=a625f466e0975d42") SEARCH_USER_API = ( @@ -31,16 +30,19 @@ SEARCH_USER_API = ( '&ab_param={{"is_show_filter_feature": 1, "is_hit_new_ui": 1}}' "&search_start_time={TIMESTAMP:.0f}&from=live&en_qc=1&pd=xigua_live&ssmix=a{COMMON}&keyword={keyword}") USER_INFO_API = "https://api100-quic-c-hl.ixigua.com/video/app/user/home/v7/?to_user_id={userId}{COMMON}" -ROOM_INFO_API = ("https://webcast3.ixigua.com/webcast/room/enter/?room_id={roomId}&webcast_sdk_version=1350" +ROOM_INFO_API = ("https://webcast3-normal-c-hl.ixigua.com/webcast/room/enter/?room_id={roomId}&webcast_sdk_version=1350" "&webcast_language=zh&webcast_locale=zh_CN&pack_level=4{COMMON}") -DANMAKU_GET_API = ("https://webcast3.ixigua.com/webcast/room/{roomId}/_fetch_message_polling/?webcast_sdk_version=1350" - "&webcast_language=zh&webcast_locale=zh_CN{COMMON}") -GIFT_DATA_API = ("https://webcast.ixigua.com/webcast/gift/list/?room_id={roomId}&fetch_giftlist_from=2" - "&webcast_sdk_version=1350&webcast_language=zh&webcast_locale=zh_CN{COMMON}") +DANMAKU_GET_API = ("https://webcast3-normal-c-hl.ixigua.com/webcast/room/{roomId}/_fetch_message_polling/?" + "webcast_sdk_version=1350&webcast_language=zh&webcast_locale=zh_CN{COMMON}") +GIFT_DATA_API = ("https://webcast3-normal-c-hl.ixigua.com/webcast/gift/list/?room_id={roomId}&to_room_id={roomId}&" + "gift_scene=1&fetch_giftlist_from=2¤t_network_quality_info={{}}" + "&webcast_sdk_version=1790&webcast_language=zh&webcast_locale=zh_CN{COMMON}") COMMON_HEADERS = { "sdk-version": '2', "passport-sdk-version": "19", - "User-Agent": "Dalvik/2.1.0 (Linux; U; Android 9) VideoArticle/9.1.8 cronet/TTNetVersion:b97574c0 2020-09-24", + "X-SS-DP": "32", + "User-Agent": "Dalvik/2.1.0 (Linux; U; Android 10) VideoArticle/9.2.6 cronet/TTNetVersion:828f6f3c 2020-09-06 " + "QuicVersion:7aee791b 2020-06-05", "Accept-Encoding": "gzip, deflate" } @@ -71,7 +73,6 @@ class XiGuaLiveApi: self._rawRoomInfo = {} self.roomID = 0 self.roomPopularity = 0 - self.lottery = None self.s = requests.session() self.s.headers.update(COMMON_HEADERS) self._updRoomAt = datetime.fromtimestamp(0) @@ -231,13 +232,6 @@ class XiGuaLiveApi: print("消息 :", "主播离开了") self.updRoomInfo() - def onLottery(self, i: Lottery): - """ - 中奖的内容 - :param i: - """ - print("中奖消息 :", i) - def _checkUsernameIsMatched(self, compare=None): """ 验证主播名字是自己想要的那个 @@ -320,11 +314,6 @@ class XiGuaLiveApi: self._rawRoomInfo = d["user_info"]['live_info'] if self.isLive: self.roomID = d["user_info"]['live_info']['room_id'] - # 处理抽奖事件 - l = Lottery(self._rawRoomInfo) - if l.isActive: - # 因为现在每个房间只能同时开启一个抽奖,所以放一个就行了 - self.lottery = l return True def _getRoomInfo(self, force=False): @@ -348,7 +337,6 @@ class XiGuaLiveApi: self.isLive = d["data"]["status"] == 2 self._updRoomAt = datetime.now() self._updateRoomPopularity(d) - Gift.roomID = self.roomID return self.isLive def updRoomInfo(self, force=False): @@ -372,12 +360,9 @@ class XiGuaLiveApi: _formatData['COMMON'] = _COMMON _url = GIFT_DATA_API.format_map(_formatData) d = self.getJson(_url) - Gift.roomID = self.roomID if d is None or d["status_code"] != 0: - Gift.update() - elif 'pages' not in d["data"]: - Gift.update() - else: + return "异常" + elif 'pages' in d["data"]: for _page in d["data"]['pages']: if 'gifts' in _page: for _gift in _page['gifts']: @@ -392,7 +377,7 @@ class XiGuaLiveApi: _formatData = {"TIMESTAMP": time.time() * 1000, "roomId": self.roomID} _COMMON = COMMON_GET_PARAM.format_map(_formatData) _formatData['COMMON'] = _COMMON - _url = DANMAKU_GET_API.format_map(_formatData).format_map(_formatData) + _url = DANMAKU_GET_API.format_map(_formatData) p = self.s.post(_url, data="cursor={cursor}&resp_content_type=protobuf&live_id=3&user_id=0&identity=audience" "last_rtt=85" "&internal_ext={ext}".format_map({"cursor": self._cursor, "ext": self._ext}), @@ -429,12 +414,6 @@ class XiGuaLiveApi: self.onMessage(_fansClubMessage.content) else: pass - # 更新抽奖信息 - if self.lottery is not None and self.lottery.ID != 0: - self.lottery.update() - if self.lottery.isFinished: - self.onLottery(self.lottery) - self.lottery = None @property def updateAt(self): @@ -448,7 +427,7 @@ if __name__ == "__main__": DEBUG = True name = sys.argv[1] print("西瓜直播弹幕助手 by JerryYan") - print("接口版本8.4.4") + print("接口版本9.2.6") print("搜索【", name, "】", end="\t", flush=True) api = XiGuaLiveApi(name) if not api.isValidUser: