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

Function plant_taskUrl

jd_get_share_code.js:372–398  ·  view source on GitHub ↗
(function_id, body)

Source from the content-addressed store, hash-verified

370 }
371
372 function plant_taskUrl(function_id, body) {
373 body["version"] = "9.0.0.1";
374 body["monitor_source"] = "plant_app_plant_index";
375 body["monitor_refer"] = "";
376 return {
377 url: JDplant_API_HOST,
378 body: `functionId=${function_id}&body=${escape(
379 JSON.stringify(body)
380 )}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`,
381 headers: {
382 Cookie: cookie,
383 Host: "api.m.jd.com",
384 Accept: "*/*",
385 Connection: "keep-alive",
386 "User-Agent": $.isNode()
387 ? process.env.JD_USER_AGENT
388 ? process.env.JD_USER_AGENT
389 : "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"
390 : $.getdata("JDUA")
391 ? $.getdata("JDUA")
392 : "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",
393 "Accept-Language": "zh-Hans-CN;q=1,en-CN;q=0.9",
394 "Accept-Encoding": "gzip, deflate, br",
395 "Content-Type": "application/x-www-form-urlencoded",
396 },
397 };
398 }
399
400 function getParam(url, name) {
401 const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");

Callers 1

plant_requestFunction · 0.85

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected