-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-cobalt.js
More file actions
35 lines (34 loc) · 989 Bytes
/
Copy pathtest-cobalt.js
File metadata and controls
35 lines (34 loc) · 989 Bytes
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
29
30
31
32
33
34
35
const instances = [
"https://co.wuk.sh/api/json",
"https://cobalt.api.timelessnesses.me/api/json",
"https://api.cobalt.buss.lol/api/json",
"https://cobalt-api.pewpew.icu/api/json",
"https://cobalt.absoluteg.net/api/json",
"https://dl.to.sij.is/api/json",
"https://api.cobalt.tools/api/json",
];
async function testAll() {
for (const url of instances) {
try {
const resp = await fetch(url, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: "https://www.youtube.com/watch?v=jNQXAC9IVRw",
vQuality: "720",
filenamePattern: "classic",
isAudioOnly: false,
disableMetadata: true
})
});
const data = await resp.json();
console.log(url, "=>", data.status ? data.status : data);
} catch (e) {
console.log(url, "=> Error", e.message);
}
}
}
testAll();