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

Function taskPostUrl

activity/jd_pubg.js:424–446  ·  view source on GitHub ↗
(body = "{}", functionId = 'doTask')

Source from the content-addressed store, hash-verified

422 }
423}
424function taskPostUrl(body = "{}", functionId = 'doTask') {
425 let t = getTs()
426 let url = `https://starsingle.m.jd.com/guardianstar/${functionId}`;
427 return {
428 url,
429 body: `${body}&t=${t}`,
430 headers: {
431 "Cookie": cookie,
432 'accept': 'application/json, text/plain, */*',
433 'accept-encoding': 'gzip, deflate, br',
434 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
435 'cache-control': 'no-cache',
436 "origin": "https://starsingle.m.jd.com",
437 'Content-Type': 'application/x-www-form-urlencoded',
438 'dnt': '1',
439 'pragma': 'no-cache',
440 'referer': 'https://starsingle.m.jd.com/static/index.html',
441 'timestamp': `${t}`,
442 'sign': sign(`${body}&t=${t}`,`07035cabb557f096${t}`,`/guardianstar/doTask`),
443 "User-Agent": 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88'//$.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
444 }
445 }
446}
447function TotalBean() {
448 return new Promise(async resolve => {
449 const options = {

Callers 2

helpFriendFunction · 0.70
doTaskFunction · 0.70

Calls 2

getTsFunction · 0.70
signFunction · 0.70

Tested by

no test coverage detected