├── .idea ├── .gitignore ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── meiTuan.iml ├── misc.xml ├── modules.xml └── vcs.xml ├── README.md ├── comment.json ├── init.py ├── jscode.js ├── main.py ├── note ├── request.py ├── shopDetail.json ├── shopList.json ├── sign.py └── test ├── comment.json ├── shopComment.py ├── shopDetail.json ├── shopDetail.py ├── shopList.json └── shopList.py /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 25 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/meiTuan.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 早已失效!!仅供参考!!没有一点儿技术含量!! 2 | 3 | # meiTuan 4 | 美团外卖app爬虫 // meituanwaimai spider 5 | 6 | ## 包含最新版美团外卖 mtgsig 参数算法,还有 siua 算法 7 | ## update at 2021-3-25 8 | ## 需要 frida hook app生成参数,模拟器和真机都可以 9 | 10 | ## 仅供学习使用,请于下载24小时后删除 11 | -------------------------------------------------------------------------------- /comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "comment_num": 446, 4 | "avg_ship_time": 0, 5 | "comment_score": 0.0, 6 | "food_score": 0.0, 7 | "delivery_score": 0.0, 8 | "quality_score": 0.0, 9 | "pack_score": 0.0, 10 | "filter_type_num": 446, 11 | "comment_score_type_infos": [ 12 | { 13 | "comment_score_type": 0, 14 | "total_count": 446, 15 | "comment_score_title": "全部" 16 | }, 17 | { 18 | "comment_score_type": 8, 19 | "total_count": 446, 20 | "comment_score_title": "最新" 21 | }, 22 | { 23 | "comment_score_type": 1, 24 | "total_count": 425, 25 | "comment_score_title": "好评" 26 | }, 27 | { 28 | "comment_score_type": 3, 29 | "total_count": 10, 30 | "comment_score_title": "差评" 31 | }, 32 | { 33 | "comment_score_type": 10, 34 | "total_count": 37, 35 | "comment_score_title": "有图/视频" 36 | }, 37 | { 38 | "comment_score_type": 9, 39 | "total_count": 6, 40 | "comment_score_title": "商家回复" 41 | } 42 | ], 43 | "comments": [ 44 | { 45 | "user_name": "MOz84386534", 46 | "ship_score": 0.0, 47 | "ship_time": 17, 48 | "comment": "老客户了很喜欢这家的味道图片里边吃的空空的。说明本人很喜欢,特别是新品面条好吃。#德式香肠铁板面# #德式香肠铁板面#", 49 | "comment_type": 4, 50 | "order_time": 1607788800, 51 | "comment_time": 1607788800, 52 | "ctime": 0, 53 | "order_comment_score": 5, 54 | "praise_food_tip": "德式香肠铁板面等", 55 | "critic_food_tip": "", 56 | "wm_comment_id": 3967332008, 57 | "user_id": 65035040, 58 | "user_poi_comment_num": 1, 59 | "add_comment_list": [], 60 | "comment_labels": [ 61 | { 62 | "content": "快速准时", 63 | "label_type": 1 64 | }, 65 | { 66 | "content": "货品完好", 67 | "label_type": 1 68 | } 69 | ], 70 | "order_type": 1, 71 | "delivery_type": 0, 72 | "delivery_name": "", 73 | "comment_pics": [ 74 | { 75 | "url": "https://p0.meituan.net/wmcomment/0a59ff03c2d7262400872862a59dc78898792.jpg.webp", 76 | "thumbnail_url": "https://p0.meituan.net/wmcomment/0a59ff03c2d7262400872862a59dc78898792.jpg.webp" 77 | } 78 | ], 79 | "user_pic_url": "https://img.meituan.net/avatar/4f98d82418e3bf1b435647c80d8dfdfc187467.jpg", 80 | "food_comment_score": 5, 81 | "delivery_comment_score": 5, 82 | "has_add_comment": false, 83 | "is_picture_audited": false, 84 | "poi_id": 0, 85 | "scheme": "", 86 | "comment_source_tip": "", 87 | "comment_source_type": 3, 88 | "praise_food_list": [ 89 | { 90 | "name": "德式香肠铁板面", 91 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3511302882&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3937086257&referer_source=1", 92 | "spu_id": 3511302882, 93 | "sku_id": 3937086257 94 | } 95 | ], 96 | "comment_scheme": [ 97 | { 98 | "keyword": "德式香肠铁板面", 99 | "spu_id": 3511302882, 100 | "sku_id": 3937086257, 101 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3511302882&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3937086257&referer_source=0" 102 | } 103 | ], 104 | "is_anonymous": 0, 105 | "quality_score": 0, 106 | "pack_score": 5, 107 | "buz_code": 0, 108 | "can_additional": 1, 109 | "disable_additional_msg": "", 110 | "high_quality": 0, 111 | "is_dp": 0, 112 | "user_type": 0, 113 | "satisfaction_icon": "", 114 | "spu_id_list": [], 115 | "accurate_comment_score": 0, 116 | "biz_type": 0, 117 | "useful_count": 0, 118 | "current_user_useful": false, 119 | "user_labels": [ 120 | { 121 | "type": 2, 122 | "text": "回头客" 123 | } 124 | ] 125 | }, 126 | { 127 | "user_name": "曹颖696", 128 | "ship_score": 0.0, 129 | "ship_time": 55, 130 | "comment": "口味赞👍🏻包装好👌🏻推荐给大家!🎉#美式牛肉蛋堡#", 131 | "comment_type": 4, 132 | "order_time": 1606320000, 133 | "comment_time": 1606320000, 134 | "ctime": 0, 135 | "order_comment_score": 5, 136 | "praise_food_tip": "美式牛肉蛋堡等", 137 | "critic_food_tip": "", 138 | "wm_comment_id": 3911071585, 139 | "user_id": 537479861, 140 | "user_poi_comment_num": 1, 141 | "add_comment_list": [], 142 | "comment_labels": [], 143 | "order_type": 2, 144 | "delivery_type": 0, 145 | "delivery_name": "", 146 | "comment_pics": [ 147 | { 148 | "url": "https://p0.meituan.net/wmcomment/1335cfc48a62183f93e1f9593d43638597404.jpg.webp", 149 | "thumbnail_url": "https://p0.meituan.net/wmcomment/1335cfc48a62183f93e1f9593d43638597404.jpg.webp" 150 | }, 151 | { 152 | "url": "https://p0.meituan.net/wmcomment/ea2b48bfac969a996e40b69029e205b7169894.jpg.webp", 153 | "thumbnail_url": "https://p0.meituan.net/wmcomment/ea2b48bfac969a996e40b69029e205b7169894.jpg.webp" 154 | } 155 | ], 156 | "user_pic_url": "https://img.meituan.net/avatar/cc28da2b73bca8cf15abd2230497f7d8104706.jpg", 157 | "food_comment_score": 5, 158 | "delivery_comment_score": 5, 159 | "has_add_comment": false, 160 | "is_picture_audited": false, 161 | "poi_id": 0, 162 | "scheme": "", 163 | "comment_source_tip": "", 164 | "comment_source_type": 3, 165 | "praise_food_list": [ 166 | { 167 | "name": "美式牛肉蛋堡", 168 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2035838435&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317704752&referer_source=1", 169 | "spu_id": 2035838435, 170 | "sku_id": 2317704752 171 | } 172 | ], 173 | "comment_scheme": [ 174 | { 175 | "keyword": "美式牛肉蛋堡", 176 | "spu_id": 2035838435, 177 | "sku_id": 2317704752, 178 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2035838435&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317704752&referer_source=0" 179 | } 180 | ], 181 | "is_anonymous": 0, 182 | "quality_score": 0, 183 | "pack_score": 5, 184 | "buz_code": 0, 185 | "can_additional": 1, 186 | "disable_additional_msg": "", 187 | "high_quality": 0, 188 | "is_dp": 0, 189 | "user_type": 0, 190 | "satisfaction_icon": "", 191 | "spu_id_list": [], 192 | "accurate_comment_score": 0, 193 | "biz_type": 0, 194 | "useful_count": 1, 195 | "current_user_useful": false, 196 | "user_labels": [ 197 | { 198 | "type": 1, 199 | "text": "美团会员" 200 | }, 201 | { 202 | "type": 2, 203 | "text": "回头客" 204 | } 205 | ] 206 | }, 207 | { 208 | "user_name": "匿名用户", 209 | "ship_score": 0.0, 210 | "ship_time": 54, 211 | "comment": "冬天的原因,送过来已经冷了,不过有微波炉可以加热,也不影响味道,加热后芝士都直接流出来了,很爽,大冬天的辛苦外卖小哥了,实在太冷了", 212 | "comment_type": 4, 213 | "order_time": 1607616000, 214 | "comment_time": 1607616000, 215 | "ctime": 0, 216 | "order_comment_score": 5, 217 | "praise_food_tip": "肉弹堡等", 218 | "critic_food_tip": "", 219 | "wm_comment_id": 3960440015, 220 | "user_id": 0, 221 | "user_poi_comment_num": 1, 222 | "add_comment_list": [], 223 | "comment_labels": [], 224 | "order_type": 1, 225 | "delivery_type": 0, 226 | "delivery_name": "", 227 | "comment_pics": [], 228 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 229 | "food_comment_score": 5, 230 | "delivery_comment_score": 5, 231 | "has_add_comment": false, 232 | "is_picture_audited": false, 233 | "poi_id": 0, 234 | "scheme": "", 235 | "comment_source_tip": "", 236 | "comment_source_type": 3, 237 | "praise_food_list": [ 238 | { 239 | "name": "肉弹堡", 240 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3511302885&wmpoiid=1019617870594095&sputag=&activitytag=discount&sku_id=3937086260&referer_source=1", 241 | "spu_id": 3511302885, 242 | "sku_id": 3937086260 243 | } 244 | ], 245 | "comment_scheme": [ 246 | { 247 | "keyword": "肉弹堡", 248 | "spu_id": 3511302885, 249 | "sku_id": 3937086260, 250 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3511302885&wmpoiid=1019617870594095&sputag=&activitytag=discount&sku_id=3937086260&referer_source=0" 251 | } 252 | ], 253 | "is_anonymous": 1, 254 | "quality_score": 0, 255 | "pack_score": 5, 256 | "buz_code": 0, 257 | "can_additional": 1, 258 | "disable_additional_msg": "", 259 | "high_quality": 0, 260 | "is_dp": 0, 261 | "user_type": 0, 262 | "satisfaction_icon": "", 263 | "spu_id_list": [], 264 | "accurate_comment_score": 0, 265 | "biz_type": 0, 266 | "useful_count": 0, 267 | "current_user_useful": false, 268 | "user_labels": [ 269 | { 270 | "type": 1, 271 | "text": "美团会员" 272 | } 273 | ] 274 | }, 275 | { 276 | "user_name": "曹颖696", 277 | "ship_score": 0.0, 278 | "ship_time": 143, 279 | "comment": "口味赞👍🏻包装好👌🏻推荐给大家!#美式牛肉蛋堡# #肉弹吐司#", 280 | "comment_type": 4, 281 | "order_time": 1604073600, 282 | "comment_time": 1604073600, 283 | "ctime": 0, 284 | "order_comment_score": 5, 285 | "praise_food_tip": "美式牛肉蛋堡,肉弹吐司等", 286 | "critic_food_tip": "", 287 | "wm_comment_id": 3828083350, 288 | "user_id": 537479861, 289 | "user_poi_comment_num": 1, 290 | "add_comment_list": [], 291 | "comment_labels": [], 292 | "order_type": 2, 293 | "delivery_type": 0, 294 | "delivery_name": "", 295 | "comment_pics": [ 296 | { 297 | "url": "https://p0.meituan.net/wmcomment/b1ffb2c705aa36a9cf43fcc0572c0aa5129569.jpg.webp", 298 | "thumbnail_url": "https://p0.meituan.net/wmcomment/b1ffb2c705aa36a9cf43fcc0572c0aa5129569.jpg.webp" 299 | }, 300 | { 301 | "url": "https://p0.meituan.net/wmcomment/ed63f0dd4f833470a79bac19662501ee175558.jpg.webp", 302 | "thumbnail_url": "https://p0.meituan.net/wmcomment/ed63f0dd4f833470a79bac19662501ee175558.jpg.webp" 303 | } 304 | ], 305 | "user_pic_url": "https://img.meituan.net/avatar/cc28da2b73bca8cf15abd2230497f7d8104706.jpg", 306 | "food_comment_score": 5, 307 | "delivery_comment_score": 5, 308 | "has_add_comment": false, 309 | "is_picture_audited": false, 310 | "poi_id": 0, 311 | "scheme": "", 312 | "comment_source_tip": "", 313 | "comment_source_type": 3, 314 | "praise_food_list": [ 315 | { 316 | "name": "美式牛肉蛋堡", 317 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2035838435&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317704752&referer_source=1", 318 | "spu_id": 2035838435, 319 | "sku_id": 2317704752 320 | }, 321 | { 322 | "name": "肉弹吐司", 323 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=1", 324 | "spu_id": 227678455, 325 | "sku_id": 247520746 326 | } 327 | ], 328 | "comment_scheme": [ 329 | { 330 | "keyword": "美式牛肉蛋堡", 331 | "spu_id": 2035838435, 332 | "sku_id": 2317704752, 333 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2035838435&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317704752&referer_source=0" 334 | }, 335 | { 336 | "keyword": "肉弹吐司", 337 | "spu_id": 227678455, 338 | "sku_id": 247520746, 339 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=0" 340 | } 341 | ], 342 | "is_anonymous": 0, 343 | "quality_score": 0, 344 | "pack_score": 5, 345 | "buz_code": 0, 346 | "can_additional": 1, 347 | "disable_additional_msg": "", 348 | "high_quality": 0, 349 | "is_dp": 0, 350 | "user_type": 0, 351 | "satisfaction_icon": "", 352 | "spu_id_list": [], 353 | "accurate_comment_score": 0, 354 | "biz_type": 0, 355 | "useful_count": 0, 356 | "current_user_useful": false, 357 | "user_labels": [ 358 | { 359 | "type": 1, 360 | "text": "美团会员" 361 | }, 362 | { 363 | "type": 2, 364 | "text": "回头客" 365 | } 366 | ] 367 | }, 368 | { 369 | "user_name": "匿名用户", 370 | "ship_score": 0.0, 371 | "ship_time": 20, 372 | "comment": "#肉弹吐司#味道很赞 做早餐很舒服 骑手也很快", 373 | "comment_type": 4, 374 | "order_time": 1606147200, 375 | "comment_time": 1606147200, 376 | "ctime": 0, 377 | "order_comment_score": 5, 378 | "praise_food_tip": "", 379 | "critic_food_tip": "", 380 | "wm_comment_id": 3902878592, 381 | "user_id": 0, 382 | "user_poi_comment_num": 1, 383 | "add_comment_list": [], 384 | "comment_labels": [ 385 | { 386 | "content": "仪表整洁", 387 | "label_type": 1 388 | }, 389 | { 390 | "content": "货品完好", 391 | "label_type": 1 392 | }, 393 | { 394 | "content": "风雨无阻", 395 | "label_type": 1 396 | }, 397 | { 398 | "content": "礼貌热情", 399 | "label_type": 1 400 | }, 401 | { 402 | "content": "穿戴工服", 403 | "label_type": 1 404 | }, 405 | { 406 | "content": "快速准时", 407 | "label_type": 1 408 | } 409 | ], 410 | "order_type": 1, 411 | "delivery_type": 0, 412 | "delivery_name": "", 413 | "comment_pics": [ 414 | { 415 | "url": "https://p0.meituan.net/wmcomment/b32a971c2578d2cf032125c94f66c3dd119981.jpg.webp", 416 | "thumbnail_url": "https://p0.meituan.net/wmcomment/b32a971c2578d2cf032125c94f66c3dd119981.jpg.webp" 417 | } 418 | ], 419 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 420 | "food_comment_score": 5, 421 | "delivery_comment_score": 5, 422 | "has_add_comment": false, 423 | "is_picture_audited": false, 424 | "poi_id": 0, 425 | "scheme": "", 426 | "comment_source_tip": "", 427 | "comment_source_type": 3, 428 | "praise_food_list": [], 429 | "comment_scheme": [ 430 | { 431 | "keyword": "肉弹吐司", 432 | "spu_id": 227678455, 433 | "sku_id": 247520746, 434 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=0" 435 | } 436 | ], 437 | "is_anonymous": 1, 438 | "quality_score": 0, 439 | "pack_score": 5, 440 | "buz_code": 0, 441 | "can_additional": 1, 442 | "disable_additional_msg": "", 443 | "high_quality": 0, 444 | "is_dp": 0, 445 | "user_type": 0, 446 | "satisfaction_icon": "", 447 | "spu_id_list": [], 448 | "accurate_comment_score": 0, 449 | "biz_type": 0, 450 | "useful_count": 0, 451 | "current_user_useful": false, 452 | "user_labels": [ 453 | { 454 | "type": 1, 455 | "text": "美团会员" 456 | } 457 | ] 458 | }, 459 | { 460 | "user_name": "junkiku", 461 | "ship_score": 0.0, 462 | "ship_time": 45, 463 | "comment": "今天的肉饼味道不对。有股骚味。只吃了一口扔掉了。希望以后买肉时候注意下。", 464 | "comment_type": 4, 465 | "order_time": 1606060800, 466 | "comment_time": 1606060800, 467 | "ctime": 0, 468 | "order_comment_score": 4, 469 | "praise_food_tip": "美式咖啡(新)等", 470 | "critic_food_tip": "肉弹吐司等", 471 | "wm_comment_id": 3900200060, 472 | "user_id": 28329850, 473 | "user_poi_comment_num": 1, 474 | "add_comment_list": [], 475 | "comment_labels": [], 476 | "order_type": 1, 477 | "delivery_type": 0, 478 | "delivery_name": "", 479 | "comment_pics": [], 480 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 481 | "food_comment_score": 4, 482 | "delivery_comment_score": 5, 483 | "has_add_comment": false, 484 | "is_picture_audited": false, 485 | "poi_id": 0, 486 | "scheme": "", 487 | "comment_source_tip": "", 488 | "comment_source_type": 3, 489 | "praise_food_list": [ 490 | { 491 | "name": "美式咖啡(新)", 492 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3216458295&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3603527294&referer_source=1", 493 | "spu_id": 3216458295, 494 | "sku_id": 3603527294 495 | } 496 | ], 497 | "comment_scheme": [ 498 | { 499 | "keyword": "肉弹吐司", 500 | "spu_id": 227678455, 501 | "sku_id": 247520746, 502 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=0" 503 | } 504 | ], 505 | "is_anonymous": 0, 506 | "quality_score": 0, 507 | "pack_score": 4, 508 | "buz_code": 0, 509 | "can_additional": 1, 510 | "disable_additional_msg": "", 511 | "high_quality": 0, 512 | "is_dp": 0, 513 | "user_type": 0, 514 | "satisfaction_icon": "", 515 | "spu_id_list": [], 516 | "accurate_comment_score": 0, 517 | "biz_type": 0, 518 | "useful_count": 0, 519 | "current_user_useful": false, 520 | "user_labels": [ 521 | { 522 | "type": 1, 523 | "text": "美团会员" 524 | }, 525 | { 526 | "type": 2, 527 | "text": "回头客" 528 | } 529 | ] 530 | }, 531 | { 532 | "user_name": "匿名用户", 533 | "ship_score": 0.0, 534 | "ship_time": 31, 535 | "comment": "#肉弹吐司# #肉弹吐司#没有以前点的好吃了 肉饼也小了?", 536 | "comment_type": 4, 537 | "order_time": 1604332800, 538 | "comment_time": 1604332800, 539 | "ctime": 0, 540 | "order_comment_score": 4, 541 | "praise_food_tip": "", 542 | "critic_food_tip": "", 543 | "wm_comment_id": 3836504293, 544 | "user_id": 0, 545 | "user_poi_comment_num": 1, 546 | "add_comment_list": [], 547 | "comment_labels": [], 548 | "order_type": 1, 549 | "delivery_type": 0, 550 | "delivery_name": "", 551 | "comment_pics": [ 552 | { 553 | "url": "https://p0.meituan.net/wmcomment/e2eda3938cb450028c001c60b8dcc59b120517.jpg.webp", 554 | "thumbnail_url": "https://p0.meituan.net/wmcomment/e2eda3938cb450028c001c60b8dcc59b120517.jpg.webp" 555 | } 556 | ], 557 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 558 | "food_comment_score": 4, 559 | "delivery_comment_score": 5, 560 | "has_add_comment": false, 561 | "is_picture_audited": false, 562 | "poi_id": 0, 563 | "scheme": "", 564 | "comment_source_tip": "", 565 | "comment_source_type": 3, 566 | "praise_food_list": [], 567 | "comment_scheme": [ 568 | { 569 | "keyword": "肉弹吐司", 570 | "spu_id": 227678455, 571 | "sku_id": 247520746, 572 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=0" 573 | } 574 | ], 575 | "is_anonymous": 1, 576 | "quality_score": 0, 577 | "pack_score": 5, 578 | "buz_code": 0, 579 | "can_additional": 1, 580 | "disable_additional_msg": "", 581 | "high_quality": 0, 582 | "is_dp": 0, 583 | "user_type": 0, 584 | "satisfaction_icon": "", 585 | "spu_id_list": [], 586 | "accurate_comment_score": 0, 587 | "biz_type": 0, 588 | "useful_count": 1, 589 | "current_user_useful": false, 590 | "user_labels": [] 591 | }, 592 | { 593 | "user_name": "曹颖696", 594 | "ship_score": 0.0, 595 | "ship_time": 16, 596 | "comment": "口味赞👍🏻包装好👌🏻推荐给大家!#虾肉蛋堡# #肉弹吐司#", 597 | "comment_type": 4, 598 | "order_time": 1603641600, 599 | "comment_time": 1603641600, 600 | "ctime": 0, 601 | "order_comment_score": 5, 602 | "praise_food_tip": "虾肉蛋堡,肉弹吐司等", 603 | "critic_food_tip": "", 604 | "wm_comment_id": 3811694456, 605 | "user_id": 537479861, 606 | "user_poi_comment_num": 1, 607 | "add_comment_list": [], 608 | "comment_labels": [], 609 | "order_type": 1, 610 | "delivery_type": 0, 611 | "delivery_name": "", 612 | "comment_pics": [ 613 | { 614 | "url": "https://p0.meituan.net/wmcomment/74e44bc05622aecb885e7cd65818ba3c87202.jpg.webp", 615 | "thumbnail_url": "https://p0.meituan.net/wmcomment/74e44bc05622aecb885e7cd65818ba3c87202.jpg.webp" 616 | }, 617 | { 618 | "url": "https://p0.meituan.net/wmcomment/f2206fe1a14d565d52ce78ba8d6de26d121180.jpg.webp", 619 | "thumbnail_url": "https://p0.meituan.net/wmcomment/f2206fe1a14d565d52ce78ba8d6de26d121180.jpg.webp" 620 | } 621 | ], 622 | "user_pic_url": "https://img.meituan.net/avatar/cc28da2b73bca8cf15abd2230497f7d8104706.jpg", 623 | "food_comment_score": 5, 624 | "delivery_comment_score": 5, 625 | "has_add_comment": false, 626 | "is_picture_audited": false, 627 | "poi_id": 0, 628 | "scheme": "", 629 | "comment_source_tip": "", 630 | "comment_source_type": 3, 631 | "praise_food_list": [ 632 | { 633 | "name": "虾肉蛋堡", 634 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2036081765&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317790643&referer_source=1", 635 | "spu_id": 2036081765, 636 | "sku_id": 2317790643 637 | }, 638 | { 639 | "name": "肉弹吐司", 640 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=1", 641 | "spu_id": 227678455, 642 | "sku_id": 247520746 643 | } 644 | ], 645 | "comment_scheme": [ 646 | { 647 | "keyword": "虾肉蛋堡", 648 | "spu_id": 2036081765, 649 | "sku_id": 2317790643, 650 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2036081765&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317790643&referer_source=0" 651 | }, 652 | { 653 | "keyword": "肉弹吐司", 654 | "spu_id": 227678455, 655 | "sku_id": 247520746, 656 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=0" 657 | } 658 | ], 659 | "is_anonymous": 0, 660 | "quality_score": 0, 661 | "pack_score": 5, 662 | "buz_code": 0, 663 | "can_additional": 1, 664 | "disable_additional_msg": "", 665 | "high_quality": 0, 666 | "is_dp": 0, 667 | "user_type": 0, 668 | "satisfaction_icon": "", 669 | "spu_id_list": [], 670 | "accurate_comment_score": 0, 671 | "biz_type": 0, 672 | "useful_count": 0, 673 | "current_user_useful": false, 674 | "user_labels": [ 675 | { 676 | "type": 1, 677 | "text": "美团会员" 678 | }, 679 | { 680 | "type": 2, 681 | "text": "回头客" 682 | } 683 | ] 684 | }, 685 | { 686 | "user_name": "MOz84386534", 687 | "ship_score": 0.0, 688 | "ship_time": 24, 689 | "comment": "老客户,东西不错,会回购。味道很好。", 690 | "comment_type": 4, 691 | "order_time": 1607788800, 692 | "comment_time": 1607788800, 693 | "ctime": 0, 694 | "order_comment_score": 5, 695 | "praise_food_tip": "肉弹吐司等", 696 | "critic_food_tip": "", 697 | "wm_comment_id": 3967107115, 698 | "user_id": 65035040, 699 | "user_poi_comment_num": 1, 700 | "add_comment_list": [], 701 | "comment_labels": [ 702 | { 703 | "content": "货品完好", 704 | "label_type": 1 705 | }, 706 | { 707 | "content": "快速准时", 708 | "label_type": 1 709 | }, 710 | { 711 | "content": "礼貌热情", 712 | "label_type": 1 713 | } 714 | ], 715 | "order_type": 1, 716 | "delivery_type": 0, 717 | "delivery_name": "", 718 | "comment_pics": [], 719 | "user_pic_url": "https://img.meituan.net/avatar/4f98d82418e3bf1b435647c80d8dfdfc187467.jpg", 720 | "food_comment_score": 5, 721 | "delivery_comment_score": 5, 722 | "has_add_comment": false, 723 | "is_picture_audited": false, 724 | "poi_id": 0, 725 | "scheme": "", 726 | "comment_source_tip": "", 727 | "comment_source_type": 3, 728 | "praise_food_list": [ 729 | { 730 | "name": "肉弹吐司", 731 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3511302875&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3937086250&referer_source=1", 732 | "spu_id": 3511302875, 733 | "sku_id": 3937086250 734 | } 735 | ], 736 | "comment_scheme": [], 737 | "is_anonymous": 0, 738 | "quality_score": 0, 739 | "pack_score": 5, 740 | "buz_code": 0, 741 | "can_additional": 1, 742 | "disable_additional_msg": "", 743 | "high_quality": 0, 744 | "is_dp": 0, 745 | "user_type": 0, 746 | "satisfaction_icon": "", 747 | "spu_id_list": [], 748 | "accurate_comment_score": 0, 749 | "biz_type": 0, 750 | "useful_count": 0, 751 | "current_user_useful": false, 752 | "user_labels": [ 753 | { 754 | "type": 2, 755 | "text": "回头客" 756 | } 757 | ] 758 | }, 759 | { 760 | "user_name": "BUt177314030", 761 | "ship_score": 0.0, 762 | "ship_time": 48, 763 | "comment": "#墨西哥肉酱面#肉还挺多,还可以吧,个人更喜欢铁板那个", 764 | "comment_type": 4, 765 | "order_time": 1603900800, 766 | "comment_time": 1603900800, 767 | "ctime": 0, 768 | "order_comment_score": 5, 769 | "praise_food_tip": "", 770 | "critic_food_tip": "", 771 | "wm_comment_id": 3821573646, 772 | "user_id": 301265048, 773 | "user_poi_comment_num": 1, 774 | "add_comment_list": [], 775 | "comment_labels": [], 776 | "order_type": 1, 777 | "delivery_type": 0, 778 | "delivery_name": "", 779 | "comment_pics": [ 780 | { 781 | "url": "https://p0.meituan.net/wmcomment/220d3662f0cb3358383850a907f638a4376948.jpg.webp", 782 | "thumbnail_url": "https://p0.meituan.net/wmcomment/220d3662f0cb3358383850a907f638a4376948.jpg.webp" 783 | } 784 | ], 785 | "user_pic_url": "https://img.meituan.net/avatar/eac4fc166d7de1803ec0d2b403ffba9258771.jpg", 786 | "food_comment_score": 5, 787 | "delivery_comment_score": 5, 788 | "has_add_comment": false, 789 | "is_picture_audited": false, 790 | "poi_id": 0, 791 | "scheme": "", 792 | "comment_source_tip": "", 793 | "comment_source_type": 3, 794 | "praise_food_list": [], 795 | "comment_scheme": [ 796 | { 797 | "keyword": "墨西哥肉酱面", 798 | "spu_id": 2035833863, 799 | "sku_id": 2317730561, 800 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2035833863&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317730561&referer_source=0" 801 | } 802 | ], 803 | "is_anonymous": 0, 804 | "quality_score": 0, 805 | "pack_score": 5, 806 | "buz_code": 0, 807 | "can_additional": 1, 808 | "disable_additional_msg": "", 809 | "high_quality": 0, 810 | "is_dp": 0, 811 | "user_type": 0, 812 | "satisfaction_icon": "", 813 | "spu_id_list": [], 814 | "accurate_comment_score": 0, 815 | "biz_type": 0, 816 | "useful_count": 0, 817 | "current_user_useful": false, 818 | "user_labels": [ 819 | { 820 | "type": 1, 821 | "text": "美团会员" 822 | }, 823 | { 824 | "type": 2, 825 | "text": "回头客" 826 | } 827 | ] 828 | }, 829 | { 830 | "user_name": "匿名用户", 831 | "ship_score": 0.0, 832 | "ship_time": 43, 833 | "comment": "你又要封口又不给我吸管 什么墨西哥肉酱面 确定不是红油面吗 没盐***甜的 真的瓜 难吃死了", 834 | "comment_type": 4, 835 | "order_time": 1604764800, 836 | "comment_time": 1604764800, 837 | "ctime": 0, 838 | "order_comment_score": 1, 839 | "praise_food_tip": "", 840 | "critic_food_tip": "墨西哥肉酱面,培根酥皮饼,红糖姜茶等", 841 | "wm_comment_id": 3850593562, 842 | "user_id": 0, 843 | "user_poi_comment_num": 1, 844 | "add_comment_list": [], 845 | "comment_labels": [], 846 | "order_type": 1, 847 | "delivery_type": 0, 848 | "delivery_name": "", 849 | "comment_pics": [], 850 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 851 | "food_comment_score": 1, 852 | "delivery_comment_score": 5, 853 | "has_add_comment": false, 854 | "is_picture_audited": false, 855 | "poi_id": 0, 856 | "scheme": "", 857 | "comment_source_tip": "", 858 | "comment_source_type": 3, 859 | "praise_food_list": [], 860 | "comment_scheme": [ 861 | { 862 | "keyword": "墨西哥肉酱面", 863 | "spu_id": 2035833863, 864 | "sku_id": 2317730561, 865 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=2035833863&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=2317730561&referer_source=0" 866 | } 867 | ], 868 | "is_anonymous": 1, 869 | "quality_score": 0, 870 | "pack_score": 1, 871 | "buz_code": 0, 872 | "can_additional": 1, 873 | "disable_additional_msg": "", 874 | "high_quality": 0, 875 | "is_dp": 0, 876 | "user_type": 0, 877 | "satisfaction_icon": "", 878 | "spu_id_list": [], 879 | "accurate_comment_score": 0, 880 | "biz_type": 0, 881 | "useful_count": 0, 882 | "current_user_useful": false, 883 | "user_labels": [] 884 | }, 885 | { 886 | "user_name": "nIF822771529", 887 | "ship_score": 0.0, 888 | "ship_time": 19, 889 | "comment": "可以", 890 | "comment_type": 4, 891 | "order_time": 1607011200, 892 | "comment_time": 1607011200, 893 | "ctime": 0, 894 | "order_comment_score": 4, 895 | "praise_food_tip": "", 896 | "critic_food_tip": "", 897 | "wm_comment_id": 3936607538, 898 | "user_id": 491030142, 899 | "user_poi_comment_num": 1, 900 | "add_comment_list": [], 901 | "comment_labels": [], 902 | "order_type": 1, 903 | "delivery_type": 0, 904 | "delivery_name": "", 905 | "comment_pics": [], 906 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 907 | "food_comment_score": 4, 908 | "delivery_comment_score": 5, 909 | "has_add_comment": false, 910 | "is_picture_audited": false, 911 | "poi_id": 0, 912 | "scheme": "", 913 | "comment_source_tip": "", 914 | "comment_source_type": 3, 915 | "praise_food_list": [], 916 | "comment_scheme": [], 917 | "is_anonymous": 0, 918 | "quality_score": 0, 919 | "pack_score": 4, 920 | "buz_code": 0, 921 | "can_additional": 1, 922 | "disable_additional_msg": "", 923 | "high_quality": 0, 924 | "is_dp": 0, 925 | "user_type": 0, 926 | "satisfaction_icon": "", 927 | "spu_id_list": [], 928 | "accurate_comment_score": 0, 929 | "biz_type": 0, 930 | "useful_count": 0, 931 | "current_user_useful": false, 932 | "user_labels": [ 933 | { 934 | "type": 1, 935 | "text": "美团会员" 936 | } 937 | ] 938 | }, 939 | { 940 | "user_name": "DGp385892377", 941 | "ship_score": 0.0, 942 | "ship_time": 38, 943 | "comment": "味道一如既往的好吃!!!!!!!!!!!#铁板肉酱面加蛋#", 944 | "comment_type": 11, 945 | "order_time": 1604160000, 946 | "comment_time": 1604160000, 947 | "ctime": 0, 948 | "order_comment_score": 5, 949 | "praise_food_tip": "", 950 | "critic_food_tip": "", 951 | "wm_comment_id": 3830888159, 952 | "user_id": 827137272, 953 | "user_poi_comment_num": 1, 954 | "add_comment_list": [], 955 | "comment_labels": [ 956 | { 957 | "content": "货品完好", 958 | "label_type": 1 959 | }, 960 | { 961 | "content": "仪表整洁", 962 | "label_type": 1 963 | }, 964 | { 965 | "content": "穿戴工服", 966 | "label_type": 1 967 | }, 968 | { 969 | "content": "礼貌热情", 970 | "label_type": 1 971 | }, 972 | { 973 | "content": "风雨无阻", 974 | "label_type": 1 975 | }, 976 | { 977 | "content": "快速准时", 978 | "label_type": 1 979 | } 980 | ], 981 | "order_type": 1, 982 | "delivery_type": 0, 983 | "delivery_name": "", 984 | "comment_pics": [ 985 | { 986 | "url": "https://p0.meituan.net/wmcomment/dc1131ebccb2d83be0c7389ee8d1a7d829903.jpg.webp", 987 | "thumbnail_url": "https://p0.meituan.net/wmcomment/dc1131ebccb2d83be0c7389ee8d1a7d829903.jpg.webp" 988 | } 989 | ], 990 | "user_pic_url": "https://img.meituan.net/avatar/c069d29fbb85648acf8245712a9ef1f930835.jpg", 991 | "food_comment_score": 5, 992 | "delivery_comment_score": 5, 993 | "has_add_comment": false, 994 | "is_picture_audited": false, 995 | "poi_id": 0, 996 | "scheme": "", 997 | "comment_source_tip": "", 998 | "comment_source_type": 3, 999 | "praise_food_list": [], 1000 | "comment_scheme": [ 1001 | { 1002 | "keyword": "铁板肉酱面加蛋", 1003 | "spu_id": 1686206336, 1004 | "sku_id": 1914952123, 1005 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=1686206336&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=1914952123&referer_source=0" 1006 | }, 1007 | { 1008 | "keyword": "经典蛋饼", 1009 | "spu_id": 253389476, 1010 | "sku_id": 275888719, 1011 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=253389476&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=275888719&referer_source=0" 1012 | } 1013 | ], 1014 | "is_anonymous": 0, 1015 | "quality_score": 0, 1016 | "pack_score": 5, 1017 | "buz_code": 0, 1018 | "can_additional": 1, 1019 | "disable_additional_msg": "", 1020 | "high_quality": 0, 1021 | "is_dp": 0, 1022 | "user_type": 0, 1023 | "satisfaction_icon": "", 1024 | "spu_id_list": [], 1025 | "accurate_comment_score": 0, 1026 | "biz_type": 0, 1027 | "useful_count": 0, 1028 | "current_user_useful": false, 1029 | "user_labels": [ 1030 | { 1031 | "type": 1, 1032 | "text": "美团会员" 1033 | }, 1034 | { 1035 | "type": 2, 1036 | "text": "回头客" 1037 | } 1038 | ] 1039 | }, 1040 | { 1041 | "user_name": "匿名用户", 1042 | "ship_score": 0.0, 1043 | "ship_time": 55, 1044 | "comment": "#活力牛排#不好吃就没有以前的铁板面好吃", 1045 | "comment_type": 4, 1046 | "order_time": 1605283200, 1047 | "comment_time": 1605283200, 1048 | "ctime": 0, 1049 | "order_comment_score": 2, 1050 | "praise_food_tip": "肉弹吐司,乌龙奶茶等", 1051 | "critic_food_tip": "活力牛排,厚切牛排吐司等", 1052 | "wm_comment_id": 3868135037, 1053 | "user_id": 0, 1054 | "user_poi_comment_num": 1, 1055 | "add_comment_list": [], 1056 | "comment_labels": [], 1057 | "order_type": 1, 1058 | "delivery_type": 0, 1059 | "delivery_name": "", 1060 | "comment_pics": [], 1061 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 1062 | "food_comment_score": 2, 1063 | "delivery_comment_score": 5, 1064 | "has_add_comment": false, 1065 | "is_picture_audited": false, 1066 | "poi_id": 0, 1067 | "scheme": "", 1068 | "comment_source_tip": "", 1069 | "comment_source_type": 3, 1070 | "praise_food_list": [ 1071 | { 1072 | "name": "肉弹吐司", 1073 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=1", 1074 | "spu_id": 227678455, 1075 | "sku_id": 247520746 1076 | }, 1077 | { 1078 | "name": "乌龙奶茶", 1079 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227680148&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520754&referer_source=1", 1080 | "spu_id": 227680148, 1081 | "sku_id": 247520754 1082 | } 1083 | ], 1084 | "comment_scheme": [ 1085 | { 1086 | "keyword": "活力牛排", 1087 | "spu_id": 3196342507, 1088 | "sku_id": 3582251107, 1089 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3196342507&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3582251107&referer_source=0" 1090 | } 1091 | ], 1092 | "is_anonymous": 1, 1093 | "quality_score": 0, 1094 | "pack_score": 4, 1095 | "buz_code": 0, 1096 | "can_additional": 1, 1097 | "disable_additional_msg": "", 1098 | "high_quality": 0, 1099 | "is_dp": 0, 1100 | "user_type": 0, 1101 | "satisfaction_icon": "", 1102 | "spu_id_list": [], 1103 | "accurate_comment_score": 0, 1104 | "biz_type": 0, 1105 | "useful_count": 0, 1106 | "current_user_useful": false, 1107 | "user_labels": [ 1108 | { 1109 | "type": 2, 1110 | "text": "回头客" 1111 | } 1112 | ] 1113 | }, 1114 | { 1115 | "user_name": "我是会飞的鸵鸟", 1116 | "ship_score": 0.0, 1117 | "ship_time": 21, 1118 | "comment": "长期吃,味道不错,是一家来了就想就想吃", 1119 | "comment_type": 4, 1120 | "order_time": 1606492800, 1121 | "comment_time": 1606492800, 1122 | "ctime": 0, 1123 | "order_comment_score": 5, 1124 | "praise_food_tip": "芝士牛肉堡,奶油蘑菇汤,生猛薯条等", 1125 | "critic_food_tip": "", 1126 | "wm_comment_id": 3915350211, 1127 | "user_id": 5565716, 1128 | "user_poi_comment_num": 1, 1129 | "add_comment_list": [], 1130 | "comment_labels": [], 1131 | "order_type": 1, 1132 | "delivery_type": 0, 1133 | "delivery_name": "", 1134 | "comment_pics": [], 1135 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 1136 | "food_comment_score": 5, 1137 | "delivery_comment_score": 5, 1138 | "has_add_comment": false, 1139 | "is_picture_audited": false, 1140 | "poi_id": 0, 1141 | "scheme": "", 1142 | "comment_source_tip": "", 1143 | "comment_source_type": 3, 1144 | "praise_food_list": [ 1145 | { 1146 | "name": "芝士牛肉堡", 1147 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227680151&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520758&referer_source=1", 1148 | "spu_id": 227680151, 1149 | "sku_id": 247520758 1150 | }, 1151 | { 1152 | "name": "奶油蘑菇汤", 1153 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678470&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247521257&referer_source=1", 1154 | "spu_id": 227678470, 1155 | "sku_id": 247521257 1156 | }, 1157 | { 1158 | "name": "生猛薯条", 1159 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=253383467&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=275882961&referer_source=1", 1160 | "spu_id": 253383467, 1161 | "sku_id": 275882961 1162 | } 1163 | ], 1164 | "comment_scheme": [], 1165 | "is_anonymous": 0, 1166 | "quality_score": 0, 1167 | "pack_score": 5, 1168 | "buz_code": 0, 1169 | "can_additional": 1, 1170 | "disable_additional_msg": "", 1171 | "high_quality": 0, 1172 | "is_dp": 0, 1173 | "user_type": 0, 1174 | "satisfaction_icon": "", 1175 | "spu_id_list": [], 1176 | "accurate_comment_score": 0, 1177 | "biz_type": 0, 1178 | "useful_count": 0, 1179 | "current_user_useful": false, 1180 | "user_labels": [ 1181 | { 1182 | "type": 2, 1183 | "text": "回头客" 1184 | } 1185 | ] 1186 | }, 1187 | { 1188 | "user_name": "匿名用户", 1189 | "ship_score": 0.0, 1190 | "ship_time": 28, 1191 | "comment": "#厚切牛排吐司#这....和图片严重不符...味道还可以", 1192 | "comment_type": 4, 1193 | "order_time": 1602432000, 1194 | "comment_time": 1602432000, 1195 | "ctime": 0, 1196 | "order_comment_score": 3, 1197 | "praise_food_tip": "", 1198 | "critic_food_tip": "", 1199 | "wm_comment_id": 3768590396, 1200 | "user_id": 0, 1201 | "user_poi_comment_num": 1, 1202 | "add_comment_list": [], 1203 | "comment_labels": [], 1204 | "order_type": 1, 1205 | "delivery_type": 0, 1206 | "delivery_name": "", 1207 | "comment_pics": [ 1208 | { 1209 | "url": "https://p0.meituan.net/wmcomment/bcf03a263d01b610874a6c311e43ca7773048.jpg.webp", 1210 | "thumbnail_url": "https://p0.meituan.net/wmcomment/bcf03a263d01b610874a6c311e43ca7773048.jpg.webp" 1211 | }, 1212 | { 1213 | "url": "https://p0.meituan.net/wmcomment/8c0aa6f8cb0a6b92200958cd3768f6db33939.jpg.webp", 1214 | "thumbnail_url": "https://p0.meituan.net/wmcomment/8c0aa6f8cb0a6b92200958cd3768f6db33939.jpg.webp" 1215 | } 1216 | ], 1217 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 1218 | "food_comment_score": 3, 1219 | "delivery_comment_score": 5, 1220 | "has_add_comment": false, 1221 | "is_picture_audited": false, 1222 | "poi_id": 0, 1223 | "scheme": "", 1224 | "comment_source_tip": "", 1225 | "comment_source_type": 3, 1226 | "praise_food_list": [], 1227 | "comment_scheme": [ 1228 | { 1229 | "keyword": "厚切牛排吐司", 1230 | "spu_id": 3195702737, 1231 | "sku_id": 3581125134, 1232 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3195702737&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3581125134&referer_source=0" 1233 | } 1234 | ], 1235 | "is_anonymous": 1, 1236 | "quality_score": 0, 1237 | "pack_score": 5, 1238 | "buz_code": 0, 1239 | "can_additional": 1, 1240 | "disable_additional_msg": "", 1241 | "high_quality": 0, 1242 | "is_dp": 0, 1243 | "user_type": 0, 1244 | "satisfaction_icon": "", 1245 | "spu_id_list": [], 1246 | "accurate_comment_score": 0, 1247 | "biz_type": 0, 1248 | "useful_count": 2, 1249 | "current_user_useful": false, 1250 | "user_labels": [] 1251 | }, 1252 | { 1253 | "user_name": "匿名用户", 1254 | "ship_score": 0.0, 1255 | "ship_time": 27, 1256 | "comment": "#肉弹吐司# #生猛薯条#薯条没味道不香,吐司也感觉一般般……", 1257 | "comment_type": 4, 1258 | "order_time": 1601913600, 1259 | "comment_time": 1601913600, 1260 | "ctime": 0, 1261 | "order_comment_score": 3, 1262 | "praise_food_tip": "", 1263 | "critic_food_tip": "", 1264 | "wm_comment_id": 3748052865, 1265 | "user_id": 0, 1266 | "user_poi_comment_num": 1, 1267 | "add_comment_list": [], 1268 | "comment_labels": [], 1269 | "order_type": 1, 1270 | "delivery_type": 0, 1271 | "delivery_name": "", 1272 | "comment_pics": [ 1273 | { 1274 | "url": "https://p0.meituan.net/wmcomment/1d5ae626dd2da6f76b255f9b62f288c653736.jpg.webp", 1275 | "thumbnail_url": "https://p0.meituan.net/wmcomment/1d5ae626dd2da6f76b255f9b62f288c653736.jpg.webp" 1276 | } 1277 | ], 1278 | "user_pic_url": "http://p0.meituan.net/scarlett/8f283c9d7c6e7748b703502eaf4bb3ab5094.png", 1279 | "food_comment_score": 3, 1280 | "delivery_comment_score": 5, 1281 | "has_add_comment": false, 1282 | "is_picture_audited": false, 1283 | "poi_id": 0, 1284 | "scheme": "", 1285 | "comment_source_tip": "", 1286 | "comment_source_type": 3, 1287 | "praise_food_list": [], 1288 | "comment_scheme": [ 1289 | { 1290 | "keyword": "肉弹吐司", 1291 | "spu_id": 227678455, 1292 | "sku_id": 247520746, 1293 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678455&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247520746&referer_source=0" 1294 | }, 1295 | { 1296 | "keyword": "生猛薯条", 1297 | "spu_id": 253383467, 1298 | "sku_id": 275882961, 1299 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=253383467&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=275882961&referer_source=0" 1300 | } 1301 | ], 1302 | "is_anonymous": 1, 1303 | "quality_score": 0, 1304 | "pack_score": 3, 1305 | "buz_code": 0, 1306 | "can_additional": 1, 1307 | "disable_additional_msg": "", 1308 | "high_quality": 0, 1309 | "is_dp": 0, 1310 | "user_type": 0, 1311 | "satisfaction_icon": "", 1312 | "spu_id_list": [], 1313 | "accurate_comment_score": 0, 1314 | "biz_type": 0, 1315 | "useful_count": 0, 1316 | "current_user_useful": false, 1317 | "user_labels": [] 1318 | }, 1319 | { 1320 | "user_name": "DenT.", 1321 | "ship_score": 0.0, 1322 | "ship_time": 17, 1323 | "comment": "老客人点了十几回了!一如既往好好好好吃", 1324 | "comment_type": 4, 1325 | "order_time": 1606060800, 1326 | "comment_time": 1606060800, 1327 | "ctime": 0, 1328 | "order_comment_score": 5, 1329 | "praise_food_tip": "芝士牛肉堡,奶油蘑菇汤等", 1330 | "critic_food_tip": "", 1331 | "wm_comment_id": 3900997669, 1332 | "user_id": 384048859, 1333 | "user_poi_comment_num": 1, 1334 | "add_comment_list": [], 1335 | "comment_labels": [], 1336 | "order_type": 1, 1337 | "delivery_type": 0, 1338 | "delivery_name": "", 1339 | "comment_pics": [], 1340 | "user_pic_url": "https://img.meituan.net/avatar/5dacf55e8940fa6a3308aceb2202f4c231514.jpg", 1341 | "food_comment_score": 5, 1342 | "delivery_comment_score": 5, 1343 | "has_add_comment": false, 1344 | "is_picture_audited": false, 1345 | "poi_id": 0, 1346 | "scheme": "", 1347 | "comment_source_tip": "", 1348 | "comment_source_type": 3, 1349 | "praise_food_list": [ 1350 | { 1351 | "name": "芝士牛肉堡", 1352 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227680151&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=1491708526&referer_source=1", 1353 | "spu_id": 227680151, 1354 | "sku_id": 1491708526 1355 | }, 1356 | { 1357 | "name": "奶油蘑菇汤", 1358 | "schema_uri": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=227678470&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=247521257&referer_source=1", 1359 | "spu_id": 227678470, 1360 | "sku_id": 247521257 1361 | } 1362 | ], 1363 | "comment_scheme": [], 1364 | "is_anonymous": 0, 1365 | "quality_score": 0, 1366 | "pack_score": 5, 1367 | "buz_code": 0, 1368 | "can_additional": 1, 1369 | "disable_additional_msg": "", 1370 | "high_quality": 0, 1371 | "is_dp": 0, 1372 | "user_type": 0, 1373 | "satisfaction_icon": "", 1374 | "spu_id_list": [], 1375 | "accurate_comment_score": 0, 1376 | "biz_type": 0, 1377 | "useful_count": 0, 1378 | "current_user_useful": false, 1379 | "user_labels": [ 1380 | { 1381 | "type": 2, 1382 | "text": "回头客" 1383 | } 1384 | ] 1385 | }, 1386 | { 1387 | "user_name": "火锅业务爱好者", 1388 | "ship_score": 0.0, 1389 | "ship_time": 20, 1390 | "comment": "牛排太少了,吐司味道还可以", 1391 | "comment_type": 4, 1392 | "order_time": 1605196800, 1393 | "comment_time": 1605196800, 1394 | "ctime": 0, 1395 | "order_comment_score": 4, 1396 | "praise_food_tip": "", 1397 | "critic_food_tip": "", 1398 | "wm_comment_id": 3866073573, 1399 | "user_id": 226416095, 1400 | "user_poi_comment_num": 1, 1401 | "add_comment_list": [], 1402 | "comment_labels": [], 1403 | "order_type": 1, 1404 | "delivery_type": 0, 1405 | "delivery_name": "", 1406 | "comment_pics": [], 1407 | "user_pic_url": "https://img.meituan.net/avatar/ad48e4129ab9e8d9bf966197694f1a4e12536.jpg", 1408 | "food_comment_score": 4, 1409 | "delivery_comment_score": 5, 1410 | "has_add_comment": false, 1411 | "is_picture_audited": false, 1412 | "poi_id": 0, 1413 | "scheme": "", 1414 | "comment_source_tip": "", 1415 | "comment_source_type": 3, 1416 | "praise_food_list": [], 1417 | "comment_scheme": [ 1418 | { 1419 | "keyword": "厚切牛排吐司", 1420 | "spu_id": 3195702737, 1421 | "sku_id": 3581125134, 1422 | "scheme_url": "meituanwaimai://waimai.meituan.com/detail?buztype=0&spuid=3195702737&wmpoiid=1019617870594095&sputag=&activitytag=&sku_id=3581125134&referer_source=0" 1423 | } 1424 | ], 1425 | "is_anonymous": 0, 1426 | "quality_score": 0, 1427 | "pack_score": 5, 1428 | "buz_code": 0, 1429 | "can_additional": 1, 1430 | "disable_additional_msg": "", 1431 | "high_quality": 0, 1432 | "is_dp": 0, 1433 | "user_type": 0, 1434 | "satisfaction_icon": "", 1435 | "spu_id_list": [], 1436 | "accurate_comment_score": 0, 1437 | "biz_type": 0, 1438 | "useful_count": 0, 1439 | "current_user_useful": false, 1440 | "user_labels": [] 1441 | } 1442 | ], 1443 | "labels": [ 1444 | { 1445 | "label_id": 75, 1446 | "content": "味道赞", 1447 | "label_count": 24, 1448 | "label_star": 5 1449 | }, 1450 | { 1451 | "label_id": 80, 1452 | "content": "早餐", 1453 | "label_count": 6, 1454 | "label_star": 5 1455 | }, 1456 | { 1457 | "label_id": 36, 1458 | "content": "推荐", 1459 | "label_count": 4, 1460 | "label_star": 5 1461 | }, 1462 | { 1463 | "label_id": 29, 1464 | "content": "包装好", 1465 | "label_count": 4, 1466 | "label_star": 5 1467 | } 1468 | ], 1469 | "comment_categories": [], 1470 | "buz_code": 0, 1471 | "comment_praise_ratio": -1, 1472 | "has_more": true, 1473 | "friend_status_banner": { 1474 | "friend_status": 2, 1475 | "friend_status_tip": "", 1476 | "bind_schema": "" 1477 | }, 1478 | "scores": { 1479 | "comment_score": 5.0, 1480 | "delivery_score": 5.0, 1481 | "quality_score": 5.0, 1482 | "pack_score": 5.0, 1483 | "show": 1, 1484 | "satisfaction_rate": "100%" 1485 | }, 1486 | "tab": [ 1487 | { 1488 | "comment_score_type": 0, 1489 | "total_count": 446, 1490 | "comment_score_title": "外卖评价" 1491 | }, 1492 | { 1493 | "comment_score_type": 21, 1494 | "total_count": 104, 1495 | "comment_score_title": "到店评价(3.83分)" 1496 | } 1497 | ], 1498 | "comment_label_tips": [ 1499 | { 1500 | "level": 1, 1501 | "tip": "非常差" 1502 | }, 1503 | { 1504 | "level": 2, 1505 | "tip": "差" 1506 | }, 1507 | { 1508 | "level": 3, 1509 | "tip": "一般" 1510 | }, 1511 | { 1512 | "level": 4, 1513 | "tip": "满意" 1514 | }, 1515 | { 1516 | "level": 5, 1517 | "tip": "非常满意" 1518 | } 1519 | ], 1520 | "comment_tip_info": "记得餐后评价,给他人参考哦~", 1521 | "comments_dp": { 1522 | "show": 1, 1523 | "wm_poi_id": 1019617870594095, 1524 | "dp_poi_id": 79434229, 1525 | "title": "大众点评", 1526 | "comment_score": 3.5, 1527 | "total_count_desc": "104条到店评价", 1528 | "accurate_comment_score": 3.83, 1529 | "comments": [] 1530 | } 1531 | }, 1532 | "code": 0, 1533 | "msg": "成功", 1534 | "traceid": "-5066593757239299045" 1535 | } -------------------------------------------------------------------------------- /init.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import json 4 | 5 | os.system("adb forward tcp:27042 tcp:27042") 6 | os.system("adb forward tcp:27043 tcp:27043") 7 | 8 | with open("jscode.js", 'r', encoding="UTF-8") as f: 9 | js_code = f.read() 10 | 11 | HOST = "https://wmapi.meituan.com/api/v7/poi/channelpage" 12 | 13 | rpc_result = '' 14 | -------------------------------------------------------------------------------- /jscode.js: -------------------------------------------------------------------------------- 1 | qq 2831243095 2 | heyheyhey 3 | *_* 4 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import os 2 | from fake_useragent import UserAgent 3 | from init import js_code 4 | import frida 5 | import requests 6 | import time 7 | import json 8 | from sign import Signature 9 | 10 | rpc_result = '' 11 | 12 | 13 | def on_message(message, data): 14 | global rpc_result 15 | if message["type"] == "send": 16 | rpc_result = str(message["payload"]) 17 | 18 | elif message['type'] == "error": 19 | print("[ERROR] " + message["description"]) 20 | 21 | else: 22 | print(message) 23 | 24 | 25 | process = frida.get_remote_device().attach("com.sankuai.meituan.takeoutnew") 26 | 27 | script = process.create_script(js_code) # 创建js脚本 28 | script.on("message", on_message) 29 | script.load() # 加载脚本 30 | ua = UserAgent() 31 | 32 | 33 | class Meituan(object): 34 | def __init__(self): 35 | self.headers = { 36 | 'Content-Type': 'application/x-www-form-urlencoded', 37 | 'siua': '', 38 | 'retrofit_exec_time': '', 39 | 'Accept-Encoding': 'gzip', 40 | 'M-SHARK-TRACEID': '', 41 | 'User-Agent': 'hh', 42 | 'Host': 'wmapi.meituan.com', 43 | 'Connection': 'Keep-Alive', 44 | } 45 | self.offset = 0 46 | self.file_save_path = "/Users/mac/Desktop/成都/" 47 | 48 | def getShopList(self): 49 | params = ( 50 | ('utm_medium', 'android'), 51 | ('utm_content', ''), 52 | ('utm_source', '1011'), 53 | ('utm_term', '75204'), 54 | ('ci', '45'), 55 | ('utm_campaign', 'AwaimaiBwaimai'), 56 | ('uuid', ''), 57 | ('region_version', '1613545977790'), 58 | ('region_id', '0'), 59 | ) 60 | 61 | data = { 62 | 'seq_num': '0', 63 | # 用来计数,你看过多少店铺 64 | 'offset': str(self.offset), # 奇怪的参数 65 | 'dynamic_page': 'true', 66 | 'latitude': '', 67 | 'longitude': '', 68 | 'page_index': '0', # 似乎与seq_num同步,大过 1 就要登陆 69 | 'page_size': '0', 70 | 'sort_type': '0', 71 | 'category_type': '910', 72 | 'filter_type': '0', 73 | 'second_category_type': '0', 74 | 'navigate_type': '910', 75 | 'activity_filter_codes': '', 76 | 'slider_select_data': '', 77 | 'load_type': '3', 78 | 'preload': '0', 79 | 'trace_tag': '', 80 | 'rank_trace_id': '', 81 | 'rank_list_id': '', 82 | 'session_id': '', 83 | 'union_id': '', 84 | 'behavioral_characteristics': json.dumps( 85 | { 86 | "module_action": { 87 | "extra_info": { 88 | "factlist_offset_after_dedup": 100 89 | }, 90 | "request_type": 2 91 | }, 92 | "exp_info": { 93 | "exp_group_name": "poilist_dynamicPaging_exp", 94 | "exp_name": "B", 95 | "scene_name": "poilist_dynamicPaging", 96 | "jsBundle_id": "alita_waimai-ad-interaction-rmd" 97 | } 98 | } 99 | ).replace(' ', ''), 100 | 'wm_logintoken': '', 101 | 'wm_mac': '02:00:00:00:00:00', 102 | 'poilist_mt_cityid': '45', 103 | 'request_id': '', 104 | 'uuid': '', 105 | 'wm_actual_longitude': '', 106 | 'wm_actual_latitude': '', 107 | 'wm_ctype': 'android', 108 | 'app': '4', 109 | 'wm_visitid': '', 110 | 'userid': '', 111 | 'wm_did': '', 112 | 'platform': '4', 113 | 'seq_id': '755', 114 | 'wm_dversion': '25_7.1.1', 115 | 116 | 'wm_longitude': '104066363', # 这个来定位纬度!!! 9位 117 | 'wm_latitude': '30657353', # 这个来定位经度!!! 8位 118 | 119 | 'oa_id': '', 120 | 'wm_channel': '1011', 121 | 'wm_uuid': '', 122 | 'poilist_wm_cityid': '500100', 123 | 'wm_dtype': 'MI MIX 2', 124 | 'version': '7.54.2', 125 | 'push_token': '', 126 | 'personalized': '1', 127 | 'partner': '4', 128 | 'wm_appversion': '7.53.3', 129 | 'waimai_sign': '', 130 | 'wm_seq': '387', 131 | 'req_time': '' 132 | } 133 | 134 | # ================================= 135 | nt = int(str(time.time()).replace('.', '')[:13]) 136 | data.update({ 137 | 'req_time': str(nt) # 更新data里的时间戳 138 | }) 139 | 140 | # 更新params里的时间戳 141 | params = dict(params) 142 | params['region_version'] = str(nt) 143 | params = tuple([(k, params.get(k)) for k in params]) 144 | 145 | # 更新headers里面的时间戳 146 | self.headers['retrofit_exec_time'] = str(nt) 147 | 148 | # 更新 User-Agent 149 | # self.headers["User-Agent"] = '123' 150 | # ================================ 151 | 152 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 153 | dataString = (''.join([key + '=' + data.get(key) + "&" for key in data])) 154 | 155 | # 得到 mtgsig 并加入headers里 156 | Signature("POST", "/api/v7/poi/channelpage", dataString, paramsString, script, "shopList").getMtgSig() 157 | self.headers.update({ 158 | "mtgsig": rpc_result 159 | }) 160 | 161 | # 执行请求 162 | response = requests.post( 163 | 'https://wmapi.meituan.com/api/v7/poi/channelpage', headers=self.headers, params=params, data=data 164 | ) 165 | 166 | return response.json() 167 | 168 | def getShopDetail(self, poi_id): 169 | uuid = "12dkslajdsahduixsayd98a78978213789dusa9ds98aud98saud98saud98asud9" 170 | params = ( 171 | ('utm_medium', 'android'), 172 | ('utm_content', ''), 173 | ('utm_source', '1011'), 174 | ('utm_term', '75303'), 175 | ('ci', '45'), 176 | ('utm_campaign', 'AwaimaiBwaimai'), 177 | ('uuid', uuid), 178 | ('region_version', '1614177415914'), 179 | ('region_id', '1000530100'), 180 | ) 181 | 182 | data = { 183 | 'wm_poi_id': poi_id, 184 | 'product_spu_id': '0', 185 | 'recall_type': '0', 186 | 'search_word': '', 187 | 'search_log_id': '', 188 | 'page_index': '0', 189 | 'source_page_type': '0', 190 | 'style_template_ids': '', 191 | 'allowance_alliance_scenes': '', 192 | 'content_info': '', 193 | 'ad_activity_flag': '', 194 | 'brand_page_type': '0', 195 | 'wm_latitude': '29436013', 196 | # 这个东西要检测 197 | 'wm_logintoken': 'zUE16KqZ3XFQ1WtRdl0OvroChE8AAAAAzAwAAJ378QLes7UuG4MjeSNM9grqW-8mQt4inMbTJ90dx8mBWKppFx6exnYK5wIHtAG2jE', 198 | 199 | 'wm_mac': '02:00:00:00:00:00', 200 | 'poilist_mt_cityid': '45', 201 | 'request_id': '', 202 | 'uuid': uuid, 203 | 'wm_actual_longitude': '106534937', 204 | 'wm_actual_latitude': '29435075', 205 | 'wm_ctype': 'android', 206 | 'app': '4', 207 | 'wm_visitid': '', 208 | 'userid': '', 209 | 'wm_did': '', 210 | 'platform': '4', 211 | 'seq_id': '57', 212 | 'wm_dversion': '25_7.1.1', 213 | 'wm_longitude': '106535180', 214 | 'oa_id': '', 215 | 'wm_channel': '1011', 216 | 'wm_uuid': uuid, 217 | 'poilist_wm_cityid': '500100', 218 | 'wm_dtype': 'MI MAX 2', 219 | 'version': '7.53.3', 220 | 'push_token': '', 221 | 'personalized': '1', 222 | 'partner': '4', 223 | 'wm_appversion': '7.53.3', 224 | 'waimai_sign': '', 225 | 'wm_seq': '39', 226 | 'req_time': '' 227 | } 228 | 229 | # ================================= 230 | nt = int(str(time.time()).replace('.', '')[:13]) 231 | data.update({ 232 | 'req_time': str(nt) # 更新data里的时间戳 233 | }) 234 | 235 | # 更新params里的时间戳 236 | params = dict(params) 237 | params['region_version'] = str(nt) 238 | params = tuple([(k, params.get(k)) for k in params]) 239 | 240 | # 更新headers里面的时间戳 241 | self.headers['retrofit_exec_time'] = str(nt) 242 | # 更新 User-Agent 243 | # self.headers["User-Agent"] = '123' 244 | # ================================ 245 | 246 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 247 | dataString = (''.join([key + '=' + data.get(key) + "&" for key in data])) 248 | 249 | # 得到 mtgsig 并加入headers里 250 | Signature("POST", "/api/v8/poi/food", dataString, paramsString, script, "shopDetail").getMtgSig() 251 | self.headers.update({ 252 | "mtgsig": rpc_result 253 | }) 254 | 255 | response = requests.post('https://wmapi.meituan.com/api/v8/poi/food', headers=self.headers, params=params, 256 | data=data) 257 | print(response.json()) 258 | return response.json() 259 | 260 | def getShopComment(self, poi_id, page_offset): 261 | params = ( 262 | ('utm_medium', 'android'), 263 | ('utm_content', ''), 264 | ('utm_source', '1011'), 265 | ('utm_term', '75303'), 266 | ('ci', '45'), 267 | ('utm_campaign', 'AwaimaiBwaimai'), 268 | ('uuid', ''), 269 | ('region_version', '1614176032912'), 270 | ('region_id', '1000530100'), 271 | ) 272 | 273 | data = { 274 | 'wmpoiid': str(poi_id), 275 | 'page_offset': str(page_offset), 276 | 'page_size': '50', 277 | 'comment_score_type': '0', 278 | 'label_id': '0', 279 | 'wm_latitude': '', 280 | 'wm_logintoken': '', 281 | 'wm_mac': '', 282 | 'poilist_mt_cityid': '45', 283 | 'request_id': '', 284 | 'uuid': '', 285 | 'wm_actual_longitude': '', 286 | 'wm_actual_latitude': '', 287 | 'wm_ctype': 'android', 288 | 'app': '4', 289 | 'wm_visitid': '', 290 | 'userid': '372837482832', # 他对这个有检测 291 | 'wm_did': '', 292 | 'platform': '4', 293 | 'seq_id': '71', 294 | 'wm_dversion': '25_7.1.1', 295 | 'wm_longitude': '', 296 | 'oa_id': '', 297 | 'wm_channel': '1011', 298 | 'wm_uuid': '', 299 | 'poilist_wm_cityid': '500100', 300 | 'wm_dtype': 'Mi MAX 2', 301 | 'version': '7.54.2', 302 | 'push_token': '', 303 | 'personalized': '1', 304 | 'partner': '4', 305 | 'wm_appversion': '7.53.3', 306 | 'waimai_sign': '', 307 | 'wm_seq': '48', 308 | 'req_time': '' 309 | } 310 | 311 | # ================================= 312 | nt = int(str(time.time()).replace('.', '')[:13]) 313 | data.update({ 314 | 'req_time': str(nt) # 更新data里的时间戳 315 | }) 316 | 317 | # 更新params里的时间戳 318 | params = dict(params) 319 | params['region_version'] = str(nt) 320 | params = tuple([(k, params.get(k)) for k in params]) 321 | 322 | # 更新headers里面的时间戳 323 | self.headers['retrofit_exec_time'] = str(nt) 324 | 325 | # 更新 User-Agent 326 | # self.headers["User-Agent"] = '123' 327 | # ================================ 328 | 329 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 330 | dataString = (''.join([key + '=' + str(data.get(key)) + "&" for key in data])) 331 | 332 | # 得到 mtgsig 并加入headers里 333 | Signature("POST", "/api/v6/comment/poi", dataString, paramsString, script, "comment").getMtgSig() 334 | self.headers.update({ 335 | "mtgsig": rpc_result 336 | }) 337 | 338 | response = requests.post( 339 | 'https://wmapi.meituan.com/api/v6/comment/poi', 340 | headers=self.headers, 341 | params=params, 342 | data=data 343 | ) 344 | 345 | return response.json() 346 | 347 | def start(self): 348 | while True: 349 | shopListDict = self.getShopList() 350 | if shopListDict.get('msg') == "成功" and shopListDict.get('data').get('poilist'): 351 | # 开始在 poilist 中遍历 352 | for _ in shopListDict.get("data").get('poilist'): 353 | poi_save_path = self.file_save_path + str(_.get('id')) 354 | if not os.path.exists(poi_save_path): 355 | os.mkdir(poi_save_path) 356 | 357 | # 入袋为安,先写为妙 358 | with open(poi_save_path + '/shop.json', 'w', encoding="UTF-8") as f: 359 | f.write(json.dumps( 360 | _, 361 | indent=4, 362 | ensure_ascii=False 363 | )) 364 | print("[*] ", str(_.get('name')) + "粗略数据保存成功!") 365 | time.sleep(1) 366 | 367 | # 获取评论 368 | comment_save_path = poi_save_path + '/comments' 369 | if not os.path.exists(comment_save_path): 370 | os.mkdir(comment_save_path) 371 | 372 | current_save_num = 0 373 | # 进入一个死循环,判断是否把评论json请求完毕 374 | # 请求完毕则跳出 375 | while True: 376 | commentsDict = self.getShopComment(_.get('id'), str(current_save_num * 50)) 377 | if commentsDict.get("msg") == '成功' and commentsDict.get('data').get('comments'): 378 | # 如果评论返回成功且评论列表不为空 379 | # 就开始保存到文件里 380 | with open(comment_save_path + "/" + str(current_save_num) + ".json", 'w', 381 | encoding="UTF-8") as f: 382 | f.write(json.dumps(commentsDict, indent=4, ensure_ascii=False)) 383 | print("[*] ", str(_.get('name')) + "评论 " + str(current_save_num) + " 保存成功!") 384 | 385 | if commentsDict.get("data").get("has_more"): 386 | # 如果接下来还存在评论没有爬完的话 387 | # 就自增一,继续爬取 388 | current_save_num += 1 389 | time.sleep(1) 390 | 391 | else: 392 | # 不存在的话就跳出循环,结束爬取 393 | break 394 | 395 | elif commentsDict.get('code') == 801: 396 | # {'data': {'wait_time': 2}, 'subCodeString': '0', 'code': 801, 'msg': '您访问太频繁了,请稍后重试', 'traceid': '-6290469426780653685'} 397 | # 访问太频繁 398 | print("[*] 请求评论频繁,休息5秒...") 399 | time.sleep(5) 400 | 401 | else: 402 | print("\n一些意料之外的错误发生了:") 403 | print(commentsDict) 404 | time.sleep(5) 405 | 406 | time.sleep(1) 407 | 408 | # 获取店铺详细信息 409 | shop_detail_save_path = poi_save_path + '/shopDetail.json' 410 | if not shop_detail_save_path: 411 | os.mkdir(shop_detail_save_path) 412 | shopDetail = self.getShopDetail(str(_.get('id'))) 413 | 414 | if shopDetail.get('msg') == "成功" and shopDetail.get('data').get('poi_info'): 415 | # 检测请求是否成功 416 | # 请求成功则开始保存 417 | with open(shop_detail_save_path, 'w', encoding="UTF-8") as f: 418 | f.write(json.dumps( 419 | shopDetail, 420 | indent=4, 421 | ensure_ascii=False 422 | )) 423 | 424 | print("[*] ", str(_.get("name")) + "详细数据保存完成!") 425 | 426 | else: 427 | # 本来应该检测完整性 428 | # 嫌麻烦,先跳过 429 | continue 430 | 431 | print("[***]", str(_.get("name")), "所有数据保存完成!!!", "\n") 432 | 433 | # 遍历完毕,开始判断是否存在下一页 434 | if shopListDict.get("data").get("poi_has_next_page"): 435 | # 改变偏移量 436 | # 避免下一次请求到同样的店铺 437 | self.offset += len(shopListDict.get('data').get('poilist')) 438 | time.sleep(1) 439 | print("开始进行下一页shopList!") 440 | print("[*] ", self.offset) 441 | 442 | else: 443 | print("保存完毕!") 444 | print("所有工作都做完了!!") 445 | # 保存完毕,跳出死循环 446 | break 447 | 448 | elif shopListDict.get('code') == 801: 449 | print("[*] ", "请求商家列表频繁!休息5秒。。。") 450 | time.sleep(5) 451 | 452 | elif not shopListDict.get("poi_has_next_page"): 453 | print("保存完成!!!!") 454 | 455 | 456 | if __name__ == '__main__': 457 | Meituan().start() 458 | -------------------------------------------------------------------------------- /note: -------------------------------------------------------------------------------- 1 | shopList中需要的参数 2 | | 3 | |----------id 4 | |----------name 5 | |----------latitude 6 | |----------longitude 7 | |----------address 8 | |----------month_sales_tip 9 | |----------wm_poi_score 10 | |----------trade_area 11 | |----------shipping_time 12 | |----------pic_url 13 | |----------third_category 14 | |---------- 15 | | 16 | | 17 | | 18 | | -------------------------------------------------------------------------------- /request.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import time 3 | import frida 4 | import os 5 | 6 | from sign import Signature 7 | 8 | os.system("adb forward tcp:27042 tcp:27042") 9 | os.system("adb forward tcp:27043 tcp:27043") 10 | rpc_result = '' 11 | with open("jscode.js", 'r', encoding="UTF-8") as f: 12 | js_code = f.read() 13 | 14 | 15 | def on_message(message, data): 16 | global rpc_result 17 | if message["type"] == "send": 18 | print("[*] {0}".format(message["payload"])) 19 | rpc_result = str(message["payload"]) 20 | 21 | elif message['type'] == "error": 22 | print("[ERROR] " + message["description"]) 23 | 24 | else: 25 | print(message) 26 | 27 | 28 | process = frida.get_remote_device().attach("com.sankuai.meituan.takeoutnew") 29 | 30 | script = process.create_script(js_code) # 创建js脚本 31 | script.on("message", on_message) 32 | script.load() # 加载脚本 33 | 34 | headers = { 35 | 'mtgsig': '{"a0":"1.5","a1":"e68c4c18-35ec-4972-84e4-32a0836455a8","a2":"6376acd393ebf6d32395353be6d3f14225ec4ef0","a3":2,"a4":1614246247,"a5":"j9tzEdj9gY+I4Khhyn330m8DxMjEoybbJ6oRN1+1qSDH3UcBS3SyMqsulyiCpIkY0dUnP9lpctF6Jn1eyGMe2CCw8mWjhl/5oQ+17M/JsjZSJSzDEotKXUi0r7mcfhIgxuI/HrDCaJwKjBhGisB8gmy7Qsqf89lvr5+s3gpnU+8LizFyya/1iEwGBtUZJuBQsHOlfQCbgQ0jlr+XN18JNEat8Lpo8PhFSMJMZeLndJDaNOuSr1kRurJed5cW4UIpoEhfTARwdar8CV5LH6LMjZDZh1aQbpUXgetsF1xKKF7DS5nn9OKfDb+p8i7aFxhZdpzlm9oDfJovzYVrry5zbCrSb2IPyqSElFwk7ZHvRBbTDuashPRR2jY41Lx47A==","a6":0,"d1":"b664b3ea4dcf2c54f4503e4023764a453c7b870b"}', 36 | 'siua': 'a2.0+X30+K7m/d80owfbU4pPqVkztUv/oBluSGRvIG7A7hd40eXay7YSAZKVtwwJjo1nOR1OnPeEEFMkER/RMLxmd6He5pLJy5hJRNvB8Yo9b86FVj+ZVXddxrtfpzlLqLxgoODhkqpHRijdshFcU8ZrKjB+iB8YiV7J0OfH6BFUcg+ezWbjL94kikWIU9VuHsL+HVj/WwVLF+anQ5Lx6goICMO1/d/b9H1NDAvabbrFz8xD9SBvitnI+i677ceSQe7VN25m7Ka/Nqi0+SnK9W5GCtkOwkL2fyyl9VFZCu8kP1/BECuBsVpr3ivdeVQanjps2wNUW8RSyMekj5u0gnQyL4acIRmhyEU0/ZM0VGleTYeE2x0tQ7RQORIndpPQ5n3Sqzzk2hBtLYZN5vtWN02sx/d2C6N7E7dWWF1dM+hgaVIHNt9e/EKI3DdQ9hTNIljZeOVWNrwkUHuWvd7H1kUSdG372yYBLLcmT8tHtNEQL2LBROtBuQuaW4oj6Dk7GNVmWkMZIQzM/MUu/Iq8n6/NO5amlsvHo49xI7iRFW+4gdHGsanqOwbDNHbo7K28I1lEUUOHMEs0rgdQ+qFGgV+zLuo5FB3QgzlCQcWW8FMQ8k4InEV8bbOH4CKJ/FVerMdicknsmlEKAlv4nZqhg+mjI2Q/92G9zpDr6/Go1vL1eUk=', 37 | 'Content-Type': 'application/x-www-form-urlencoded', 38 | 'retrofit_exec_time': '1614246247095', 39 | 'Accept-Encoding': 'gzip', 40 | 'M-SHARK-TRACEID': '1118c216b6de4e84a60981ed172f5ca81cea161344370271699288a12a481614246247158b27ae3', 41 | 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; MI MAX 2 MIUI/9.8.29)', 42 | 'Host': 'wmapi.meituan.com', 43 | 'Connection': 'Keep-Alive', 44 | } 45 | 46 | params = ( 47 | ('utm_medium', 'android'), 48 | ('utm_content', '868415032525454'), 49 | ('utm_source', '1011'), 50 | ('utm_term', '75303'), 51 | ('ci', '45'), 52 | ('utm_campaign', 'AwaimaiBwaimai'), 53 | ('uuid', '00000000000008C216B6DE4E84A60981ED172F5CA81CEA161344370271699288'), 54 | ('region_version', '1614246134693'), 55 | ('region_id', '1000530100'), 56 | ) 57 | 58 | data = { 59 | 'wmpoiid': '908511361599386', 60 | 'page_offset': '0', 61 | 'page_size': '20', 62 | 'comment_score_type': '0', 63 | 'label_id': '0', 64 | 'wm_latitude': '29465667', 65 | 'wm_logintoken': 'zUE16KqZ3XFQ1WtRdl0OvroChE8AAAAAzAwAAJ378QLes7UuG4MjeSNM9grqW-8mQt4inMbTJ90dx8mBWKppFx6exnYK5wIHtAG2jA', 66 | 'wm_mac': '02:00:00:00:00:00', 67 | 'poilist_mt_cityid': '45', 68 | 'request_id': '5E1C692E-4ECE-4858-8980-38974E764D77', 69 | 'uuid': '00000000000008C216B6DE4E84A60981ED172F5CA81CEA161344370271699288', 70 | 'wm_actual_longitude': '106540890', 71 | 'wm_actual_latitude': '29465029', 72 | 'wm_ctype': 'android', 73 | 'app': '4', 74 | 'wm_visitid': '5e80f4ae-b63a-4e23-8517-ae485889b2a2', 75 | 'userid': '911426266', 76 | 'wm_did': '868415032525454', 77 | 'platform': '4', 78 | 'seq_id': '114', 79 | 'wm_dversion': '25_7.1.1', 80 | 'wm_longitude': '106543519', 81 | 'oa_id': '', 82 | 'wm_channel': '1011', 83 | 'wm_uuid': '00000000000008C216B6DE4E84A60981ED172F5CA81CEA161344370271699288', 84 | 'poilist_wm_cityid': '500100', 85 | 'wm_dtype': 'MI MAX 2', 86 | 'version': '7.53.3', 87 | 'push_token': 'dpsh0cf9ffa87d5741e4ba4dc164b5558702atpu', 88 | 'personalized': '1', 89 | 'partner': '4', 90 | 'wm_appversion': '7.53.3', 91 | 'waimai_sign': 'Xqnfwe3wv/f/VuS6UHCAHjz9Lpsqu4h5ut0AxJl+UAT/bi6XXCGhuotkEUQ+fSIrEr17LOU3SzP7gFYk9o7euQ8b+zrTmkLhmcysUzj1BQQhX1feVNWusfAPn3vSUQcQ3FunM6qKt9Ock8uUfGwIn0YVZmddL/vp9+5h8gUDIMg=', 92 | 'wm_seq': '68', 93 | 'req_time': '1614246247039' 94 | } 95 | 96 | # ================================= 97 | nt = int(str(time.time()).replace('.', '')[:13]) 98 | data.update({ 99 | 'req_time': str(nt) # 更新data里的时间戳 100 | }) 101 | 102 | # 更新params里的时间戳 103 | params = dict(params) 104 | params['region_version'] = str(nt) 105 | params = tuple([(k, params.get(k)) for k in params]) 106 | 107 | # 更新headers里面的时间戳 108 | headers['retrofit_exec_time'] = str(nt) 109 | # ================================ 110 | 111 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 112 | dataString = (''.join([key + '=' + data.get(key) + "&" for key in data])) 113 | 114 | # 得到 mtgsig 并加入headers里 115 | Signature("POST", "/api/v8/poi/food", dataString, paramsString, script, "shopDetail").getMtgSig() 116 | headers.update({ 117 | "mtgsig": rpc_result 118 | }) 119 | 120 | response = requests.post('https://wmapi.meituan.com/api/v8/poi/food', headers=headers, params=params, data=data) 121 | 122 | print(response.text) 123 | -------------------------------------------------------------------------------- /shopList.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "poi_has_next_page": true, 4 | "poi_total_num": 1, 5 | "has_activity": false, 6 | "marketing_window": [], 7 | "activity_id": 0, 8 | "poilist": [ 9 | { 10 | "id": 1019617870594095, 11 | "name": "肉弹吐司(金沙店)", 12 | "status": 1, 13 | "status_desc": "", 14 | "status_sub_desc": "", 15 | "pic_url": "http://p0.meituan.net/business/8f8bcdc74d004f64a401229bde9acadd302162.png", 16 | "latitude": 30675782, 17 | "longitude": 103900445, 18 | "address": "蜀源路57号", 19 | "month_sales_tip": "月售700", 20 | "wm_poi_score": 5.0, 21 | "distance": "4.3km", 22 | "location_tip": "", 23 | "poi_type_icon": "http://p0.meituan.net/scarlett/c965f6288a36e485ab382958ab1b857f5735.png", 24 | "poi_type_icon_type": 0, 25 | "poi_type_icon_text": "品牌", 26 | "poi_mark_icon": "", 27 | "poi_promotion_pic": "", 28 | "delivery_type": 1, 29 | "delivery_type_icon": "http://p1.meituan.net/aichequan/3bab9f9057acb373e0b31e7d19fd46673704.png", 30 | "only_self_delivery": 0, 31 | "insurance_type": 0, 32 | "insurance_icon": "", 33 | "delivery_time_tip": "36分钟", 34 | "shipping_fee_tip": "配送 ¥1", 35 | "shipping_fee": 0.0, 36 | "origin_shipping_fee_tip": "¥5", 37 | "min_price_tip": "起送 ¥20", 38 | "average_price_tip": "人均 ¥22", 39 | "self_delivery_icon": "", 40 | "story_icon": "", 41 | "is_favorite": 0, 42 | "third_category": "其他西餐", 43 | "closing_tips": "", 44 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1019617870594095&spu_id=0", 45 | "paotui_scheme_context": "", 46 | "paotui_scheme": "", 47 | "trade_area": "府南新区", 48 | "distance_display_control": 0, 49 | "poi_recommend_pic_url": "https://p0.meituan.net/rmscashier/71f9a5827afdf49c3e1d87e72fea4f7d691200.jpg", 50 | "shipping_time": "07:40-21:10", 51 | "biz_type": 1, 52 | "img_type": 0, 53 | "img_style": 0, 54 | "discounts2": [], 55 | "log_field": { 56 | "poi_type_icon_type": 2, 57 | "recommend_type": 0, 58 | "average_delivery_time": 36, 59 | "search_log_id": "" 60 | }, 61 | "label_info": [], 62 | "use_poi_tags_field": false, 63 | "recommend_level_type": 0, 64 | "poi_extend_status": 0, 65 | "poi_extend_status_desc": "", 66 | "non_delivery_reason": "", 67 | "poi_is_allowance_alliance": false, 68 | "container_template": { 69 | "type": 0, 70 | "tag_icon": "" 71 | }, 72 | "ad_type": 0, 73 | "ad_attr": "", 74 | "charge_info": "", 75 | "rank_label_info": "", 76 | "ad_mark": false, 77 | "allowance_alliance_scenes": "", 78 | "top_pic": "", 79 | "suggest_label_info": [] 80 | }, 81 | { 82 | "id": 1024406759096626, 83 | "name": "绝味鸭脖(光华村店)", 84 | "status": 1, 85 | "status_desc": "", 86 | "status_sub_desc": "", 87 | "pic_url": "http://p1.meituan.net/waimaipoi/bb937d469c2cb7f44ca572797f295fbb35261.jpg", 88 | "latitude": 30627778, 89 | "longitude": 104110082, 90 | "address": "光华村街155号", 91 | "month_sales_tip": "月售1000", 92 | "wm_poi_score": 5.0, 93 | "distance": "4.0km", 94 | "location_tip": "", 95 | "poi_type_icon": "http://p0.meituan.net/scarlett/c965f6288a36e485ab382958ab1b857f5735.png", 96 | "poi_type_icon_type": 0, 97 | "poi_type_icon_text": "品牌", 98 | "poi_mark_icon": "", 99 | "poi_promotion_pic": "", 100 | "delivery_type": 0, 101 | "delivery_type_icon": "", 102 | "only_self_delivery": 0, 103 | "insurance_type": 0, 104 | "insurance_icon": "", 105 | "delivery_time_tip": "44分钟", 106 | "shipping_fee_tip": "配送 ¥6", 107 | "shipping_fee": 0.0, 108 | "origin_shipping_fee_tip": "¥7.5", 109 | "min_price_tip": "起送 ¥20", 110 | "average_price_tip": "", 111 | "shipping_time_info": { 112 | "reservation_status": 0, 113 | "status_content": "接受预订", 114 | "desc_content": "09:10后配送" 115 | }, 116 | "self_delivery_icon": "http://p1.meituan.net/aichequan/d7b1f1f28a2523c45ffb34555f894cb22489.png", 117 | "story_icon": "", 118 | "is_favorite": 0, 119 | "third_category": "卤味类小吃", 120 | "closing_tips": "", 121 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1024406759096626&spu_id=0", 122 | "paotui_scheme_context": "", 123 | "paotui_scheme": "", 124 | "trade_area": "光华", 125 | "distance_display_control": 0, 126 | "poi_recommend_pic_url": "http://p1.meituan.net/wmproduct/0566072c7c2be14c3bc6e45ea6a1403d439806.jpg", 127 | "shipping_time": "09:10-23:50", 128 | "biz_type": 1, 129 | "img_type": 0, 130 | "img_style": 0, 131 | "discounts2": [], 132 | "log_field": { 133 | "poi_type_icon_type": 2, 134 | "recommend_type": 0, 135 | "average_delivery_time": 44, 136 | "search_log_id": "" 137 | }, 138 | "label_info": [], 139 | "use_poi_tags_field": false, 140 | "recommend_level_type": 0, 141 | "poi_extend_status": 0, 142 | "poi_extend_status_desc": "", 143 | "non_delivery_reason": "", 144 | "poi_is_allowance_alliance": false, 145 | "container_template": { 146 | "type": 0, 147 | "tag_icon": "" 148 | }, 149 | "ad_type": 0, 150 | "ad_attr": "", 151 | "charge_info": "", 152 | "rank_label_info": "", 153 | "ad_mark": false, 154 | "allowance_alliance_scenes": "", 155 | "top_pic": "", 156 | "suggest_label_info": [] 157 | }, 158 | { 159 | "id": 1025514860703470, 160 | "name": "谢氏九味包", 161 | "status": 1, 162 | "status_desc": "", 163 | "status_sub_desc": "", 164 | "pic_url": "http://p0.meituan.net/waimaipoi/1d6469052cba844cf314fc426c63dfee22528.jpg", 165 | "latitude": 30593210, 166 | "longitude": 104012528, 167 | "address": "四川省成都市武侯区机投桥街道潮音路33号附1号", 168 | "month_sales_tip": "月售0", 169 | "wm_poi_score": 0.0, 170 | "distance": "3.3km", 171 | "location_tip": "", 172 | "poi_type_icon": "", 173 | "poi_type_icon_type": 0, 174 | "poi_type_icon_text": "", 175 | "poi_mark_icon": "", 176 | "poi_promotion_pic": "", 177 | "delivery_type": 0, 178 | "delivery_type_icon": "", 179 | "only_self_delivery": 0, 180 | "insurance_type": 0, 181 | "insurance_icon": "", 182 | "delivery_time_tip": "44分钟", 183 | "shipping_fee_tip": "免配送费", 184 | "shipping_fee": 0.0, 185 | "origin_shipping_fee_tip": "", 186 | "min_price_tip": "起送 ¥15", 187 | "average_price_tip": "", 188 | "self_delivery_icon": "", 189 | "story_icon": "", 190 | "is_favorite": 0, 191 | "third_category": "包子/生煎", 192 | "closing_tips": "", 193 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1025514860703470&spu_id=0", 194 | "paotui_scheme_context": "", 195 | "paotui_scheme": "", 196 | "trade_area": "", 197 | "distance_display_control": 0, 198 | "poi_recommend_pic_url": "", 199 | "shipping_time": "00:00-06:00,06:30-20:00", 200 | "biz_type": 1, 201 | "img_type": 0, 202 | "img_style": 0, 203 | "discounts2": [], 204 | "log_field": { 205 | "poi_type_icon_type": 0, 206 | "recommend_type": 0, 207 | "average_delivery_time": 44, 208 | "search_log_id": "" 209 | }, 210 | "label_info": [], 211 | "use_poi_tags_field": false, 212 | "recommend_level_type": 0, 213 | "poi_extend_status": 0, 214 | "poi_extend_status_desc": "", 215 | "non_delivery_reason": "", 216 | "poi_is_allowance_alliance": false, 217 | "container_template": { 218 | "type": 0, 219 | "tag_icon": "" 220 | }, 221 | "ad_type": 0, 222 | "ad_attr": "", 223 | "charge_info": "", 224 | "rank_label_info": "", 225 | "ad_mark": false, 226 | "allowance_alliance_scenes": "", 227 | "top_pic": "", 228 | "suggest_label_info": [] 229 | }, 230 | { 231 | "id": 864612500885530, 232 | "name": "隆江猪脚饭(中铁西城店)", 233 | "status": 1, 234 | "status_desc": "", 235 | "status_sub_desc": "", 236 | "pic_url": "http://p0.meituan.net/waimaipoi/303466306dcff937d3e2162709ad0ee479055.jpg", 237 | "latitude": 30733020, 238 | "longitude": 103974852, 239 | "address": "四川省成都市青羊区光华东三路486号3栋1层附107号", 240 | "month_sales_tip": "月售300", 241 | "wm_poi_score": 0.0, 242 | "distance": "2.9km", 243 | "location_tip": "", 244 | "poi_type_icon": "", 245 | "poi_type_icon_type": 0, 246 | "poi_type_icon_text": "", 247 | "poi_mark_icon": "", 248 | "poi_promotion_pic": "", 249 | "delivery_type": 0, 250 | "delivery_type_icon": "", 251 | "only_self_delivery": 0, 252 | "insurance_type": 0, 253 | "insurance_icon": "", 254 | "delivery_time_tip": "50分钟", 255 | "shipping_fee_tip": "配送 ¥1", 256 | "shipping_fee": 0.0, 257 | "origin_shipping_fee_tip": "¥3", 258 | "min_price_tip": "起送 ¥15", 259 | "average_price_tip": "人均 ¥25", 260 | "shipping_time_info": { 261 | "reservation_status": 0, 262 | "status_content": "接受预订", 263 | "desc_content": "10:00后配送" 264 | }, 265 | "self_delivery_icon": "", 266 | "story_icon": "", 267 | "is_favorite": 0, 268 | "third_category": "其他饭类套餐", 269 | "closing_tips": "", 270 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=864612500885530&spu_id=0", 271 | "paotui_scheme_context": "", 272 | "paotui_scheme": "", 273 | "trade_area": "中坝", 274 | "distance_display_control": 0, 275 | "poi_recommend_pic_url": "http://p0.meituan.net/wmproductdwm/1fb2b8c2257137ed78a8433d929cb621112833.jpg", 276 | "shipping_time": "10:00-20:30", 277 | "biz_type": 1, 278 | "img_type": 0, 279 | "img_style": 0, 280 | "discounts2": [], 281 | "log_field": { 282 | "poi_type_icon_type": 0, 283 | "recommend_type": 0, 284 | "average_delivery_time": 50, 285 | "search_log_id": "" 286 | }, 287 | "label_info": [], 288 | "use_poi_tags_field": false, 289 | "recommend_level_type": 0, 290 | "poi_extend_status": 0, 291 | "poi_extend_status_desc": "", 292 | "non_delivery_reason": "", 293 | "poi_is_allowance_alliance": false, 294 | "container_template": { 295 | "type": 0, 296 | "tag_icon": "" 297 | }, 298 | "ad_type": 0, 299 | "ad_attr": "", 300 | "charge_info": "", 301 | "rank_label_info": "", 302 | "ad_mark": false, 303 | "allowance_alliance_scenes": "", 304 | "top_pic": "", 305 | "suggest_label_info": [] 306 | }, 307 | { 308 | "id": 1092494875627989, 309 | "name": "老麻鲜香抄手", 310 | "status": 3, 311 | "status_desc": "休息中", 312 | "status_sub_desc": "", 313 | "pic_url": "https://p0.meituan.net/waimaipoi/1ee9c8e038df4274a5a5cf91ed622bd8157696.jpg", 314 | "latitude": 30715524, 315 | "longitude": 104086756, 316 | "address": "成都市武侯区武科东一路16号1栋1层附2号", 317 | "month_sales_tip": "月售100", 318 | "wm_poi_score": 0.0, 319 | "distance": "5.6km", 320 | "location_tip": "", 321 | "poi_type_icon": "", 322 | "poi_type_icon_type": 0, 323 | "poi_type_icon_text": "", 324 | "poi_mark_icon": "", 325 | "poi_promotion_pic": "", 326 | "delivery_type": 0, 327 | "delivery_type_icon": "", 328 | "only_self_delivery": 0, 329 | "insurance_type": 0, 330 | "insurance_icon": "", 331 | "delivery_time_tip": "43分钟", 332 | "shipping_fee_tip": "配送 ¥7", 333 | "shipping_fee": 0.0, 334 | "origin_shipping_fee_tip": "", 335 | "min_price_tip": "起送 ¥15", 336 | "average_price_tip": "", 337 | "self_delivery_icon": "", 338 | "story_icon": "", 339 | "is_favorite": 0, 340 | "third_category": "其他面馆", 341 | "closing_tips": "", 342 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1092494875627989&spu_id=0", 343 | "paotui_scheme_context": "", 344 | "paotui_scheme": "", 345 | "trade_area": "", 346 | "distance_display_control": 0, 347 | "poi_recommend_pic_url": "", 348 | "shipping_time": "09:00-21:30", 349 | "biz_type": 1, 350 | "img_type": 0, 351 | "img_style": 0, 352 | "discounts2": [], 353 | "log_field": { 354 | "poi_type_icon_type": 0, 355 | "recommend_type": 0, 356 | "average_delivery_time": 43, 357 | "search_log_id": "" 358 | }, 359 | "label_info": [], 360 | "use_poi_tags_field": false, 361 | "recommend_level_type": 0, 362 | "poi_extend_status": 0, 363 | "poi_extend_status_desc": "", 364 | "non_delivery_reason": "", 365 | "poi_is_allowance_alliance": false, 366 | "container_template": { 367 | "type": 0, 368 | "tag_icon": "" 369 | }, 370 | "ad_type": 0, 371 | "ad_attr": "", 372 | "charge_info": "", 373 | "rank_label_info": "", 374 | "ad_mark": false, 375 | "allowance_alliance_scenes": "", 376 | "top_pic": "", 377 | "suggest_label_info": [] 378 | }, 379 | { 380 | "id": 1021340152474772, 381 | "name": "蓉城耙泥鳅·芋儿鸡", 382 | "status": 3, 383 | "status_desc": "休息中", 384 | "status_sub_desc": "", 385 | "pic_url": "http://p1.meituan.net/business/42116bf1f1c8269a9d26d5d75332f0ea136399.jpg", 386 | "latitude": 30645668, 387 | "longitude": 104034986, 388 | "address": "成都市武侯区晋阳路432号2幢3单元3层320号", 389 | "month_sales_tip": "月售300", 390 | "wm_poi_score": 5.0, 391 | "distance": "2.8km", 392 | "location_tip": "", 393 | "poi_type_icon": "", 394 | "poi_type_icon_type": 0, 395 | "poi_type_icon_text": "", 396 | "poi_mark_icon": "", 397 | "poi_promotion_pic": "", 398 | "delivery_type": 1, 399 | "delivery_type_icon": "http://p1.meituan.net/aichequan/3bab9f9057acb373e0b31e7d19fd46673704.png", 400 | "only_self_delivery": 0, 401 | "insurance_type": 0, 402 | "insurance_icon": "", 403 | "delivery_time_tip": "40分钟", 404 | "shipping_fee_tip": "配送 ¥3", 405 | "shipping_fee": 0.0, 406 | "origin_shipping_fee_tip": "", 407 | "min_price_tip": "起送 ¥15", 408 | "average_price_tip": "", 409 | "self_delivery_icon": "http://p1.meituan.net/aichequan/d7b1f1f28a2523c45ffb34555f894cb22489.png", 410 | "story_icon": "", 411 | "is_favorite": 0, 412 | "third_category": "川菜", 413 | "closing_tips": "", 414 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1021340152474772&spu_id=0", 415 | "paotui_scheme_context": "", 416 | "paotui_scheme": "", 417 | "trade_area": "龙湖金楠天街", 418 | "distance_display_control": 0, 419 | "poi_recommend_pic_url": "http://p0.meituan.net/wmproduct/5031f8f997497939fe217ffdb5430166243733.jpg", 420 | "shipping_time": "10:01-23:00", 421 | "biz_type": 1, 422 | "img_type": 0, 423 | "img_style": 0, 424 | "discounts2": [], 425 | "log_field": { 426 | "poi_type_icon_type": 0, 427 | "recommend_type": 0, 428 | "average_delivery_time": 40, 429 | "search_log_id": "" 430 | }, 431 | "label_info": [], 432 | "use_poi_tags_field": false, 433 | "recommend_level_type": 0, 434 | "poi_extend_status": 0, 435 | "poi_extend_status_desc": "", 436 | "non_delivery_reason": "", 437 | "poi_is_allowance_alliance": false, 438 | "container_template": { 439 | "type": 0, 440 | "tag_icon": "" 441 | }, 442 | "ad_type": 0, 443 | "ad_attr": "", 444 | "charge_info": "", 445 | "rank_label_info": "", 446 | "ad_mark": false, 447 | "allowance_alliance_scenes": "", 448 | "top_pic": "", 449 | "suggest_label_info": [] 450 | }, 451 | { 452 | "id": 947213311870435, 453 | "name": "万州烤鱼(财大店)", 454 | "status": 3, 455 | "status_desc": "休息中", 456 | "status_sub_desc": "", 457 | "pic_url": "http://p0.meituan.net/waimaipoi/cc17ab8b1aba96c67ef4667866887522276480.jpg", 458 | "latitude": 30665734, 459 | "longitude": 104042728, 460 | "address": "四川省成都市青羊区光华村街66号“水木光华农贸市场”内", 461 | "month_sales_tip": "月售500", 462 | "wm_poi_score": 4.8, 463 | "distance": "4.2km", 464 | "location_tip": "", 465 | "poi_type_icon": "", 466 | "poi_type_icon_type": 0, 467 | "poi_type_icon_text": "", 468 | "poi_mark_icon": "", 469 | "poi_promotion_pic": "", 470 | "delivery_type": 0, 471 | "delivery_type_icon": "", 472 | "only_self_delivery": 0, 473 | "insurance_type": 0, 474 | "insurance_icon": "", 475 | "delivery_time_tip": "47分钟", 476 | "shipping_fee_tip": "配送 ¥4.9", 477 | "shipping_fee": 0.0, 478 | "origin_shipping_fee_tip": "¥7", 479 | "min_price_tip": "起送 ¥0", 480 | "average_price_tip": "", 481 | "self_delivery_icon": "", 482 | "story_icon": "", 483 | "is_favorite": 0, 484 | "third_category": "烤鱼", 485 | "closing_tips": "", 486 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=947213311870435&spu_id=0", 487 | "paotui_scheme_context": "", 488 | "paotui_scheme": "", 489 | "trade_area": "", 490 | "distance_display_control": 0, 491 | "poi_recommend_pic_url": "", 492 | "shipping_time": "00:00-05:30,10:00-23:59", 493 | "biz_type": 1, 494 | "img_type": 0, 495 | "img_style": 0, 496 | "discounts2": [], 497 | "log_field": { 498 | "poi_type_icon_type": 0, 499 | "recommend_type": 0, 500 | "average_delivery_time": 47, 501 | "search_log_id": "" 502 | }, 503 | "label_info": [], 504 | "use_poi_tags_field": false, 505 | "recommend_level_type": 0, 506 | "poi_extend_status": 0, 507 | "poi_extend_status_desc": "", 508 | "non_delivery_reason": "", 509 | "poi_is_allowance_alliance": false, 510 | "container_template": { 511 | "type": 0, 512 | "tag_icon": "" 513 | }, 514 | "ad_type": 0, 515 | "ad_attr": "", 516 | "charge_info": "", 517 | "rank_label_info": "", 518 | "ad_mark": false, 519 | "allowance_alliance_scenes": "", 520 | "top_pic": "", 521 | "suggest_label_info": [] 522 | }, 523 | { 524 | "id": 1017015120381746, 525 | "name": "守柴炉烤鸭(吾悦广场店)", 526 | "status": 3, 527 | "status_desc": "休息中", 528 | "status_sub_desc": "", 529 | "pic_url": "http://p0.meituan.net/business/8599ae6f14c49b4a8a6a64ccd6d38e1d324081.png", 530 | "latitude": 30688524, 531 | "longitude": 104050397, 532 | "address": "成都市武侯区武侯大道顺江段77号1栋1层38号三楼【成都武侯】新城吾悦广场编号为【3003,3005】号", 533 | "month_sales_tip": "月售100", 534 | "wm_poi_score": 0.0, 535 | "distance": "5.8km", 536 | "location_tip": "", 537 | "poi_type_icon": "", 538 | "poi_type_icon_type": 0, 539 | "poi_type_icon_text": "", 540 | "poi_mark_icon": "", 541 | "poi_promotion_pic": "", 542 | "delivery_type": 0, 543 | "delivery_type_icon": "", 544 | "only_self_delivery": 0, 545 | "insurance_type": 0, 546 | "insurance_icon": "", 547 | "delivery_time_tip": "53分钟", 548 | "shipping_fee_tip": "配送 ¥4.5", 549 | "shipping_fee": 0.0, 550 | "origin_shipping_fee_tip": "¥7", 551 | "min_price_tip": "起送 ¥15", 552 | "average_price_tip": "", 553 | "self_delivery_icon": "", 554 | "story_icon": "", 555 | "is_favorite": 0, 556 | "third_category": "北京菜", 557 | "closing_tips": "", 558 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1017015120381746&spu_id=0", 559 | "paotui_scheme_context": "", 560 | "paotui_scheme": "", 561 | "trade_area": "保利花园", 562 | "distance_display_control": 0, 563 | "poi_recommend_pic_url": "http://p0.meituan.net/wmproduct/61d7b1af01d63f19b8bf688016e6402e188198.jpg", 564 | "shipping_time": "11:20-13:40,17:20-20:40", 565 | "biz_type": 1, 566 | "img_type": 0, 567 | "img_style": 0, 568 | "discounts2": [], 569 | "log_field": { 570 | "poi_type_icon_type": 0, 571 | "recommend_type": 0, 572 | "average_delivery_time": 53, 573 | "search_log_id": "" 574 | }, 575 | "label_info": [], 576 | "use_poi_tags_field": false, 577 | "recommend_level_type": 0, 578 | "poi_extend_status": 0, 579 | "poi_extend_status_desc": "", 580 | "non_delivery_reason": "", 581 | "poi_is_allowance_alliance": false, 582 | "container_template": { 583 | "type": 0, 584 | "tag_icon": "" 585 | }, 586 | "ad_type": 0, 587 | "ad_attr": "", 588 | "charge_info": "", 589 | "rank_label_info": "", 590 | "ad_mark": false, 591 | "allowance_alliance_scenes": "", 592 | "top_pic": "", 593 | "suggest_label_info": [] 594 | }, 595 | { 596 | "id": 961683056700785, 597 | "name": "川西坝子·免烫火锅(光华店)", 598 | "status": 3, 599 | "status_desc": "休息中", 600 | "status_sub_desc": "", 601 | "pic_url": "http://p0.meituan.net/waimaipoi/2b6c85b05d3e9991d272517913f483a723675.jpg", 602 | "latitude": 30583289, 603 | "longitude": 104064718, 604 | "address": "光华巷42号1层", 605 | "month_sales_tip": "月售0", 606 | "wm_poi_score": 5.0, 607 | "distance": "4.6km", 608 | "location_tip": "", 609 | "poi_type_icon": "http://p0.meituan.net/scarlett/c965f6288a36e485ab382958ab1b857f5735.png", 610 | "poi_type_icon_type": 0, 611 | "poi_type_icon_text": "品牌", 612 | "poi_mark_icon": "", 613 | "poi_promotion_pic": "", 614 | "delivery_type": 1, 615 | "delivery_type_icon": "http://p1.meituan.net/aichequan/3bab9f9057acb373e0b31e7d19fd46673704.png", 616 | "only_self_delivery": 0, 617 | "insurance_type": 0, 618 | "insurance_icon": "", 619 | "delivery_time_tip": "37分钟", 620 | "shipping_fee_tip": "免配送费", 621 | "shipping_fee": 0.0, 622 | "origin_shipping_fee_tip": "", 623 | "min_price_tip": "起送 ¥0", 624 | "average_price_tip": "", 625 | "self_delivery_icon": "http://p1.meituan.net/aichequan/d7b1f1f28a2523c45ffb34555f894cb22489.png", 626 | "story_icon": "", 627 | "is_favorite": 0, 628 | "third_category": "川渝火锅", 629 | "closing_tips": "", 630 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=961683056700785&spu_id=0", 631 | "paotui_scheme_context": "", 632 | "paotui_scheme": "", 633 | "trade_area": "", 634 | "distance_display_control": 0, 635 | "poi_recommend_pic_url": "", 636 | "shipping_time": "10:30-22:30", 637 | "biz_type": 1, 638 | "img_type": 0, 639 | "img_style": 0, 640 | "discounts2": [], 641 | "log_field": { 642 | "poi_type_icon_type": 2, 643 | "recommend_type": 0, 644 | "average_delivery_time": 37, 645 | "search_log_id": "" 646 | }, 647 | "label_info": [], 648 | "use_poi_tags_field": false, 649 | "recommend_level_type": 0, 650 | "poi_extend_status": 0, 651 | "poi_extend_status_desc": "", 652 | "non_delivery_reason": "", 653 | "poi_is_allowance_alliance": false, 654 | "container_template": { 655 | "type": 0, 656 | "tag_icon": "" 657 | }, 658 | "ad_type": 0, 659 | "ad_attr": "", 660 | "charge_info": "", 661 | "rank_label_info": "", 662 | "ad_mark": false, 663 | "allowance_alliance_scenes": "", 664 | "top_pic": "", 665 | "suggest_label_info": [] 666 | }, 667 | { 668 | "id": 1062846716398649, 669 | "name": "北京烤鸭(机投店)", 670 | "status": 3, 671 | "status_desc": "休息中", 672 | "status_sub_desc": "", 673 | "pic_url": "http://p0.meituan.net/waimaipoi/64d36c512748324ff87e1725307b64b838912.jpg", 674 | "latitude": 30526393, 675 | "longitude": 104028163, 676 | "address": "机投桥街道潮音路42号18栋11单元", 677 | "month_sales_tip": "月售5", 678 | "wm_poi_score": 0.0, 679 | "distance": "3.5km", 680 | "location_tip": "", 681 | "poi_type_icon": "", 682 | "poi_type_icon_type": 0, 683 | "poi_type_icon_text": "", 684 | "poi_mark_icon": "", 685 | "poi_promotion_pic": "", 686 | "delivery_type": 0, 687 | "delivery_type_icon": "", 688 | "only_self_delivery": 0, 689 | "insurance_type": 0, 690 | "insurance_icon": "", 691 | "delivery_time_tip": "45分钟", 692 | "shipping_fee_tip": "配送 ¥1.5", 693 | "shipping_fee": 0.0, 694 | "origin_shipping_fee_tip": "¥4", 695 | "min_price_tip": "起送 ¥15", 696 | "average_price_tip": "", 697 | "self_delivery_icon": "", 698 | "story_icon": "", 699 | "is_favorite": 0, 700 | "third_category": "烤物类小吃", 701 | "closing_tips": "", 702 | "scheme": "meituanwaimai://waimai.meituan.com/menu?restaurant_id=1062846716398649&spu_id=0", 703 | "paotui_scheme_context": "", 704 | "paotui_scheme": "", 705 | "trade_area": "", 706 | "distance_display_control": 0, 707 | "poi_recommend_pic_url": "http://p0.meituan.net/xianfu/7c3a72ca36ca3ae06085fb3566f4705083283.jpg", 708 | "shipping_time": "09:30-19:30", 709 | "biz_type": 1, 710 | "img_type": 0, 711 | "img_style": 0, 712 | "discounts2": [], 713 | "log_field": { 714 | "poi_type_icon_type": 0, 715 | "recommend_type": 0, 716 | "average_delivery_time": 45, 717 | "search_log_id": "" 718 | }, 719 | "label_info": [], 720 | "use_poi_tags_field": false, 721 | "recommend_level_type": 0, 722 | "poi_extend_status": 0, 723 | "poi_extend_status_desc": "", 724 | "non_delivery_reason": "", 725 | "poi_is_allowance_alliance": false, 726 | "container_template": { 727 | "type": 0, 728 | "tag_icon": "" 729 | }, 730 | "ad_type": 0, 731 | "ad_attr": "", 732 | "charge_info": "", 733 | "rank_label_info": "", 734 | "ad_mark": false, 735 | "allowance_alliance_scenes": "", 736 | "top_pic": "", 737 | "suggest_label_info": [] 738 | } 739 | ], 740 | "rank_strategy_tag": "", 741 | "rank_strategy_version": "", 742 | "poi_template_style": 0, 743 | "activity_type": 0, 744 | "footprint_entrance": { 745 | "is_show": true, 746 | "icon_url": "http://p1.meituan.net/aichequan/6dd136c9612331817f952475d749770b4238.png" 747 | }, 748 | "judas_field": { 749 | "rank_trace_id": "" 750 | }, 751 | "need_login": false, 752 | "coupon_nologin_background": "", 753 | "boldingList": [], 754 | "world_cup_activity": { 755 | "coupon_activity_link": "", 756 | "coupon_activity_img": "" 757 | }, 758 | "tab_mode": 0, 759 | "tab_enable_index": 0, 760 | "exp_ab_info": { 761 | "searchRankUGCLabelExp": "A", 762 | "tags_show_style": "0", 763 | "rankLabelListType": "1", 764 | "poi_list_show_style": "0", 765 | "poi_img_replace": "{\"exp_result\":\"\",\"is_hit\":0,\"show_average_price\":0}" 766 | } 767 | }, 768 | "code": 0, 769 | "msg": "成功", 770 | "traceid": "5281880516159240315" 771 | } -------------------------------------------------------------------------------- /sign.py: -------------------------------------------------------------------------------- 1 | import re 2 | import time 3 | from urllib.parse import quote 4 | 5 | 6 | class Signature(object): 7 | module = "{method} {url} {bp}" 8 | MtgSigSignString = str() 9 | 10 | def __init__(self, method, url, body, params, rpc, sign_type): 11 | self.method = method 12 | self.url = url 13 | self.body = body 14 | self.params = params 15 | self.rpc = rpc 16 | self.signType = sign_type 17 | 18 | def structure_shopList_sign_string(self): 19 | shopList_key_list = [ 20 | 'activity_filter_codes', 'app', 'behavioral_characteristics', 'category_type', 'ci', 'dynamic_page', 21 | 'filter_type', 'latitude', 'load_type', 'longitude', 'navigate_type', 'oa_id', 'offset', 'page_index', 22 | 'page_size', 'partner', 'personalized', 'platform', 'poilist_mt_cityid', 'poilist_wm_cityid', 'preload', 23 | 'push_token', 'rank_list_id', 'rank_trace_id', 'region_id', 'region_version', 'req_time', 'request_id', 24 | 'second_category_type', 'seq_id', 'seq_num', 'session_id', 'slider_select_data', 'sort_type', 25 | 'trace_tag', 'union_id', 'userid', 'utm_campaign', 'utm_content', 'utm_medium', 'utm_source', 26 | 'utm_term', 'uuid', 'uuid', 'version', 'waimai_sign', 'wm_actual_latitude', 'wm_actual_longitude', 27 | 'wm_appversion', 'wm_channel', 'wm_ctype', 'wm_did', 'wm_dtype', 'wm_dversion', 'wm_latitude', 28 | 'wm_logintoken', 'wm_longitude', 'wm_mac', 'wm_seq', 'wm_uuid', 'wm_visitid' 29 | ] 30 | comment_key_list = [ 31 | 'app', 'ci', 'comment_score_type', 'label_id', 'oa_id', 'page_offset', 'page_size', 32 | 'partner', 'personalized', 'platform', 'poilist_mt_cityid', 'poilist_wm_cityid', 33 | 'partner', 'personalized', 'platform', 'poilist_mt_cityid', 'poilist_wm_cityid', 34 | 'push_token', 'region_id', 'region_version', 'req_time', 'request_id', 'seq_id', 'userid', 35 | 'utm_campaign', 'utm_content', 'utm_medium', 'utm_source', 'utm_term', 'uuid', 'uuid', 36 | 'version', 'waimai_sign', 'wm_actual_latitude', 'wm_actual_longitude', 'wm_appversion', 37 | 'wm_channel', 'wm_ctype', 'wm_did', 'wm_dtype', 'wm_dversion', 'wm_latitude', 38 | 'wm_logintoken', 'wm_longitude', 'wm_mac', 'wm_seq', 'wm_uuid', 'wm_visitid', 'wmpoiid' 39 | ] 40 | shopDetail_key_list = ['ad_activity_flag', 'allowance_alliance_scenes', 'app', 'brand_page_type', 'ci', 41 | 'content_info', 'oa_id', 'page_index', 'partner', 'personalized', 'platform', 42 | 'poilist_mt_cityid', 'poilist_wm_cityid', 'product_spu_id', 'push_token', 'recall_type', 43 | 'region_id', 'region_version', 'req_time', 'request_id', 'search_log_id', 'search_word', 44 | 'seq_id', 'source_page_type', 'style_template_ids', 'userid', 'utm_campaign', 45 | 'utm_content', 'utm_medium', 'utm_source', 'utm_term', 'uuid', 'uuid', 'version', 46 | 'waimai_sign', 'wm_actual_latitude', 'wm_actual_longitude', 'wm_appversion', 47 | 'wm_channel', 'wm_ctype', 'wm_did', 'wm_dtype', 'wm_dversion', 'wm_latitude', 48 | 'wm_logintoken', 'wm_longitude', 'wm_mac', 'wm_poi_id', 'wm_seq', 'wm_uuid', 49 | 'wm_visitid'] 50 | 51 | source_bp = "&" + self.params + self.body 52 | 53 | bp = str() 54 | if self.signType == "shopList": 55 | for key in shopList_key_list: 56 | if key == "behavioral_characteristics" or key == "wm_dtype" or key == "wm_mac": 57 | result = re.findall("&" + key + '=(.*?)' + "&", source_bp) 58 | bp += (key + "=" + quote(result[0]) + '&' if result else "" + "&") 59 | 60 | else: 61 | result = re.findall("&" + key + '=(.*?)' + "&", source_bp) 62 | bp += (key + "=" + result[0] + '&' if result else "" + "&") 63 | 64 | elif self.signType == 'comment': 65 | for key in comment_key_list: 66 | if key == "behavioral_characteristics" or key == "wm_dtype" or key == "wm_mac": 67 | result = re.findall("&" + key + '=(.*?)' + "&", source_bp) 68 | bp += (key + "=" + quote(result[0]) + '&' if result else "" + "&") 69 | 70 | else: 71 | result = re.findall("&" + key + '=(.*?)' + "&", source_bp) 72 | bp += (key + "=" + result[0] + '&' if result else "" + "&") 73 | 74 | elif self.signType == "shopDetail": 75 | for key in shopDetail_key_list: 76 | if key == "behavioral_characteristics" or key == "wm_dtype" or key == "wm_mac" or key == "style_template_ids": 77 | result = re.findall("&" + key + '=(.*?)' + "&", source_bp) 78 | bp += (key + "=" + quote(result[0]) + '&' if result else "" + "&") 79 | 80 | else: 81 | result = re.findall("&" + key + '=(.*?)' + "&", source_bp) 82 | bp += (key + "=" + result[0] + '&' if result else "" + "&") 83 | 84 | bp = bp.strip("&") 85 | self.MtgSigSignString = self.module.format(method=self.method, url=self.url, bp=bp) 86 | 87 | def getMtgSig(self): 88 | self.structure_shopList_sign_string() 89 | print(self.MtgSigSignString) 90 | return self.rpc.exports.getmtgsig(self.MtgSigSignString) 91 | -------------------------------------------------------------------------------- /test/comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "reason": "Unmatch_reqSig", 3 | "message": "Forbidden,Contact:edp.waf@meituan.com" 4 | } -------------------------------------------------------------------------------- /test/shopComment.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import time 3 | 4 | from init import js_code 5 | from sign import Signature 6 | import frida 7 | import requests 8 | import json 9 | 10 | rpc_result = '' 11 | 12 | 13 | def on_message(message, data): 14 | global rpc_result 15 | if message["type"] == "send": 16 | print("[*] {0}".format(message["payload"])) 17 | rpc_result = str(message["payload"]) 18 | 19 | elif message['type'] == "error": 20 | print("[ERROR] " + message["description"]) 21 | 22 | else: 23 | print(message) 24 | 25 | 26 | process = frida.get_remote_device().attach("com.sankuai.meituan.takeoutnew") 27 | 28 | script = process.create_script(js_code) # 创建js脚本 29 | script.on("message", on_message) 30 | script.load() # 加载脚本 31 | 32 | headers = { 33 | 'mtgsig': '{"a0":"1.5","a1":"e68c4c18-35ec-4972-84e4-32a0836455a8","a2":"6376acd393ebf6d32395353be6d3f14225ec4ef0","a3":2,"a4":1614246247,"a5":"j9tzEdj9gY+I4Khhyn330m8DxMjEoybbJ6oRN1+1qSDH3UcBS3SyMqsulyiCpIkY0dUnP9lpctF6Jn1eyGMe2CCw8mWjhl/5oQ+17M/JsjZSJSzDEotKXUi0r7mcfhIgxuI/HrDCaJwKjBhGisB8gmy7Qsqf89lvr5+s3gpnU+8LizFyya/1iEwGBtUZJuBQsHOlfQCbgQ0jlr+XN18JNEat8Lpo8PhFSMJMZeLndJDaNOuSr1kRurJed5cW4UIpoEhfTARwdar8CV5LH6LMjZDZh1aQbpUXgetsF1xKKF7DS5nn9OKfDb+p8i7aFxhZdpzlm9oDfJovzYVrry5zbCrSb2IPyqSElFwk7ZHvRBbTDuashPRR2jY41Lx47A==","a6":0,"d1":"b664b3ea4dcf2c54f4503e4023764a453c7b870b"}', 34 | 'siua': 'a2.0+X30+K7m/d80owfbU4pPqVkztUv/oBluSGRvIG7A7hd40eXay7YSAZKVtwwJjo1nOR1OnPeEEFMkER/RMLxmd6He5pLJy5hJRNvB8Yo9b86FVj+ZVXddxrtfpzlLqLxgoODhkqpHRijdshFcU8ZrKjB+iB8YiV7J0OfH6BFUcg+ezWbjL94kikWIU9VuHsL+HVj/WwVLF+anQ5Lx6goICMO1/d/b9H1NDAvabbrFz8xD9SBvitnI+i677ceSQe7VN25m7Ka/Nqi0+SnK9W5GCtkOwkL2fyyl9VFZCu8kP1/BECuBsVpr3ivdeVQanjps2wNUW8RSyMekj5u0gnQyL4acIRmhyEU0/ZM0VGleTYeE2x0tQ7RQORIndpPQ5n3Sqzzk2hBtLYZN5vtWN02sx/d2C6N7E7dWWF1dM+hgaVIHNt9e/EKI3DdQ9hTNIljZeOVWNrwkUHuWvd7H1kUSdG372yYBLLcmT8tHtNEQL2LBROtBuQuaW4oj6Dk7GNVmWkMZIQzM/MUu/Iq8n6/NO5amlsvHo49xI7iRFW+4gdHGsanqOwbDNHbo7K28I1lEUUOHMEs0rgdQ+qFGgV+zLuo5FB3QgzlCQcWW8FMQ8k4InEV8bbOH4CKJ/FVerMdicknsmlEKAlv4nZqhg+mjI2Q/92G9zpDr6/Go1vL1eUk=', 35 | 'Content-Type': 'application/x-www-form-urlencoded', 36 | 'retrofit_exec_time': '1614246247095', 37 | 'Accept-Encoding': 'gzip', 38 | 'M-SHARK-TRACEID': '1118c216b6de4e84a60981ed172f5ca81cea161344370271699288a12a481614246247158b27ae3', 39 | 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; MI MAX 2 MIUI/9.8.29)', 40 | 'Host': 'wmapi.meituan.com', 41 | 'Connection': 'Keep-Alive', 42 | } 43 | 44 | params = ( 45 | ('utm_medium', 'android'), 46 | ('utm_content', '868415032525454'), 47 | ('utm_source', '1011'), 48 | ('utm_term', '75303'), 49 | ('ci', '45'), 50 | ('utm_campaign', 'AwaimaiBwaimai'), 51 | ('uuid', '00000000000008C216B6DE4E84A60981ED172F5CA81CEA161344370271699288'), 52 | ('region_version', '1614246134693'), 53 | ('region_id', '1000530100'), 54 | ) 55 | 56 | data = { 57 | 'wmpoiid': '908511361599386', 58 | 'page_offset': '0', 59 | 'page_size': '20', 60 | 'comment_score_type': '0', 61 | 'label_id': '0', 62 | 'wm_latitude': '29465667', 63 | 'wm_logintoken': 'zUE16KqZ3XFQ1WtRdl0OvroChE8AAAAAzAwAAJ378QLes7UuG4MjeSNM9grqW-8mQt4inMbTJ90dx8mBWKppFx6exnYK5wIHtAG2jA', 64 | 'wm_mac': '02:00:00:00:00:00', 65 | 'poilist_mt_cityid': '45', 66 | 'request_id': '5E1C692E-4ECE-4858-8980-38974E764D77', 67 | 'uuid': '00000000000008C216B6DE4E84A60981ED172F5CA81CEA161344370271699288', 68 | 'wm_actual_longitude': '106540890', 69 | 'wm_actual_latitude': '29465029', 70 | 'wm_ctype': 'android', 71 | 'app': '4', 72 | 'wm_visitid': '5e80f4ae-b63a-4e23-8517-ae485889b2a2', 73 | 'userid': '911426266', 74 | 'wm_did': '868415032525454', 75 | 'platform': '4', 76 | 'seq_id': '114', 77 | 'wm_dversion': '25_7.1.1', 78 | 'wm_longitude': '106543519', 79 | 'oa_id': '', 80 | 'wm_channel': '1011', 81 | 'wm_uuid': '00000000000008C216B6DE4E84A60981ED172F5CA81CEA161344370271699288', 82 | 'poilist_wm_cityid': '500100', 83 | 'wm_dtype': 'MI MAX 2', 84 | 'version': '7.53.3', 85 | 'push_token': 'dpsh0cf9ffa87d5741e4ba4dc164b5558702atpu', 86 | 'personalized': '1', 87 | 'partner': '4', 88 | 'wm_appversion': '7.53.3', 89 | 'waimai_sign': 'Xqnfwe3wv/f/VuS6UHCAHjz9Lpsqu4h5ut0AxJl+UAT/bi6XXCGhuotkEUQ+fSIrEr17LOU3SzP7gFYk9o7euQ8b+zrTmkLhmcysUzj1BQQhX1feVNWusfAPn3vSUQcQ3FunM6qKt9Ock8uUfGwIn0YVZmddL/vp9+5h8gUDIMg=', 90 | 'wm_seq': '68', 91 | 'req_time': '1614246247039' 92 | } 93 | 94 | # ================================= 95 | nt = int(str(time.time()).replace('.', '')[:13]) 96 | data.update({ 97 | 'req_time': str(nt) # 更新data里的时间戳 98 | }) 99 | 100 | # 更新params里的时间戳 101 | params = dict(params) 102 | params['region_version'] = str(nt) 103 | params = tuple([(k, params.get(k)) for k in params]) 104 | 105 | # 更新headers里面的时间戳 106 | headers['retrofit_exec_time'] = str(nt) 107 | # ================================ 108 | 109 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 110 | dataString = (''.join([key + '=' + data.get(key) + "&" for key in data])) 111 | 112 | # 得到 mtgsig 并加入headers里 113 | Signature("POST", "/api/v6/comment/poi", dataString, paramsString, script, "comment").getMtgSig() 114 | headers.update({ 115 | "mtgsig": rpc_result 116 | }) 117 | 118 | response = requests.post('https://wmapi.meituan.com/api/v6/comment/poi', headers=headers, params=params, data=data) 119 | 120 | print(response.text) 121 | print(response.json()) 122 | 123 | with open('comment.json', 'w', encoding="UTF-8") as f: 124 | f.write(json.dumps(response.json(), ensure_ascii=False, indent=4)) 125 | 126 | print(len(response.json().get("data").get('comments'))) 127 | -------------------------------------------------------------------------------- /test/shopDetail.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import time 3 | 4 | from init import js_code 5 | from sign import Signature 6 | import frida 7 | import requests 8 | import json 9 | 10 | rpc_result = '' 11 | 12 | 13 | def on_message(message, data): 14 | global rpc_result 15 | if message["type"] == "send": 16 | print("[*] {0}".format(message["payload"])) 17 | rpc_result = str(message["payload"]) 18 | 19 | elif message['type'] == "error": 20 | print("[ERROR] " + message["description"]) 21 | 22 | else: 23 | print(message) 24 | 25 | 26 | process = frida.get_remote_device().attach("com.sankuai.meituan.takeoutnew") 27 | 28 | script = process.create_script(js_code) # 创建js脚本 29 | script.on("message", on_message) 30 | script.load() # 加载脚本 31 | 32 | 33 | headers = { 34 | # 'mtgsig': '{"a0":"1.5","a1":"e68c4c18-35ec-4972-84e4-32a0836455a8","a2":"9c62a006c5776a9f82529e6ab74b07af08621a9b","a3":2,"a4":1614177446,"a5":"Qhv5cejhqeoLHPc7wuuwnBL/AALpXENkr1orKCYCJ+6niOo6IMvS9xYEAD9wvd1yPyPMVmDWz5vJbBev28pxGbC2WmquCkrSIoL+w1+dkDP5Irzeqvk2X22u1Na3QIyITtsb2tc72mHJID8DaVgP/L7hVn2wICcgVMoOGQuDFJxNO6VWtW9aSugFqfbMDIRlNjg6DAB58MIOLHDzAPHrRKUiOmEApMmE8oSfQnOrzJNtlPmiM316Df6pdmFBQQYryX/mKD7lFip7k7F4TBF4TRoT56Z2Q7nykB2w9MJcDPGmTPWcOIQyu86jM3tNqRHnu6VADPeB664SB6WkedEDao0E3bC3pLbWejFaavadbyDSLxmB3+xRGCvsHI6ZL+o=","a6":0,"d1":"9af2f469f29993642f3365511950371d927ecca6"}', 35 | # 'siua': 'a2.0+JXBEcOxn9Ita2OtFryXwHSE5Efab4YoJhuNWVlGems+Ur4pKtdFhTiBmcMsw+GHHF0z/TJgGVKRPSpjJSUBnt54dvopPgLXv4CysPr4t4Y+3ysHHFGHC2QQLaGcvtdoy8d0Ef6KvUQUfa/9oFX1R4Rp5VH4fep8S0nTMf9T+t5fwJpqCbi2/Jc6GDulf+yxMjNzts0+5JWhZTlRnuoBE1AW0VHm2aR7YgLBd+ySdQFyoavoESRXt1xa5yupd8+56PxpDItNYEf55f4JaHw2eKw80H8ehlpmDu1IsjMtq+62cKIDwMFrX4Tc/uo88sT/PRbSjBHdQOMysqLTYGv3fs1y3rsONmp/1LB0N9SsOOMJqMvXjriAIN0HkvVsQKeOM8ep2JnfEleTU/zBsPcfwgHv/4YbhEJTl6cl4DHnM2MAheU+embremBSwitRuH5CCa/hY3BypfG9LvkrCE/MibmDpFVftATimkHw64gF2IvCdUI4boaWn0fTl8DKZa001BirOJOsOZquMX0RPK3usIdSTJeU+jYddOL0DiOPwN7i1NaixPPdX9UxgJm68mPWnjGPPeDEylk3MwADZRvnvrW72M8K6i/3uXI1ANlxIr98lidy0GSTdt7rGKKcYnqTbh6fSNT5EP6jZnS2AB9dvlsSQ0FMoFgbE0WkjKIaZSA=', 36 | 'Content-Type': 'application/x-www-form-urlencoded', 37 | 'retrofit_exec_time': '1614177446772', 38 | 'Accept-Encoding': 'gzip', 39 | 'M-SHARK-TRACEID': '', 40 | 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; MI MAX 2 MIUI/9.8.29)', 41 | 'Host': 'wmapi.meituan.com', 42 | 'Connection': 'Keep-Alive', 43 | } 44 | 45 | 46 | uuid = "12dkslajdsahduisayd98a78978213789dusa9ds98aud98saud98saud98asud9" 47 | params = ( 48 | ('utm_medium', 'android'), 49 | ('utm_content', '868415032525454'), 50 | ('utm_source', '1011'), 51 | ('utm_term', '75303'), 52 | ('ci', '45'), 53 | ('utm_campaign', 'AwaimaiBwaimai'), 54 | ('uuid', uuid), 55 | ('region_version', '1614177415914'), 56 | ('region_id', '1000530100'), 57 | ) 58 | 59 | data = { 60 | 'wm_poi_id': '912917998037218', 61 | 'product_spu_id': '0', 62 | 'recall_type': '0', 63 | 'search_word': '', 64 | 'search_log_id': '', 65 | 'page_index': '0', 66 | 'source_page_type': '0', 67 | 'style_template_ids': '', 68 | 'allowance_alliance_scenes': '', 69 | 'content_info': '', 70 | 'ad_activity_flag': '', 71 | 'brand_page_type': '0', 72 | 'wm_latitude': '29436013', 73 | 'wm_logintoken': 'zUE16KqZ3XFQ1WtRdl0OvroChE8AAAAAzAwAAJ378QLes7UuG4MjeSNM9grqW-8mQt4inMbTJ90dx8mBWKppFx6exnYK5wIHtAG2jE', 74 | 'wm_mac': '02:00:00:00:00:00', 75 | 'poilist_mt_cityid': '45', 76 | 'request_id': 'F1FCDF5E-7F9A-4551-A96E-B823BEDBF7E3', 77 | 'uuid': uuid, 78 | 'wm_actual_longitude': '106534937', 79 | 'wm_actual_latitude': '29435075', 80 | 'wm_ctype': 'android', 81 | 'app': '4', 82 | 'wm_visitid': '', 83 | 'userid': '', 84 | 'wm_did': '', 85 | 'platform': '4', 86 | 'seq_id': '57', 87 | 'wm_dversion': '25_7.1.1', 88 | 'wm_longitude': '106535180', 89 | 'oa_id': '', 90 | 'wm_channel': '1011', 91 | 'wm_uuid': uuid, 92 | 'poilist_wm_cityid': '500100', 93 | 'wm_dtype': 'MI MAX 2', 94 | 'version': '7.53.3', 95 | 'push_token': '', 96 | 'personalized': '1', 97 | 'partner': '4', 98 | 'wm_appversion': '7.53.3', 99 | 'waimai_sign': '', 100 | 'wm_seq': '39', 101 | 'req_time': '' 102 | } 103 | 104 | # ================================= 105 | nt = int(str(time.time()).replace('.', '')[:13]) 106 | data.update({ 107 | 'req_time': str(nt) # 更新data里的时间戳 108 | }) 109 | 110 | # 更新params里的时间戳 111 | params = dict(params) 112 | params['region_version'] = str(nt) 113 | params = tuple([(k, params.get(k)) for k in params]) 114 | 115 | # 更新headers里面的时间戳 116 | headers['retrofit_exec_time'] = str(nt) 117 | # ================================ 118 | 119 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 120 | dataString = (''.join([key + '=' + data.get(key) + "&" for key in data])) 121 | 122 | # 得到 mtgsig 并加入headers里 123 | Signature("POST", "/api/v8/poi/food", dataString, paramsString, script, "shopDetail").getMtgSig() 124 | headers.update({ 125 | "mtgsig": rpc_result 126 | }) 127 | 128 | response = requests.post('https://wmapi.meituan.com/api/v8/poi/food', headers=headers, params=params, data=data) 129 | 130 | print(response.json()) 131 | 132 | with open("shopDetail.json", 'w', encoding="UTF-8") as f: 133 | f.write(json.dumps( 134 | response.json(), 135 | ensure_ascii=False, 136 | indent=4 137 | )) 138 | -------------------------------------------------------------------------------- /test/shopList.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import time 3 | 4 | from init import js_code 5 | from sign import Signature 6 | import frida 7 | import requests 8 | import json 9 | 10 | rpc_result = '' 11 | 12 | 13 | def on_message(message, data): 14 | global rpc_result 15 | if message["type"] == "send": 16 | print("[*] {0}".format(message["payload"])) 17 | rpc_result = str(message["payload"]) 18 | 19 | elif message['type'] == "error": 20 | print("[ERROR] " + message["description"]) 21 | 22 | else: 23 | print(message) 24 | 25 | 26 | process = frida.get_remote_device().attach("com.sankuai.meituan.takeoutnew") 27 | 28 | script = process.create_script(js_code) # 创建js脚本 29 | script.on("message", on_message) 30 | script.load() # 加载脚本 31 | 32 | headers = { 33 | # 'mtgsig': '{"a0":"1.5","a1":"e68c4c18-35ec-4972-84e4-32a0836455a8","a2":"ab1118d1d5b21d59685f2cf87581b3b107bd7c34","a3":2,"a4":1613546146,"a5":"y4q52hF++BS5gVtI1Jz5LYikq1O2PG2awwvixOFLK55b2sDHboeI0GWosci7yO10l6iaqS90tFCqaPQLQJ2+moA+crU1QIBqxgxTI0BK8TdfFsoiIVbC9Rhk4XQ8w1uQbHnP978+pxS8jaf6YOGv6edZp/gW73sMuU9Co9Qr/IrzDWQxrDi1QESmEgirHPJ7bmTEtcvabqrBYbiqMYxWntUkKbek6YE9jrfdqbcI6zSP38LGWl/S+7GzmlbZkR3Xi7Be8vsU/Ce5hT7gdUP2aN3Q2x0ThV1b2QQxA2DuCYQZsPRu02iogjM6IoxYE43dT0cwWlxzVTUh+gxzT1jk/OzybHQ9Ru4ocvVnO3vfZft0OcXPQPrsHf9FNaOB6E0=","a6":0,"d1":"f7e9f88ad691d4668358ace2c3bb696cb19a5018"}', 34 | # 'siua': 'a2.0jC7INHKC2FDIqUsFt0RH2O/nQbNp/NfHpaFFZsvA9bFSCbdj2JLoViR5G2AXBNomaSnRmtKYNIrVwdRO9+C1wf+Swb55PrRIAw9k4HhZrbFq3QAK3mDWxlNLqbM3s+xkZLTS4ZaUrDJo/PQpUW0a/YWeBkqgrgEB85GUhxP1zbJbappZt77Bw+LzMm13xX7p97BSmICsanY+Bs7t/wVkFy9OQBLQPYr5TnQ/J6R77/l5C0u/woAQUtXJrfD7irqRC+i6v20CaC5s/7W84a6j5QBXBxnJNhXUwbt6yb5sodVB1hE1lZKC8BRAKUyrM//6C/ks8zMzVT87JaId3cXC/YgdsDqXJUn5y3aibTqVWcQrzPC/dw493PXUrcgOsbfP2Sc9Iq2YkX8w00HMXQrh3IBEzGI0T5z82W/XP872hD2J06yL+gEeiIUmEz2w/GGbKW1y/ZiIdFdTXjA3SWOhT8mU97z3ZRpykcbL3N9DxnT13UH44CYwqIupLdFjYoZdAYioQQl72kHBR5cVntaJkV+YZkzMyyym+k/dMakhj6tMdG7dHCdWjbU42CrwVH4GCI058cmKVsSrPFdQYj4p6Wp+7pkgSGvyKRoXiQLzDC0yOgrbCzOlqxi7qAZCB3Z2mkoHcdCkeg80tGUd+LyN1HHWLIyn3potgjqClp8x/A5=', 35 | 'Content-Type': 'application/x-www-form-urlencoded', 36 | 'retrofit_exec_time': '1613546146445', 37 | 'Accept-Encoding': 'gzip', 38 | 'M-SHARK-TRACEID': '', 39 | 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; MI MAX 2 MIUI/9.8.29)', 40 | 'Host': 'wmapi.meituan.com', 41 | 'Connection': 'Keep-Alive', 42 | } 43 | 44 | params = ( 45 | ('utm_medium', 'android'), 46 | ('utm_content', ''), 47 | ('utm_source', '1011'), 48 | ('utm_term', '75204'), 49 | ('ci', '45'), 50 | ('utm_campaign', 'AwaimaiBwaimai'), 51 | ('uuid', ''), 52 | ('region_version', '1613545977790'), 53 | ('region_id', '0'), 54 | ) 55 | 56 | data = { 57 | 'seq_num': '0', 58 | 'offset': '0', # 奇怪的参数 59 | 'dynamic_page': 'true', 60 | 'latitude': '', 61 | 'longitude': '', 62 | 'page_index': '0', # 似乎与seq_num同步,大过 1 就要登陆 63 | 'page_size': '0', 64 | 'sort_type': '0', 65 | 'category_type': '910', 66 | 'filter_type': '0', 67 | 'second_category_type': '0', 68 | 'navigate_type': '910', 69 | 'activity_filter_codes': '', 70 | 'slider_select_data': '', 71 | 'load_type': '3', 72 | 'preload': '0', 73 | 'trace_tag': '', 74 | 'rank_trace_id': '', 75 | 'rank_list_id': '', 76 | 'session_id': '', 77 | 'union_id': '', 78 | 'behavioral_characteristics': json.dumps( 79 | { 80 | "module_action": { 81 | "extra_info": { 82 | "factlist_offset_after_dedup": 80 83 | }, 84 | "request_type": 2 85 | }, 86 | "exp_info": { 87 | "exp_group_name": "poilist_dynamicPaging_exp", 88 | "exp_name": "B", 89 | "scene_name": "poilist_dynamicPaging", 90 | "jsBundle_id": "alita_waimai-ad-interaction-rmd" 91 | } 92 | } 93 | ).replace(' ', ''), 94 | 'wm_logintoken': '', 95 | 'wm_mac': '02:00:00:00:00:00', 96 | 'poilist_mt_cityid': '45', 97 | 'request_id': '', 98 | 'uuid': '', 99 | 'wm_actual_longitude': '', 100 | 'wm_actual_latitude': '', 101 | 'wm_ctype': 'android', 102 | 'app': '4', 103 | 'wm_visitid': '', 104 | 'userid': '', 105 | 'wm_did': '', 106 | 'platform': '4', 107 | 'seq_id': '755', 108 | 'wm_dversion': '25_7.1.1', 109 | 110 | 'wm_longitude': '104066363', # 这个来定位纬度!!! 9位 111 | 'wm_latitude': '30657353', # 这个来定位经度!!! 8位 112 | 113 | 'oa_id': '', 114 | 'wm_channel': '1011', 115 | 'wm_uuid': '', 116 | 'poilist_wm_cityid': '500100', 117 | 'wm_dtype': 'MI MIX 2', 118 | 'version': '7.54.2', 119 | 'push_token': '', 120 | 'personalized': '1', 121 | 'partner': '4', 122 | 'wm_appversion': '7.53.3', 123 | 'waimai_sign': '', 124 | 'wm_seq': '387', 125 | 'req_time': '' 126 | } 127 | 128 | # ================================= 129 | nt = int(str(time.time()).replace('.', '')[:13]) 130 | data.update({ 131 | 'req_time': str(nt) # 更新data里的时间戳 132 | }) 133 | 134 | # 更新params里的时间戳 135 | params = dict(params) 136 | params['region_version'] = str(nt) 137 | params = tuple([(k, params.get(k)) for k in params]) 138 | 139 | # 更新headers里面的时间戳 140 | headers['retrofit_exec_time'] = str(nt) 141 | # ================================ 142 | 143 | paramsString = (''.join([string[0] + "=" + string[1] + "&" for string in list(params)])) 144 | dataString = (''.join([key + '=' + data.get(key) + "&" for key in data])) 145 | 146 | # 得到 mtgsig 并加入headers里 147 | Signature("POST", "/api/v7/poi/channelpage", dataString, paramsString, script, "shopList").getMtgSig() 148 | headers.update({ 149 | "mtgsig": rpc_result 150 | }) 151 | 152 | # 执行请求 153 | response = requests.post( 154 | 'https://wmapi.meituan.com/api/v7/poi/channelpage', headers=headers, params=params, data=data 155 | ) 156 | 157 | print(json.dumps(response.json(), indent=4, ensure_ascii=False)) 158 | 159 | with open('shopList.json', 'w', encoding="UTF-8") as f: 160 | json.dump(response.json(), fp=f, indent=4, ensure_ascii=False) 161 | --------------------------------------------------------------------------------