diff --git a/apps/query.js b/apps/query.js index 4049d40..29f4c82 100644 --- a/apps/query.js +++ b/apps/query.js @@ -168,7 +168,7 @@ export class query extends plugin { let url = 'https://api.vvhan.com/api/hotlist?type=' switch (keyword) { case '虎扑': - url += 'hupu' + url += 'huPu' break case '知乎': url += 'zhihuHot' @@ -211,7 +211,13 @@ export class query extends plugin { nickname: this.e.sender.card || this.e.user_id, user_id: this.e.user_id } let msg = [] - await fetch(url) + await fetch(url, { + headers: { + "User-Agent": + "Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Mobile Safari/537.36", + "Content-Type": "application/json", + } + }) .then((resp) => resp.json()) .then((resp) => { for (let element of resp.data) { diff --git a/apps/tools.js b/apps/tools.js index d2da078..3492d8f 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -139,7 +139,7 @@ export class tools extends plugin { } const idVideo = await this.getIdVideo(url) // API链接 - const API_URL = `https://api19-core-useast5.us.tiktokv.com/aweme/v1/feed/?aweme_id=${ idVideo }&version_code=262&app_name=musical_ly&channel=App&device_id=null&os_version=14.4.2&device_platform=iphone&device_type=iPhone9`; + const API_URL = `https://api16-normal-c-useast1a.tiktokv.com/aweme/v1/feed/?aweme_id=${ idVideo }&version_code=262&app_name=musical_ly&channel=App&device_id=null&os_version=14.4.2&device_platform=iphone&device_type=iPhone9`; await axios.get(API_URL, { headers: {