MCPcopy Create free account
hub / github.com/ClydeTime/Surge / share

Function share

Script/Task/xmly.js:270–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268}
269
270async function share(){
271 let headers = {
272 "Cookie": config.xm_cookie
273 }
274 let myRequest = {
275 url: `https://mobile.ximalaya.com/thirdparty-share/share/content?srcId=422711158&srcType=7&subType=1098&tpName=weixin`,
276 headers: headers
277 }
278 return await $.http.get(myRequest).then(
279 (response) => {
280 body = JSON.parse(response.body)
281 if (body.ret == 0) {
282 $.log("- 分享成功")
283 return true
284 } else {
285 $.log("- !!!分享失败")
286 return false
287 }
288 },(reason) => {
289 $.log("- !!!分享失败")
290 return false
291 }
292 )
293}
294
295async function getUid(){
296 let headers = {

Callers 1

mainFunction · 0.70

Calls 3

getMethod · 0.45
parseMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected