add try catch :p

This commit is contained in:
Ashley 2023-02-05 12:30:17 +00:00
parent c6dff86894
commit 0abca4f7c8

View file

@ -43,6 +43,7 @@ module.exports = async function (video_id) {
return rv; return rv;
} }
try {
// gets invidious instances // gets invidious instances
let inv_url = "https://api.invidious.io/instances.json?sort_by=type,health"; let inv_url = "https://api.invidious.io/instances.json?sort_by=type,health";
@ -70,4 +71,7 @@ module.exports = async function (video_id) {
} }
return url; return url;
} catch {
return " "
}
}; };