From df7a02b9af7784384f50fc6f686be25c33a372dc Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 5 Feb 2023 12:30:17 +0000 Subject: [PATCH] add try catch :p --- src/libpoketube/libpoketube-video.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libpoketube/libpoketube-video.js b/src/libpoketube/libpoketube-video.js index 128637cf..68fd57da 100644 --- a/src/libpoketube/libpoketube-video.js +++ b/src/libpoketube/libpoketube-video.js @@ -43,6 +43,7 @@ module.exports = async function (video_id) { return rv; } + try { // gets invidious instances 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; + } catch { + return " " + } };