-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmedia.js
28 lines (26 loc) · 912 Bytes
/
media.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const axios = require('axios');
const tiktokdl = async url => {
let host = 'https://www.tikwm.com/';
let res = await axios.post(host+'api/', {}, {
headers: {
'accept': 'application/json, text/javascript, */*; q=0.01',
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
'sec-ch-ua': '"Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
},
params: {
url: url,
count: 12,
cursor: 0,
web: 1,
hd: 1
}
})
return {
status: true,
wm: host+res.data.data.wmplay,
music: host+res.data.data.music,
video: host+res.data.data.play
}
}
module.exports.tiktokdl = tiktokdl