|
50精币
在精易助手中请求数据能正常返回,但是到了js脚本里写post后就不行了大概情况如下
精易助手中请求数据能正常返回,
在js中返回都是请求失败
js中编写的源码
async function ydb_qphb(timeout = 0){
qqt=`{"action": "TIMING_RED_BAG","uniqueid": "","pid": "","steps_invite_friends": 0,"if_task_list": 0,"share_type": 1,"platform": "android","model": "","brand": "","version": 144,"client": "android"}`
console.log(qqt.length)
return new Promise((resolve) => {
let url = {
url:'https://ydb-api.baertt.com/v1/task/receive_reward',
headers:JSON.parse(`{"Host":"ydb-api.baertt.com","token":"642DDF18-2024-3602-13F5-281A850A6E34","content-type":"application/json","Content-Length":${qqt.length},"charset":"utf-8","Connection": "keep-alive","client": "android","Accept-Encoding": "gzip,compress,br,deflate","form-type": "routine","Referer": "https://servicewechat.com/wx8aca843784b6aff0/42/page-frame.html"}`),
body:qqt,
}
console.log(url)
$.post(url, async (err, resp, data) => {
try {
console.log(data)
data = JSON.parse(data)
}catch (e) {
} finally {
resolve()
}
})
})
}
网页请求完整数据
POST /v1/task/receive_reward HTTP/1.1
Host: file:///C:\Users\Administrator\AppData\Roaming\Tencent\QQTempSys\%W@GJ$ACOF(TYDYECOKVDYB.pngydb-api.baertt.com
Connection: keep-alive
Content-Length: 199
charset: utf-8
User-Agent: Mozilla/5.0 (Linux; Android 10; SKW-A0 Build/SKYW2103030CN00MQ5; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.62 XWEB/2853 MMWEBSDK/20210601 Mobile Safari/537.36 MMWEBID/7599 MicroMessenger/8.0.7.1920(0x28000737) Process/appbrand2 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android
client: android
content-type: application/json
Accept-Encoding: gzip,compress,br,deflate
form-type: routine
token: 642DDF18-2024-3602-13F5-281A850A6E34
Referer: https://servicewechat.com/wx8aca843784b6aff0/42/page-frame.html
{"action":"TIMING_RED_BAG","uniqueid":"","pid":"","steps_invite_friends":0,"if_task_list":0,"share_type":1,"platform":"android","model":"","brand":"","version":144,"client":"android"}
|
最佳答案
查看完整内容
nodejs版 需要安装axios包
代码:
安装axios:
至于怎么在docker安装 自己看一下吧
|