MCPcopy Create free account
hub / github.com/Toulu-debug/enen / getBeanShareCode

Function getBeanShareCode

TS_USER_AGENTS.ts:53–70  ·  view source on GitHub ↗
(cookie: string)

Source from the content-addressed store, hash-verified

51let USER_AGENT = USER_AGENTS_ARR[getRandomNumberByRange(0, USER_AGENTS_ARR.length)]
52
53async function getBeanShareCode(cookie: string) {
54 let {data}: any = await axios.post('https://api.m.jd.com/client.action',
55 `functionId=plantBeanIndex&body=${encodeURIComponent(
56 JSON.stringify({version: "9.0.0.1", "monitor_source": "plant_app_plant_index", "monitor_refer": ""})
57 )}&appid=ld&client=apple&area=5_274_49707_49973&build=167283&clientVersion=9.1.0`, {
58 headers: {
59 Cookie: cookie,
60 Host: "api.m.jd.com",
61 Accept: "*/*",
62 Connection: "keep-alive",
63 "User-Agent": USER_AGENT
64 }
65 })
66 if (data.data?.jwordShareInfo?.shareUrl)
67 return data.data.jwordShareInfo.shareUrl.split('Uuid=')![1]
68 else
69 return ''
70}
71
72async function getFarmShareCode(cookie: string) {
73 let {data}: any = await axios.post('https://api.m.jd.com/client.action?functionId=initForFarm', `body=${encodeURIComponent(JSON.stringify({"version": 4}))}&appid=wh5&clientVersion=9.1.0`, {

Callers

nothing calls this directly

Calls 1

postMethod · 0.45

Tested by

no test coverage detected