From 9ce1c3c571dc5994a3dca3429956464fd37e9275 Mon Sep 17 00:00:00 2001 From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Mon, 16 Jan 2023 23:07:14 +0800 Subject: [PATCH] AREA_RANK_CHANGED --- CV/Var.go | 2 +- Reply/Msg.go | 1 + Reply/ws_msg/AREA_RANK_CHANGED.go | 43 +++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Reply/ws_msg/AREA_RANK_CHANGED.go diff --git a/CV/Var.go b/CV/Var.go index 2434b6f..495e47d 100644 --- a/CV/Var.go +++ b/CV/Var.go @@ -168,7 +168,7 @@ func (t *Common) loadConf(customConf string) error { } if r.Response == nil { return errors.New("无法获取自定义配置文件 响应为空") - } else if r.Response.StatusCode != 200 { + } else if r.Response.StatusCode&200 != 200 { return fmt.Errorf("无法获取自定义配置文件 %d", r.Response.StatusCode) } else { var tmp map[string]interface{} diff --git a/Reply/Msg.go b/Reply/Msg.go index b88da2c..51d6c78 100644 --- a/Reply/Msg.go +++ b/Reply/Msg.go @@ -115,6 +115,7 @@ var Msg_map = map[string]func(replyF, string){ "LIVE_INTERACTIVE_GAME": nil, "LIVE_MULTI_VIEW_CHANGE": nil, "POPULAR_RANK_CHANGED": nil, //replyF.popular_rank_changed, // Msg-人气排名 + "AREA_RANK_CHANGED": nil, } // 屏蔽不需要的消息 diff --git a/Reply/ws_msg/AREA_RANK_CHANGED.go b/Reply/ws_msg/AREA_RANK_CHANGED.go new file mode 100644 index 0000000..68bec69 --- /dev/null +++ b/Reply/ws_msg/AREA_RANK_CHANGED.go @@ -0,0 +1,43 @@ +package part + +type AREA_RANK_CHANGED struct { + Cmd string `json:"cmd"` + Data struct { + ConfID int `json:"conf_id"` + RankName string `json:"rank_name"` + UID int `json:"uid"` + Rank int `json:"rank"` + IconURLBlue string `json:"icon_url_blue"` + IconURLPink string `json:"icon_url_pink"` + IconURLGrey string `json:"icon_url_grey"` + ActionType int `json:"action_type"` + Timestamp int `json:"timestamp"` + MsgID string `json:"msg_id"` + JumpURLLink string `json:"jump_url_link"` + JumpURLPc string `json:"jump_url_pc"` + JumpURLPink string `json:"jump_url_pink"` + JumpURLWeb string `json:"jump_url_web"` + } `json:"data"` +} + +/* +{ + "cmd": "AREA_RANK_CHANGED", + "data": { + "conf_id": 22, + "rank_name": "网游航海", + "uid": 19738891, + "rank": 0, + "icon_url_blue": "https://i0.hdslb.com/bfs/live/18e2990a546d33368200f9058f3d9dbc4038eb5c.png", + "icon_url_pink": "https://i0.hdslb.com/bfs/live/a6c490c36e88c7b191a04883a5ec15aed187a8f7.png", + "icon_url_grey": "https://i0.hdslb.com/bfs/live/cb7444b1faf1d785df6265bfdc1fcfc993419b76.png", + "action_type": 1, + "timestamp": 1673762370, + "msg_id": "4477c0ae-c259-4a22-82aa-ff76fa806246", + "jump_url_link": "https://live.bilibili.com/p/html/live-app-hotrank/index.html?clientType=3\u0026ruid=19738891\u0026conf_id=22\u0026is_live_half_webview=1\u0026hybrid_rotate_d=1\u0026is_cling_player=1\u0026hybrid_half_ui=1,3,100p,70p,f4eefa,0,30,100,0,0;2,2,375,100p,f4eefa,0,30,100,0,0;3,3,100p,70p,f4eefa,0,30,100,0,0;4,2,375,100p,f4eefa,0,30,100,0,0;5,3,100p,70p,f4eefa,0,30,100,0,0;6,3,100p,70p,f4eefa,0,30,100,0,0;7,3,100p,70p,f4eefa,0,30,100,0,0;8,3,100p,70p,f4eefa,0,30,100,0,0#/area-rank", + "jump_url_pc": "https://live.bilibili.com/p/html/live-app-hotrank/index.html?clientType=4\u0026ruid=19738891\u0026conf_id=22\u0026pc_ui=338,465,f4eefa,0#/area-rank", + "jump_url_pink": "https://live.bilibili.com/p/html/live-app-hotrank/index.html?clientType=1\u0026ruid=19738891\u0026conf_id=22\u0026is_live_half_webview=1\u0026hybrid_rotate_d=1\u0026is_cling_player=1\u0026hybrid_half_ui=1,3,100p,70p,f4eefa,0,30,100,0,0;2,2,375,100p,f4eefa,0,30,100,0,0;3,3,100p,70p,f4eefa,0,30,100,0,0;4,2,375,100p,f4eefa,0,30,100,0,0;5,3,100p,70p,f4eefa,0,30,100,0,0;6,3,100p,70p,f4eefa,0,30,100,0,0;7,3,100p,70p,f4eefa,0,30,100,0,0;8,3,100p,70p,f4eefa,0,30,100,0,0#/area-rank", + "jump_url_web": "https://live.bilibili.com/p/html/live-app-hotrank/index.html?clientType=2\u0026ruid=19738891\u0026conf_id=22#/area-rank" + } +} +*/ -- 2.39.2