MCPcopy Create free account
hub / github.com/Semporia/Scripts / taskUrl

Function taskUrl

jd_live_redrain.js:278–293  ·  view source on GitHub ↗
(function_id, body = {})

Source from the content-addressed store, hash-verified

276}
277
278function taskUrl(function_id, body = {}) {
279 return {
280 url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
281 headers: {
282 "Accept": "*/*",
283 "Accept-Encoding": "gzip, deflate, br",
284 "Accept-Language": "zh-cn",
285 "Connection": "keep-alive",
286 "Content-Type": "application/x-www-form-urlencoded",
287 "Host": "api.m.jd.com",
288 "Referer": `https://h5.m.jd.com/active/redrain/index.html?id=${$.activityId}&lng=0.000000&lat=0.000000&sid=&un_area=`,
289 "Cookie": cookie,
290 "User-Agent": "JD4iPhone/9.4.5 CFNetwork/1209 Darwin/20.2.0"
291 }
292 }
293}
294
295function getRedRainIds(url) {
296 return new Promise(async resolve => {

Callers 1

receiveRedRainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected