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

Function deleteComment

Script/Task/xmly.js:615–641  ·  view source on GitHub ↗
(commentId)

Source from the content-addressed store, hash-verified

613}
614
615async function deleteComment(commentId){
616 let headers = {
617 "Cookie": config.xm_cookie,
618 'Content-Type' : `application/x-www-form-urlencoded`
619 }
620 let body = `commentId=${commentId}&trackId=424771991`
621 let myRequest = {
622 url: "https://mobile.ximalaya.com/comment-mobile/delete",
623 headers: headers,
624 body: body
625 }
626 return await $.http.post(myRequest).then(
627 (response) => {
628 body = JSON.parse(response.body)
629 if (body.ret == 0) {
630 $.log("- 删除评论成功")
631 return true
632 } else {
633 $.log("- !!!未知评论状态")
634 return false
635 }
636 },(reason) => {
637 $.log("- !!!删除评论失败")
638 return false
639 }
640 )
641}
642
643async function jumpDzdp(){
644 let headers = {

Callers 1

mainFunction · 0.85

Calls 3

postMethod · 0.45
parseMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected