|
|
|
@ -66,11 +66,21 @@ https://herounion.filesite.io/api/newtask/
@@ -66,11 +66,21 @@ https://herounion.filesite.io/api/newtask/
|
|
|
|
|
* 请求方法:**POST** |
|
|
|
|
* 请求参数: |
|
|
|
|
``` |
|
|
|
|
uuid |
|
|
|
|
url |
|
|
|
|
platform |
|
|
|
|
data_mode |
|
|
|
|
selectors |
|
|
|
|
token |
|
|
|
|
notify_url |
|
|
|
|
country |
|
|
|
|
lang |
|
|
|
|
sign |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
参数说明: |
|
|
|
|
* platform: url所属平台,目前支持的:抖音、快手、西瓜视频、bilibili |
|
|
|
|
* data_mode: 返回数据格式,默认:json,可选值:json、html |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 查询网页抓取任务结果接口 |
|
|
|
|
|
|
|
|
@ -113,8 +123,11 @@ https://herounion.filesite.io/api/onboard/
@@ -113,8 +123,11 @@ https://herounion.filesite.io/api/onboard/
|
|
|
|
|
* 请求参数: |
|
|
|
|
``` |
|
|
|
|
bot_name |
|
|
|
|
bot_description |
|
|
|
|
status: [idle, busy] |
|
|
|
|
timestamp |
|
|
|
|
country |
|
|
|
|
lang |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -128,6 +141,47 @@ https://herounion.filesite.io/api/stats/
@@ -128,6 +141,47 @@ https://herounion.filesite.io/api/stats/
|
|
|
|
|
* 请求参数:**无** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 接口参数签名方法 |
|
|
|
|
|
|
|
|
|
将所有参数按字母排序之后拼接成GET请求字符串,最后再拼接上token计算MD5值。 |
|
|
|
|
|
|
|
|
|
示例如下: |
|
|
|
|
``` |
|
|
|
|
var token = 'hello world'; //注册联盟后获得的密钥 |
|
|
|
|
var params = { //参数示例 |
|
|
|
|
"b": 2, |
|
|
|
|
"a": 1, |
|
|
|
|
"t": 234343 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var sortObj = function(obj) { //参数排序方法 |
|
|
|
|
return Object.keys(obj).sort().reduce(function (result, key) { |
|
|
|
|
result[key] = obj[key]; |
|
|
|
|
return result; |
|
|
|
|
}, {}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var joinObj = function(obj, glue, separator) { //参数拼接方法 |
|
|
|
|
if (typeof(glue) == 'undefined') { |
|
|
|
|
glue = '='; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (typeof(separator) == 'undefined') { |
|
|
|
|
separator = '&'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return Object.keys(obj).map(function(key) { |
|
|
|
|
return [key, obj[key]].join(glue); |
|
|
|
|
}).join(separator); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//1. 排序参数 |
|
|
|
|
var sortedParams = sortObj(params); |
|
|
|
|
//2. 计算MD5值 |
|
|
|
|
var sign = md5( joinObj(sortedParams, '=', '&') + token ); |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Hero Union 英雄联盟开发进度 |
|
|
|
|
|
|
|
|
|
更新日期:2023-11-05 |
|
|
|
|