spider/docs/hoh8.md
2019-04-02 19:58:37 +08:00

73 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 玛丽娱乐小程序抓取文档
## 说明
所有数据采用长连接
地址为
```
wss://game.hoh8.cn/hh/websocket?userId=${uid}&token=${token}&roomId=0&groupId=global
```
uid和token需从小程序抓取每次重新授权后token变化
## 游戏列表
```
{"path":"/hg/getGameList","body":"{\\"pageNum\\":0,\\"kw\\":\\"\\"}","reqId":"gamelist000${id}"}
```
pageNum 为分页, 从0开始
## 游戏详情
```
{"path":"/hg/getGameDtl.page","body":"{\\"gameId\\":\\"${record.id}\\"}","reqId":"gameinfo${record.id}"}
```
gameId: 游戏的id
## 电影列表
```
{"path":"/video/searchVideoList","body":"{\\"pageNum\\":${id},\\"kw\\":null,\\"type\\":\\"所有类型\\",\\"region\\":\\"所有地区\\",\\"date\\":\\"所有年代\\"}","reqId":"movielist000${id}"}
```
pageNum 为分页, 从0开始
## 电影详情
```
{"path":"/video/getVideoDtl.page","body":"{\\"id\\":\\"${record.data.id}\\"}","reqId":"movieinfo${record.id}"}
```
id 为电影的id
## 获取观看广告的token
用于更新用户余额
```
{"path":"/deal/getVideoADToken","body":"{}","reqId":"videotoken${id}"}
```
## 更新余额接口
method: POST
Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
https://game.hoh8.cn/hh/deal/getVideoADReward.anon
参数:
```js
let jsonData = {"appId": appId,"appName":appName,"token":videoToken,"userId":uid};
let data = {
deviceType: 5,
appVersion: 1,
jsonData: JSON.stringify(jsonData)
}
```