From 55d28b19d7bf68db2fddfadd5b3b23adab4e9618 Mon Sep 17 00:00:00 2001 From: Ashley Date: Tue, 11 Oct 2022 16:43:22 +0200 Subject: [PATCH] faster fetching :3 --- src/fetcher.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fetcher.js b/src/fetcher.js index 1bf082cb..29b98617 100644 --- a/src/fetcher.js +++ b/src/fetcher.js @@ -27,6 +27,8 @@ module.exports = async function (video_id) { const dislike = await fetch(`${dislike_api}${video_id}`).then((res) => res.json() ); + + const dislikes = dislike.dislikes || "none"; const headers = {}; @@ -41,6 +43,7 @@ module.exports = async function (video_id) { var h = await player.text(); var j = toJson(h); return JSON.parse(j); + break; } catch (err) { if (err.status === 503) { // retry after a bit