mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复tiktok链接
This commit is contained in:
parent
50887e767e
commit
5647c554c5
@ -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) {
|
||||
|
@ -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: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user