├── index.html └── README.md /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 抖音私信websocket测试 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 116 | 117 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # douyin-wss 2 | 抖音网页版私信聊天WSS抓包分析 3 | 4 | > 建议移步 [https://github.com/YunzhiYike/douyin-live](https://github.com/YunzhiYike/douyin-live) 该项目更新更及时全面。本项目经年未更,无法保障可用性。 5 | 6 | ## 接收到文本消息 7 | ```json 8 | { 9 | "type": 0, 10 | "isShareText": false, 11 | "item_type_local": -1, 12 | "richTextInfos": [], 13 | "text": "消息内容", 14 | "createdAt": 0, 15 | "is_card": false, 16 | "msgHint": "", 17 | "aweType": 700 18 | } 19 | ``` 20 | 21 | ## 接收到抖音内置表情 22 | 23 | ```json 24 | { 25 | "type": 0, 26 | "isShareText": false, 27 | "item_type_local": -1, 28 | "richTextInfos": [], 29 | "text": "[微笑]", 30 | "createdAt": 0, 31 | "is_card": false, 32 | "msgHint": "", 33 | "aweType": 700 34 | } 35 | ``` 36 | 37 | ## 接受到gif表情 38 | 39 | ```json 40 | { 41 | "aweType": 500, 42 | "createdAt": 0, 43 | "display_name": "", 44 | "height": 240, 45 | "image_id": 6752145780640842000, 46 | "image_type": "gif", 47 | "is_card": false, 48 | "msgHint": "", 49 | "package_id": 0, 50 | "resource_type": 0, 51 | "show_notice": false, 52 | "updateConversationTime": true, 53 | "url": { 54 | "data_size": 0, 55 | "height": 0, 56 | "uri": "joker/weshine/d53f03fc76f9b0c82fd1bf5407b89bda.gif", 57 | "url_list": [ 58 | "https://p26-sign.douyinpic.com/obj/joker/weshine/d53f03fc76f9b0c82fd1bf5407b89bda.gif?x-expires=1684044000&x-signature=hxaEiMTJx5280LaDrEBiwlgsXPk%3D&from=2526598866", 59 | "https://p9-sign.douyinpic.com/obj/joker/weshine/d53f03fc76f9b0c82fd1bf5407b89bda.gif?x-expires=1684044000&x-signature=2LKlh%2Bi5WauKcH3x90lMkgDunrY%3D&from=2526598866", 60 | "https://p26-sign.douyinpic.com/obj/joker/weshine/d53f03fc76f9b0c82fd1bf5407b89bda.gif?x-expires=1684044000&x-signature=hxaEiMTJx5280LaDrEBiwlgsXPk%3D&from=2526598866" 61 | ], 62 | "width": 0 63 | } 64 | } 65 | ``` 66 | 67 | 68 | ## 接收到语音 69 | 70 | ```json 71 | { 72 | "height": 0, 73 | "data_size": 0, 74 | "uri": "douyin-user-audio-file/7097479842803187751.mpeg", 75 | "url_list": [ 76 | "https://sf3-sign.douyinstatic.com/douyin-user-audio-file/7097479842803187751.mpeg?x-expires=1684046800&x-signature=dcAnFEvKNJDNtbjIbyjbNim0Eo4%3D", 77 | "https://sf26-sign.douyinstatic.com/douyin-user-audio-file/7097479842803187751.mpeg?x-expires=1684046800&x-signature=%2FaHfNrXX0Rl5uw02u6qnMKHk%2BXs%3D" 78 | ], 79 | "width": 0 80 | } 81 | ``` 82 | 83 | ## 接收到用户图片 84 | 85 | ```json 86 | { 87 | "aweType": 2702, 88 | "check_pics": [], 89 | "cover_height": 726, 90 | "cover_width": 1046, 91 | "createdAt": 1652511029140, 92 | "encodeTime": 11, 93 | "from_gallery": 1, 94 | "is_card": false, 95 | "mass_msg": 1, 96 | "md5": "25bd2187f8f7cb0481c02e35d1bd5095", 97 | "msgHint": "", 98 | "prev_id": 7097480824299260000, 99 | "resource_url": { 100 | "data_size": 101531, 101 | "height": 0, 102 | "large_url_list": [ 103 | "https://p26-sign.douyinpic.com/tos-cn-o-00061/7e659c55a5fb4324928e97900c28b7f1~tplv-x-get:large.image?x-expires=1684047600&x-signature=jQ9GfzbRWRUtIInL6r4NJDsBYvg%3D&from=2526598866" 104 | ], 105 | "md5": "25bd2187f8f7cb0481c02e35d1bd5095", 106 | "medium_url_list": [ 107 | "https://p3-sign.douyinpic.com/tos-cn-o-00061/7e659c55a5fb4324928e97900c28b7f1~tplv-x-get:medium.image?x-expires=1684047600&x-signature=tGszyhw1FYI8APM7vBZF2Gjb1%2FM%3D&from=2526598866" 108 | ], 109 | "oid": "tos-cn-o-00061/7e659c55a5fb4324928e97900c28b7f1", 110 | "origin_url_list": [ 111 | "https://p3-sign.douyinpic.com/tos-cn-o-00061/7e659c55a5fb4324928e97900c28b7f1~tplv-x-get:.image?x-expires=1684047600&x-signature=K9Y47b2DmQaqON9ld%2BM%2Foy78uXU%3D&from=2526598866" 112 | ], 113 | "skey": "84120f5012242af2abd66f52b059a16059d2bb2bc9807a04e302c1f918113df2", 114 | "thumb_url_list": [ 115 | "https://p26-sign.douyinpic.com/tos-cn-o-00061/7e659c55a5fb4324928e97900c28b7f1~tplv-x-get:thumb.image?x-expires=1684047600&x-signature=AEW7dXvYdgarNgJzgtPdjAIk2QE%3D&from=2526598866" 116 | ], 117 | "width": 0 118 | }, 119 | "root_id": 7097480824299260000, 120 | "sendRaw": false 121 | } 122 | ``` 123 | > 图片需解密,解密方法未知 124 | 125 | ## 收到位置消息 126 | ```json 127 | { 128 | "aweType": 0, 129 | "aweme_poi_id": "6601265443279734788", 130 | "cover_info": { 131 | "resource_url": { 132 | "data_size": 0, 133 | "height": 0, 134 | "uri": "douyin-user-image-file/d3eb88f67cf6b10ed454ec79e48648cf", 135 | "url_list": [ 136 | "https://p9-sign.douyinpic.com/obj/douyin-user-image-file/d3eb88f67cf6b10ed454ec79e48648cf?x-expires=1684047600&x-signature=XG1pVfOVlBMkodo29bK0VCigltQ%3D&from=2526598866", 137 | "https://p3-sign.douyinpic.com/obj/douyin-user-image-file/d3eb88f67cf6b10ed454ec79e48648cf?x-expires=1684047600&x-signature=nV%2FYpvjA%2FK8CiaXfDJdjey8KWLU%3D&from=2526598866", 138 | "https://p6-sign.douyinpic.com/obj/douyin-user-image-file/d3eb88f67cf6b10ed454ec79e48648cf?x-expires=1684047600&x-signature=x4l%2FxLWqS8XhL%2Bv7qjT7hA3M%2BFU%3D&from=2526598866" 139 | ], 140 | "width": 0 141 | } 142 | }, 143 | "createdAt": 0, 144 | "is_card": false, 145 | "latitude": 24.617908631273124, 146 | "longitude": 118.04502062375067, 147 | "msgHint": "", 148 | "poi_address": "福建省厦门市集美区诚毅北大街", 149 | "poi_id": "", 150 | "poi_name": "金海豚广场" 151 | } 152 | ``` 153 | 154 | ## 接收到抖音视频消息 155 | 156 | ```json 157 | { 158 | "aweType": 800, 159 | "awemeType": 0, 160 | "content_name": "nickname", 161 | "content_thumb": { 162 | "data_size": 0, 163 | "height": 720, 164 | "uri": "100x100/aweme-avatar/tos-cn-i-0813_b5af190295434238bf6151da514a1c1c", 165 | "url_list": [ 166 | "https://p26-sign.douyinpic.com/obj/aweme-avatar/tos-cn-i-0813_b5af190295434238bf6151da514a1c1c?x-expires=1684047600&x-signature=l1YIWVBv58IH6%2BRbNiXLY5xOlKQ%3D&from=2526598866", 167 | "https://p3-sign.douyinpic.com/obj/aweme-avatar/tos-cn-i-0813_b5af190295434238bf6151da514a1c1c?x-expires=1684047600&x-signature=nxPR5y8GrvLgz7f3U9eAsDSOS88%3D&from=2526598866", 168 | "https://p6-sign.douyinpic.com/obj/aweme-avatar/tos-cn-i-0813_b5af190295434238bf6151da514a1c1c?x-expires=1684047600&x-signature=Ih37%2FLLqQrq1ycl%2Be2LBeHxoLI8%3D&from=2526598866" 169 | ], 170 | "width": 720 171 | }, 172 | "content_title": "", 173 | "cover_height": 1280, 174 | "cover_url": { 175 | "data_size": 0, 176 | "height": 720, 177 | "uri": "tos-cn-p-0015/d9bb9134d35b45b8b593b705958e7780", 178 | "url_list": [ 179 | "https://p3-sign.douyinpic.com/obj/tos-cn-p-0015/d9bb9134d35b45b8b593b705958e7780?x-expires=1684047600&x-signature=v%2B%2BHwWL3hcoV0wPPdLbEEih7Cng%3D&from=2526598866", 180 | "https://p9-sign.douyinpic.com/obj/tos-cn-p-0015/d9bb9134d35b45b8b593b705958e7780?x-expires=1684047600&x-signature=hkK%2FRCIOb8juRxsk1BGtH96A%2F5E%3D&from=2526598866", 181 | "https://p26-sign.douyinpic.com/obj/tos-cn-p-0015/d9bb9134d35b45b8b593b705958e7780?x-expires=1684047600&x-signature=5hSb%2FvgjuPZD9hq2npTgob0pDKE%3D&from=2526598866" 182 | ], 183 | "width": 720 184 | }, 185 | "cover_width": 720, 186 | "createdAt": 0, 187 | "hot_spot_create_time": 1652514463, 188 | "is_card": false, 189 | "is_hot_spot_video": false, 190 | "itemId": "7097473243912621351", // 191 | "msgHint": "", 192 | "need_skip_strange": 0, 193 | "secUID": "MS4wLjABAAAAhJYrMAP2pH4n4ZTi50fFBl_cFbgEueu0bEqVK_F5-R1MF3CitsWUtzn_bP9pUv2S", 194 | "uid": "1200310293640376" 195 | } 196 | ``` 197 | 198 | itemId拼接https://www.douyin.com/video/后形成抖音视频URL 199 | --------------------------------------------------------------------------------